set_improve
Specifies the iterative improvement level.
void set_improve(lprec *lp, int improve);
Return Value
set_improve 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
improve
Specifies the iterative improvement level. Can by any of the
following values:
IMPROVE_NONE (0) |
improve none |
IMPROVE_SOLUTION (1) |
Running accuracy measurement of solved equations based on Bx=r (primal simplex), remedy is refactorization. |
IMPROVE_DUALFEAS (2) |
Improve initial dual feasibility by bound flips (highly recommended, and default) |
IMPROVE_THETAGAP (4) |
Low-cost accuracy monitoring in the dual, remedy is refactorization |
IMPROVE_BBSIMPLEX (8) |
By default there is a check for primal/dual feasibility at optimum only for the relaxed problem, this also activates the test at the node level |
Remarks
The default is IMPROVE_DUALFEAS + IMPROVE_THETAGAP (6).
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_improve(lp, IMPROVE_DUALFEAS | IMPROVE_BBSIMPLEX);
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_improve
|