get_bb_rule

Returns the branch-and-bound rule.

int get_bb_rule(lprec *lp);

Return Value

get_bb_rule returns the branch-and-bound rule. Can by any of the following values:

NODE_FIRSTSELECT (0) Select lowest indexed non-integer column
NODE_GAPSELECT (1) Selection based on distance from the current bounds
NODE_RANGESELECT (2) Selection based on the largest current bound
NODE_FRACTIONSELECT (3) Selection based on largest fractional value
NODE_PSEUDOCOSTSELECT (4) Simple, unweighted pseudo-cost of a variable
NODE_PSEUDONONINTSELECT (5) This is an extended pseudo-costing strategy based on minimizing the number of integer infeasibilities
NODE_PSEUDORATIOSELECT (6) This is an extended pseudo-costing strategy based on maximizing the normal pseudo-cost divided by the number of infeasibilities. Effectively, it is similar to (the reciprocal of) a cost/benefit ratio
NODE_USERSELECT (7)

One of these values may be or-ed with one or more of the following values:

NODE_WEIGHTREVERSEMODE (8) ?
NODE_BRANCHREVERSEMODE (16) ?
NODE_GREEDYMODE (32) ?
NODE_PSEUDOCOSTMODE (64) ?
NODE_DEPTHFIRSTMODE (128) ?
NODE_RANDOMIZEMODE (256) ?
NODE_GUBMODE (512) ?
NODE_DYNAMICMODE (1024) ?
NODE_RESTARTMODE (2048) ?

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

Remarks

The get_bb_rule function returns the branch-and-bound rule for choosing which non-integer variable is to be selected. 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 NODE_FIRSTSELECT (0).

Example

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

int main(void)
{
  lprec *lp;
  int bb_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);
  }

  bb_rule = get_bb_rule(lp); /* will return 0 */

  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_bb_rule