cutpool.c
Go to the documentation of this file.
25 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 80 * The columns in a row are divided into two parts: LP columns, which are currently in the LP and non-LP columns; 81 * we sort the rows, but that only ensures that within these two parts, columns are sorted w.r.t. their index. 82 * Normally, this should be suficient, because a column contained in both rows should either be one of the LP columns 84 * However, directly after a row was created, before it is added to the LP, the row is not linked to all its 86 * Therefore, if exactly one of the rows has no LP columns, we cannot rely on the partition, because this row might 87 * just have been created and also columns that are in the LP might be in the non-LP columns part. 115 /* both rows have LP columns, or none of them has, or one has only LP colums and the other only non-LP columns, 127 /* in debug mode, we check that we can rely on the partition into LP columns and non-LP columns */ 180 /* one row has LP columns, but the other not, that could be because the one without was just created and isn't 181 * linked yet; in this case, one column could be an LP column in one row and a non-LP column in the other row, so we 182 * cannot rely on the partition; thus, we iteratively check whether the next column of row1 is either the next LP 223 /* current column of row1 is neither the current LP column of row2, nor the current non-LP column of row 2 */ 256 keyval = (row->maxidx << 29) + (row->len << 22) + (row->minidx << 11) + maxabsval; /*lint !e701*/ 368 /** gets the age of the cut: the number of consecutive cut pool separation rounds where the cut was neither in the LP nor violated */ 378 /** returns the ratio of LPs where the row belonging to this cut was active in an LP solution, i.e. 597 /* decrease the number of removable cuts counter (row might have changed its removable status -> counting might not 727 SCIPdebugMessage("separating%s cut pool %p with %d cuts, beginning with cut %d\n", ( sol == NULL ) ? "" : " solution from", (void*)cutpool, cutpool->ncuts, firstunproc); 761 /* if the cut is a bound change (i.e. a row with only one variable), add it as bound change instead of LP 767 SCIP_CALL( SCIPsepastoreAddCut(sepastore, blkmem, set, stat, eventqueue, eventfilter, lp, sol, row, FALSE, root, &cutoff) ); 773 else if( (sol == NULL && SCIProwIsLPEfficacious(row, set, stat, lp, root)) || (sol != NULL && SCIProwIsSolEfficacious(row, set, stat, sol, root)) ) 777 SCIProwGetName(row), ( sol == NULL ) ? SCIProwGetLPFeasibility(row, set, stat, lp) : SCIProwGetSolFeasibility(row, set, stat, sol) ); 778 SCIP_CALL( SCIPsepastoreAddCut(sepastore, blkmem, set, stat, eventqueue, eventfilter, lp, sol, row, FALSE, root, &cutoff) );
internal methods for separators SCIP_Real SCIProwGetSolFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol) Definition: lp.c:6272 Definition: type_result.h:33 SCIP_Longint SCIProwGetNLPsAfterCreation(SCIP_ROW *row) Definition: lp.c:19158 SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1567 internal methods for clocks and timing issues Definition: struct_sepastore.h:37 Definition: struct_event.h:169 Definition: type_result.h:40 Definition: struct_sepa.h:36 static SCIP_RETCODE cutpoolDelCut(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_CUT *cut) Definition: cutpool.c:572 static SCIP_RETCODE cutFree(SCIP_CUT **cut, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp) Definition: cutpool.c:325 SCIP_RETCODE SCIPcutpoolFree(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp) Definition: cutpool.c:441 internal methods for LP management SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr) Definition: misc.c:1480 Definition: struct_sol.h:50 Definition: struct_set.h:56 Definition: type_clock.h:34 SCIP_RETCODE SCIPcutpoolDelRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row) Definition: cutpool.c:641 SCIP_RETCODE SCIPcutpoolAddNewRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_ROW *row) Definition: cutpool.c:517 Definition: type_result.h:35 static SCIP_RETCODE cutCreate(SCIP_CUT **cut, BMS_BLKMEM *blkmem, SCIP_ROW *row) Definition: cutpool.c:299 Definition: struct_cons.h:116 int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore) Definition: sepastore.c:1357 datastructures for storing cuts in a cut pool SCIP_Longint SCIPcutpoolGetNCutsFound(SCIP_CUTPOOL *cutpool) Definition: cutpool.c:894 Definition: type_retcode.h:33 internal methods for global SCIP settings SCIP_RETCODE SCIPcutpoolClear(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp) Definition: cutpool.c:467 SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1719 SCIP_Longint SCIPcutpoolGetNCalls(SCIP_CUTPOOL *cutpool) Definition: cutpool.c:884 internal methods for storing separated cuts SCIP_Bool SCIProwIsSolEfficacious(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Bool root) Definition: lp.c:6587 SCIP_RETCODE SCIProwRelease(SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp) Definition: lp.c:5118 SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype) Definition: clock.c:160 void SCIPconshdlrIncNCutsFound(SCIP_CONSHDLR *conshdlr) Definition: cons.c:4551 SCIP_RETCODE SCIPcutpoolAddRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_ROW *row) Definition: cutpool.c:493 public data structures and miscellaneous methods SCIP_RETCODE SCIPsepastoreAddCut(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool root, SCIP_Bool *infeasible) Definition: sepastore.c:554 Definition: struct_lp.h:189 Definition: struct_cutpool.h:48 SCIP_RETCODE SCIPcutpoolCreate(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, int agelimit, SCIP_Bool globalcutpool) Definition: cutpool.c:404 internal methods for storing cuts in a cut pool void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key) Definition: misc.c:1627 SCIP_Bool SCIProwIsLPEfficacious(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool root) Definition: lp.c:6528 Definition: struct_lp.h:255 public methods for message output SCIP_Real SCIProwGetLPFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp) Definition: lp.c:6018 internal methods for problem statistics internal methods for constraints and constraint handlers SCIP_RETCODE SCIPcutpoolSeparate(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, SCIP_Bool cutpoolisdelayed, SCIP_Bool root, SCIP_RESULT *result) Definition: cutpool.c:670 SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1692 Definition: struct_stat.h:44 common defines and data types used in all packages of SCIP Definition: struct_event.h:204 Definition: type_retcode.h:43 static SCIP_RETCODE cutpoolEnsureCutsMem(SCIP_CUTPOOL *cutpool, SCIP_SET *set, int num) Definition: cutpool.c:269 Definition: type_result.h:39 Definition: struct_cutpool.h:38 |