get_bb_depthlimit

Returns the maximum branch-and-bound depth.

int get_bb_depthlimit(lprec *lp);

Return Value

get_bb_depthlimit returns the maximum branch-and-bound depth.

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_bb_depthlimit function returns the maximum branch-and-bound depth.
This is only useful if there are integer, semi-continious or SOS variables in the model so that the branch-and-bound algorithm must be used to solve them. The branch-and-bound algorithm will not go deeper than this level. When 0 then there is no limit to the depth. Limiting the depth will speed up solving time, but there is a chance that the found solution is not the most optimal one. Be aware of this. It can also result in not finding a solution at all. A positive value means that the depth is absoluut. A negative value means a relative B&B depth limit. The "order" of a MIP problem is defined to be 2x the number of binary variables plus the number of SC and SOS variables. A relative value of -x results in a maximum depth of x times the order of the MIP problem.
The default is -50.

Example

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

int main(void)
{
  lprec *lp;
  int bb_maxlevel;

  /* 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_maxlevel = get_bb_depthlimit(lp);

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, set_bb_depthlimit