# set_epsd

Specifies the value that is used as a tolerance for reduced costs to determine whether a value should be considered as 0.

void set_epsd(lprec *lp, REAL epsd);

Return Value

set_epsd 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

epsd

The value that is used as a tolerance for reduced costs to determine whether a value should be considered as 0.

Remarks

The set_epsd function specifies the value that is used as a tolerance for reduced costs 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. epsd specifies the tolerance to determine if a reducedcost value should be considered as 0. If abs(value) is less than this epsd value, it is considered as 0.
The default epsd value is 1e-9

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_epsd(lp, 1.0e-8); /* sets epsd to 1e-8 */

      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_epsd, set_infinite, is_infinite, get_infinite, set_epsint, get_epsint, set_epsb, get_epsb, set_epsel, get_epsel, get_epspivot, set_epspivot, set_epsperturb, get_epsperturb, set_mip_gap, get_mip_gap