is_piv_mode

Returns if pivot mode specified in testmask is active.

unsigned char is_piv_mode(lprec *lp, int testmask);

Return Value

is_piv_mode returns TRUE or FALSE.

Parameters

lp

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

testmask

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 is_piv_mode function checks if the pivot mode specified in testmask is active. The pivot mode is an extra modifier to the pivot rule. Any combination (OR) of the defined values is possible.

Example

#include <stdio.h>
#include <stdlib.h>
#include "lp_lib.h"

int main(void)
{
  lprec *lp;
  unsigned char piv_mode;

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

  piv_mode = is_piv_mode(lp, PRICE_ADAPTIVE); /* Will return TRUE, because this is the default */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, read_lp, read_LP, read_lpt, read_LPT, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, set_pivoting, get_pivoting, is_piv_rule