set_epsint

Specifies the tolerance that is used to determine whether a floating-point number is in fact an integer.

void set_epsint(lprec *lp, REAL epsint);

Return Value

set_epsint has no return value.

Parameters

lp

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

epsint

The tolerance that is used to determine whether a floating-point number is in fact an integer.

Remarks

The set_epsint function specifies the tolerance that is used to determine whether a floating-point number is in fact an integer. This is only used when there is at least one integer variable and the branch and bound algorithm is used to make variables integer.
Integer variables are internally in the algorithm also stored as floating point. Therefore a tolerance is needed to determine if a value is to be considered as integer or not. If the absolute value of the variable minus the closed integer value is less than epsint, it is considered as integer. For example if a variable has the value 0.9999999 and epsint is 0.000001 then it is considered integer because abs(0.9999999 - 1) = 0.0000001 and this is less than 0.000001
The default value for epsint is 1e-7
So by changing epsint you determine how close a value must approximate the nearest integer. Changing this tolerance value to for example 0.001 will generally result in faster solving times, but your solution is less integer.
So it is a compromise.

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_epsint(lp, 1.0e-3); /* sets epsint to 0.001 */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

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