set_epsel

Specifies the value that is used as a tolerance for rounding values to zero.

void set_epsel(lprec *lp, REAL epsel);

Return Value

set_epsel has no return value.

Parameters

lp

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

epsel

The value that is used as a tolerance for rounding values to zero.

Remarks

The set_epsel function specifies the value that is used as a tolerance for rounding values to zero.
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. epsel specifies the tolerance to determine if a value should be considered as 0. If abs(value) is less than this epsel value, it is considered as 0.
epsel is used on all other places where epsilon, epsb, epsd, epspivot, epsperturb are not used. The default epsel value is 1e-11

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_epsel(lp, 1.0e-10); /* sets epsel to 1e-10 */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, read_lp, read_LP, read_lpt, read_LPT, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, get_epsel, set_infinite, get_infinite, set_epsilon, get_epsilon, set_epsd, get_epsd, set_epsb, get_epsb, get_epspivot, set_epspivot, set_epsperturb, get_epsperturb, set_mip_gap, get_mip_gap