get_bb_rule

Returns the branch-and-bound rule.

short get_bb_rule(lprec *lp);

Return Value

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

FIRST_SELECT (0) Lowest indexed non-integer column
RAND_SELECT (1) Random non-integer column
WORST_SELECT (2) Largest deviation from an integer value
BEST_SELECT (3) Algorithm chooses the most appropriate non-integer column
MEDIAN_SELECT (4) Median value deviation from an integer value
GREEDY_SELECT (5) Choose non-integer column which 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_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 FIRST_SELECT (0).

Example

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

int main(void)
{
  lprec *lp;
  short 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, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS, set_bb_rule