# get_pivoting

Returns the pivot rule and mode.

int get_pivoting(lprec *lp);

Return Value

get_pivoting returns 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 alternative strategy if cycling is detected
PRICE_RANDOMIZE (128) | Adds a small randomization effect to the selected pricer
PRICE_AUTOPARTIAL (256) | Indicates automatic detection of segmented/staged/blocked models. It refers to partial pricing rather than full pricing. With full pricing, all non-basic columns are scanned, but with partial pricing only a subset is scanned for every iteration. This can speed up several models
PRICE_AUTOMULTIPLE (512) | Automatically select multiple pricing (primal simplex)
PRICE_LOOPLEFT (1024) | Scan entering/leaving columns left rather than right
PRICE_LOOPALTERNATE (2048) | Scan entering/leaving columns alternatingly left/right
PRICE_HARRISTWOPASS (4096) | Use Harris' primal pivot logic rather than the default
PRICE_TRUENORMINIT (16384) | Use true norms for Devex and Steepest Edge initializations

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

Remarks

The get_pivoting function returns 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;
      int pivoting;

      /* Create a new LP model */
      lp = make_lp(0, 0);
      if(lp == NULL) {
        fprintf(stderr, "Unable to create new LP model\n");
        return(1);
      }

      pivoting = get_pivoting(lp); /* will return 18 */

      delete_lp(lp);
      return(0);
    }

lp_solve API reference

See Also make_lp, copy_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, is_piv_rule, set_pivoting, is_piv_mode