Loading...
Searching...
No Matches
cons_origbranch.c
Go to the documentation of this file.
36/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
65#define CONSHDLR_ENFOPRIORITY 0 /**< priority of the constraint handler for constraint enforcing */
66#define CONSHDLR_CHECKPRIORITY 2000000 /**< priority of the constraint handler for checking feasibility */
67#define CONSHDLR_EAGERFREQ 100 /**< frequency for using all instead of only the useful constraints in separation,
69#define CONSHDLR_NEEDSCONS TRUE /**< should the constraint handler be skipped, if no constraints are available? */
80 SCIP_CONS* probingtmpcons; /**< pointer to save the last child in the childconss array if it is overwritten in probing mode */
83 GCG_BRANCHDATA* branchdata; /**< branching data stored by the branching rule containing information
104/** destructor of constraint handler to free constraint handler data (called when SCIP is exiting) */
117 SCIPdebugMessage("freeing branch orig constraint handler (nconss = %d)\n", SCIPconshdlrGetNConss(conshdlr));
132/** solving process initialization method of constraint handler (called when branch and bound process is about to begin) */
163/** solving process deinitialization method of constraint handler (called before branch and bound process data is freed) */
178 SCIPdebugMessage("exiting solution process branch orig constraint handler (nconss = %d)\n", SCIPconshdlrGetNConss(conshdlr));
208 SCIPdebugMessage("exiting transformed branch orig constraint handler (nconss = %d)\n", SCIPconshdlrGetNConss(conshdlr));
277 SCIP_CALL( GCGrelaxBranchDataDelete(GCGorigGetGcg(scip), (*consdata)->branchrule, &(*consdata)->branchdata, TRUE, force) );
317 SCIPdebugMessage("Activating branch orig constraint: <%s>[stack size: %d].\n", SCIPconsGetName(cons),
324 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrData->stack), conshdlrData->maxstacksize, newsize) );
325 SCIPdebugMessage("reallocating Memory for stack! %d --> %d\n", conshdlrData->maxstacksize, newsize);
459 GCG_BRANCHRULE* branchrule, /**< the branching rule that created the b&b node the constraint belongs to */
460 GCG_BRANCHDATA* branchdata /**< branching data storing information about the branching restrictions at the
490 SCIPdebugMessage("Creating branch orig constraint: <%s> (nconss = %d).\n", name, SCIPconshdlrGetNConss(conshdlr));
493 SCIP_CALL( SCIPcreateCons(scip, cons, name, conshdlr, consdata, FALSE, FALSE, FALSE, FALSE, FALSE,
520 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(parentdata->childconss), parentdata->maxchildconss, newsize) );
686 SCIP_CONS* cons, /**< origbranch constraint for which the masterbranch constraint should be set */
687 SCIP_CONS* mastercons /**< masterbranch constraint corresponding to the given origbranch constraint */
699/** returns the masterbranch constraint of the node in the master program corresponding to the node
794 assert(consdata->parentcons == NULL || SCIPconsGetData(consdata->parentcons)->childconss[0] == conss[i]
796 || ( SCIPinProbing(scip) && SCIPconsGetData(consdata->parentcons)->probingtmpcons == conss[i]));
798 assert(consdata->childconss[0] == NULL || SCIPconsGetData(consdata->childconss[0])->parentcons == conss[i]);
800 assert(consdata->childconss[1] == NULL || SCIPconsGetData(consdata->childconss[1])->parentcons == conss[i]);
802 assert(consdata->probingtmpcons == NULL || SCIPconsGetData(consdata->probingtmpcons)->parentcons == conss[i]);
803 assert(consdata->mastercons == NULL || GCGconsMasterbranchGetOrigcons(consdata->mastercons) == conss[i]);
SCIP_DECL_CONSENFOPS(ConshdlrSubtour::scip_enfops)
SCIP_DECL_CONSLOCK(ConshdlrSubtour::scip_lock)
SCIP_DECL_CONSDELETE(ConshdlrSubtour::scip_delete)
SCIP_DECL_CONSCHECK(ConshdlrSubtour::scip_check)
SCIP_DECL_CONSENFOLP(ConshdlrSubtour::scip_enfolp)
branching rule based on vanderbeck's generic branching scheme
void GCGconsMasterbranchSetBranchdata(SCIP_CONS *cons, GCG_BRANCHDATA *branchdata)
Definition cons_masterbranch.c:2919
SCIP_CONS * GCGconsMasterbranchGetOrigcons(SCIP_CONS *cons)
Definition cons_masterbranch.c:2877
void GCGconsMasterbranchSetOrigcons(SCIP_CONS *cons, SCIP_CONS *origcons)
Definition cons_masterbranch.c:2892
static SCIP_DECL_CONSEXITSOL(consExitSolMasterbranch)
Definition cons_masterbranch.c:1820
static SCIP_DECL_CONSINITSOL(consInitsolMasterbranch)
Definition cons_masterbranch.c:1797
static SCIP_DECL_CONSEXIT(consExitMasterbranch)
Definition cons_masterbranch.c:1863
static SCIP_DECL_CONSDEACTIVE(consDeactiveMasterbranch)
Definition cons_masterbranch.c:2028
static SCIP_DECL_CONSACTIVE(consActiveMasterbranch)
Definition cons_masterbranch.c:1914
constraint handler for storing the branching decisions at each node of the tree
int GCGconsOrigbranchGetNChildconss(SCIP_CONS *cons)
Definition cons_origbranch.c:652
SCIP_CONS * GCGconsOrigbranchGetParentcons(SCIP_CONS *cons)
Definition cons_origbranch.c:635
SCIP_CONS * GCGconsOrigbranchGetMastercons(SCIP_CONS *cons)
Definition cons_origbranch.c:702
SCIP_CONS * GCGconsOrigbranchGetChildcons(SCIP_CONS *cons, int childnr)
Definition cons_origbranch.c:667
SCIP_NODE * GCGconsOrigbranchGetNode(SCIP_CONS *cons)
Definition cons_origbranch.c:619
void GCGconsOrigbranchCheckConsistency(GCG *gcg)
Definition cons_origbranch.c:760
static SCIP_DECL_CONSENFORELAX(consEnforeOrigbranch)
Definition cons_origbranch.c:377
void GCGconsOrigbranchSetBranchdata(SCIP_CONS *cons, GCG_BRANCHDATA *branchdata)
Definition cons_origbranch.c:578
SCIP_CONS * GCGconsOrigbranchGetActiveCons(GCG *gcg)
Definition cons_origbranch.c:532
GCG_BRANCHRULE * GCGconsOrigbranchGetBranchrule(SCIP_CONS *cons)
Definition cons_origbranch.c:605
SCIP_RETCODE GCGconsOrigbranchAddRootCons(GCG *gcg)
Definition cons_origbranch.c:717
GCG_BRANCHDATA * GCGconsOrigbranchGetBranchdata(SCIP_CONS *cons)
Definition cons_origbranch.c:592
void GCGconsOrigbranchSetMastercons(SCIP_CONS *cons, SCIP_CONS *mastercons)
Definition cons_origbranch.c:685
void GCGconsOrigbranchGetStack(GCG *gcg, SCIP_CONS ***stack, int *nstackelements)
Definition cons_origbranch.c:554
SCIP_RETCODE GCGcreateConsOrigbranch(GCG *gcg, SCIP_CONS **cons, const char *name, SCIP_NODE *node, SCIP_CONS *parentcons, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition cons_origbranch.c:453
SCIP_RETCODE GCGincludeConshdlrOrigbranch(GCG *gcg)
Definition cons_origbranch.c:416
constraint handler for storing the branching decisions at each node of the tree
#define SCIP_Bool
#define TRUE
#define FALSE
GCG interface methods.
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDEACTIVE((*consdeactive)))
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSACTIVE((*consactive)))
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeMemoryNull(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
int SCIPnodeGetDepth(SCIP_NODE *node)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_NODE * SCIPgetRootNode(SCIP *scip)
SCIPfreeMemory(GCGgetOrigprob(gcg), &divingdata)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
SCIPdebugMessage("feasibility pump finished [%d iterations done].\n", nloops)
#define NULL
Definition class_conspartition.cpp:44
#define SCIPerrorMessage
SCIP_RETCODE GCGrelaxBranchDataDelete(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA **branchdata, SCIP_Bool origbranch, SCIP_Bool force)
Definition relax_gcg.c:3858
Definition cons_masterbranch.c:75
Definition cons_decomp.cpp:124
struct SCIP_Cons SCIP_CONS
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_ConsData SCIP_CONSDATA
SCIP_FEASIBLE
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
struct SCIP_Node SCIP_NODE