1 #ifndef HEADER_lp_mipbb
2 #define HEADER_lp_mipbb
3 
4 #include "lp_types.h"
5 #include "lp_utils.h"
6 
7 
8 /* Bounds storage for B&B routines */
9 typedef struct _BBrec
10 {
11   struct    _BBrec *parent;
12   struct    _BBrec *child;
13   lprec     *lp;
14   int       varno;
15   int       vartype;
16   int       lastvarcus;            /* Count of non-int variables of the previous branch */
17   int       lastrcf;
18   int       nodesleft;
19   int       nodessolved;
20   int       nodestatus;
21   REAL      noderesult;
22   REAL      lastsolution;          /* Optimal solution of the previous branch */
23   REAL      sc_bound;
24   REAL      *upbo,   *lowbo;
25   REAL      UPbound, LObound;
26   int       UBtrack, LBtrack;      /* Signals that incoming bounds were changed */
27   MYBOOL    contentmode;           /* Flag indicating if we "own" the bound vectors */
28   MYBOOL    sc_canset;
29   MYBOOL    isSOS;
30   MYBOOL    isGUB;
31   int       *varmanaged;           /* Extended list of variables managed by this B&B level */
32   MYBOOL    isfloor;               /* State variable indicating the active B&B bound */
33   MYBOOL    UBzerobased;           /* State variable indicating if bounds have been rebased */
34 } BBrec;
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 STATIC BBrec *create_BB(lprec *lp, BBrec *parentBB, MYBOOL dofullcopy);
41 STATIC BBrec *push_BB(lprec *lp, BBrec *parentBB, int varno, int vartype, int varcus);
42 STATIC MYBOOL initbranches_BB(BBrec *BB);
43 STATIC MYBOOL fillbranches_BB(BBrec *BB);
44 STATIC MYBOOL nextbranch_BB(BBrec *BB);
45 STATIC MYBOOL strongbranch_BB(lprec *lp, BBrec *BB, int varno, int vartype, int varcus);
46 STATIC MYBOOL initcuts_BB(lprec *lp);
47 STATIC int updatecuts_BB(lprec *lp);
48 STATIC MYBOOL freecuts_BB(lprec *lp);
49 STATIC BBrec *findself_BB(BBrec *BB);
50 STATIC int solve_LP(lprec *lp, BBrec *BB);
51 STATIC int rcfbound_BB(BBrec *BB, int varno, MYBOOL isINT, REAL *newbound, MYBOOL *isfeasible);
52 STATIC MYBOOL findnode_BB(BBrec *BB, int *varno, int *vartype, int *varcus);
53 STATIC int solve_BB(BBrec *BB);
54 STATIC MYBOOL free_BB(BBrec **BB);
55 STATIC BBrec *pop_BB(BBrec *BB);
56 
57 STATIC int run_BB(lprec *lp);
58 
59 #ifdef __cplusplus
60  }
61 #endif
62 
63 #endif /* HEADER_lp_mipbb */
64 
65