set_pivoting
Sets the pivot rule and mode.
void set_pivoting(lprec *lp, int pivoting);
Return Value
set_pivoting 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
pivoting
The pivot rule and mode. Can be one of the following rules:
PRICER_FIRSTINDEX (0) |
Select first |
PRICER_DANTZIG (1) |
Select according to Dantzig |
PRICER_DEVEX (2) |
Devex pricing from Paula Harris |
PRICER_STEEPESTEDGE (3) |
Steepest Edge |
Some of these values can be combined with any (ORed) of the following modes:
PRICE_PRIMALFALLBACK (4) |
In case of Steepest Edge, fall back to DEVEX in primal |
PRICE_MULTIPLE (8) |
Preliminary implementation of the multiple pricing scheme. This means that
attractive candidate entering columns from one iteration may be used in the
subsequent iteration, avoiding full updating of reduced costs. In the current
implementation, lp_solve only reuses the 2nd best entering column alternative |
PRICE_PARTIAL (16) |
Enable partial pricing |
PRICE_ADAPTIVE (32) |
Temporarily use First Index if cycling is detected |
PRICE_RANDOMIZE (128) |
Adds a small randomization effect to the selected pricer |
PRICE_LOOPLEFT (1024) |
Scan entering/leaving columns left rather than right |
PRICE_LOOPALTERNATE (2048) |
Scan entering/leaving columns alternatingly left/right |
Remarks
The set_pivoting function specifies the pivot rule (rule for selecting row
and column entering/leaving) and mode. The rule is an exclusive option and the mode
is a modifier to the rule. This rule/mode can influence solving times
considerably. Depending on the model one rule/mode can be best and for another model
another rule/mode.
The default is PRICER_DEVEX | PRICE_ADAPTIVE (34).
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_pivoting(lp, PRICER_FIRSTINDEX);
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_pivoting, is_piv_rule, is_piv_mode
|