get_bb_depthlimit
Returns the maximum branchandbound depth.
int get_bb_depthlimit(lprec *lp);
Return Value
get_bb_depthlimit returns the maximum branchandbound depth.
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_depthlimit function returns the maximum branchandbound
depth.
This is only usefull if there are integer, semicontinious or SOS variables in
the model so that the branchandbound algorithm must be used to solve them.
The branchandbound 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,
read_lp, read_LP, read_lpt, read_LPT, read_mps,
read_freemps, read_MPS, read_freeMPS, read_XLI, set_bb_depthlimit
