is_anti_degen
Returns if the degeneracy rule specified in testmask is active.
unsigned char is_anti_degen(lprec *lp, int testmask);
Return Value
is_anti_degen returns TRUE or FALSE.
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
testmask
ANTIDEGEN_NONE (0) |
No anti-degeneracy handling |
ANTIDEGEN_FIXEDVARS (1) |
Check if there are equality slacks in the basis and try to drive them out in
order to reduce chance of degeneracy in Phase 1 |
ANTIDEGEN_COLUMNCHECK (2) |
|
ANTIDEGEN_STALLING (4) |
|
ANTIDEGEN_NUMFAILURE (8) |
|
ANTIDEGEN_LOSTFEAS (16) |
|
ANTIDEGEN_INFEASIBLE (32) |
|
ANTIDEGEN_DYNAMIC (64) |
|
ANTIDEGEN_DURINGBB (128) |
|
Remarks
The is_anti_degen function returns a flag if the degeneracy rule
specified in testmask is active.
Example
#include <stdio.h>
#include <stdlib.h>
#include "lp_lib.h"
int main(void)
{
lprec *lp;
unsigned char anti_degen;
/* Create a new LP model */
lp = make_lp(0, 0);
if(lp == NULL) {
fprintf(stderr, "Unable to create new LP model\n");
return(1);
}
anti_degen = is_anti_degen(lp, ANTIDEGEN_FIXEDVARS | ANTIDEGEN_PERTURB); /* Will return FALSE */
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, set_anti_degen, get_anti_degen
|