set_epspivot

Specifies the value that is used as a tolerance pivot element to determine whether a value should be considered as 0.

void set_epspivot(lprec *lp, REAL epspivot);

Return Value

set_epspivot has no return value.

Parameters

lp

Pointer to previously created lp model. See return value of make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI

epspivot

The value that is used as a tolerance for the pivot element to determine whether a value should be considered as 0.

Remarks

The set_epspivot function specifies the value that is used as a tolerance for the pivot element to determine whether a value should be considered as 0.
Floating-point calculations always result in loss of precision and rounding errors. Therefore a very small value (example 1e-99) could be the result of such errors and should be considered as 0 for the algorithm. epspivot specifies the tolerance to determine if a pivot element should be considered as 0. If abs(value) is less than this epspivot value it is considered as 0 and at first instance rejected as pivot element. Only when no larger other pivot element can be found and the value is different from 0 it will be used as pivot element.
The default epspivot value is 2e-7

Example

#include <stdio.h>
#include <stdlib.h>
#include "lp_lib.h"

int main(void)
{
  lprec *lp;

  /* Create a new LP model */
  lp = make_lp(0, 0);
  if(lp == NULL) {
    fprintf(stderr, "Unable to create new LP model\n");
    return(1);
  }

  set_epspivot(lp, 1.0e-5); /* sets epspivot to 1e-5 */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, get_epspivot, set_infinite, get_infinite, is_infinite, set_epsint, get_epsint, set_epsd, get_epsd, set_epsel, get_epsel, get_epsperturb, set_epsperturb, set_mip_gap, get_mip_gap