32 #define BRANCHRULE_NAME "nodereopt" 33 #define BRANCHRULE_DESC "branching rule for node reoptimization" 34 #define BRANCHRULE_PRIORITY -9000000 35 #define BRANCHRULE_MAXDEPTH -1 36 #define BRANCHRULE_MAXBOUNDDIST 1.0 54 unsigned int* childids;
62 assert(scip !=
NULL );
66 assert(curnode !=
NULL);
87 assert(reoptnode !=
NULL);
109 assert(ncreatedchilds == 0);
110 assert(naddedconss == 1);
119 assert(ncreatedchilds >= 2);
121 ncreatednodes += ncreatedchilds;
144 if( childnodessize < nchilds )
150 assert(nchilds <= childnodessize);
154 for(c = 0; c < nchilds; c++)
158 unsigned int childid;
161 childid = childids[c];
162 assert(childid >= 1);
164 SCIPdebugMsg(scip,
"process child at ID %u\n", childid);
167 assert(reoptnode !=
NULL);
190 &naddedconss, childnodessize, &success) );
194 assert(ncreatedchilds > childnodessize);
197 childnodessize = ncreatedchilds+1;
202 &naddedconss, childnodessize, &success) );
210 ncreatednodes += ncreatedchilds;
213 if( ncreatednodes == 0 )
237 assert(branchrule !=
NULL);
250 assert(branchrule !=
NULL );
276 if( nbranchcands > 0 )
298 assert(branchrule !=
NULL );
317 assert(branchrule !=
NULL );
344 assert(scip !=
NULL );
350 assert(branchrule !=
NULL );
enum SCIP_Result SCIP_RESULT
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
reliable pseudo costs branching rule
static SCIP_DECL_BRANCHCOPY(branchCopyNodereopt)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_RETCODE SCIPincludeBranchruleNodereopt(SCIP *scip)
SCIP_RETCODE SCIPsetBranchruleExecPs(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECPS((*branchexecps)))
internal methods for branch and bound tree
static SCIP_RETCODE Exec(SCIP *scip, SCIP_RESULT *result)
#define BRANCHRULE_MAXDEPTH
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_Bool SCIPreoptimizeNode(SCIP *scip, SCIP_NODE *node)
SCIP_RETCODE SCIPsetBranchruleCopy(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHCOPY((*branchcopy)))
enum SCIP_Retcode SCIP_RETCODE
public methods for reoptimization
SCIP_RETCODE SCIPincludeBranchruleBasic(SCIP *scip, SCIP_BRANCHRULE **branchruleptr, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_BRANCHRULEDATA *branchruledata)
int SCIPnodeGetDepth(SCIP_NODE *node)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_NODE * SCIPgetRootNode(SCIP *scip)
SCIP_RETCODE SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
static SCIP_DECL_BRANCHEXECPS(branchExecpsNodereopt)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_RETCODE SCIPgetReoptChildIDs(SCIP *scip, SCIP_NODE *node, unsigned int *ids, int idssize, int *nids)
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
SCIP_Bool SCIPisReoptEnabled(SCIP *scip)
static SCIP_DECL_BRANCHEXECLP(branchExeclpNodereopt)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
enum SCIP_ReoptType SCIP_REOPTTYPE
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPcheckReoptRestart(SCIP *scip, SCIP_NODE *node, SCIP_Bool *restart)
int SCIPreoptnodeGetNChildren(SCIP_REOPTNODE *reoptnode)
#define BRANCHRULE_PRIORITY
#define BRANCHRULE_MAXBOUNDDIST
SCIP_RETCODE SCIPsetBranchruleExecExt(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECEXT((*branchexecext)))
SCIP_Real SCIPgetReoptSimilarity(SCIP *scip, int run1, int run2)
SCIP_Real SCIPnodeGetEstimate(SCIP_NODE *node)
static SCIP_DECL_BRANCHEXECEXT(branchExecextNodereopt)
int SCIPgetNReoptRuns(SCIP *scip)
unsigned int SCIPnodeGetReoptID(SCIP_NODE *node)
SCIP_RETCODE SCIPsplitReoptRoot(SCIP *scip, int *ncreatedchilds, int *naddedconss)
SCIP_RETCODE SCIPapplyReopt(SCIP *scip, SCIP_REOPTNODE *reoptnode, unsigned int id, SCIP_Real estimate, SCIP_NODE **childnodes, int *ncreatedchilds, int *naddedconss, int childnodessize, SCIP_Bool *success)
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
SCIP_RETCODE SCIPexecRelpscostBranching(SCIP *scip, SCIP_Bool allowaddcons, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int nbranchcands, SCIP_Bool executebranching, SCIP_RESULT *result)
SCIP_REOPTTYPE SCIPreoptnodeGetType(SCIP_REOPTNODE *reoptnode)
SCIP_REOPTNODE * SCIPgetReoptnode(SCIP *scip, unsigned int id)
#define SCIPreallocBufferArray(scip, ptr, num)