get_piv_rule

Returns the pivot rule.

short get_piv_rule(lprec *lp);

Return Value

get_piv_rule returns the pivot rule. Can by any of the following values:

FIRST_SELECT (0) Select first appropriate pivot row/column
BEST_SELECT (3) Algorithm chooses the most appropriate pivot row/column
GREEDY_SELECT (5) Choose pivot row/column that results in largest object value change

Parameters

lp

Pointer to previously created lp model. See return value of make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS

Remarks

The get_piv_rule function returns the pivot rule (rule for selecting row and column entering/leaving). This rule can influence solving times considerably. Depending on the model one rule can be best and for another model another rule.
The default is BEST_SELECT (3).

Example

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

int main(void)
{
  lprec *lp;
  short piv_rule;

  /* 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_rule = get_piv_rule(lp); /* will return 3 */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS, set_piv_rule