pricestore_gcg.c
Go to the documentation of this file.
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
73 SCIP_CALL( SCIPreallocBlockMemoryArray(pricestore->scip, &pricestore->cols, pricestore->colssize, newsize) );
74 SCIP_CALL( SCIPreallocBlockMemoryArray(pricestore->scip, &pricestore->objparallelisms, pricestore->colssize, newsize) );
75 SCIP_CALL( SCIPreallocBlockMemoryArray(pricestore->scip, &pricestore->orthogonalities, pricestore->colssize, newsize) );
76 SCIP_CALL( SCIPreallocBlockMemoryArray(pricestore->scip, &pricestore->scores, pricestore->colssize, newsize) );
117 (*pricestore)->objparalfac = objparalfac; /* factor of objective parallelism in score function */
359 /** updates the orthogonalities and scores of the non-forced cols after the given col was added to the LP */
384 SCIPdebugMessage(" -> deleting parallel col %p after adding %p (pos=%d, orthogonality=%g, score=%g)\n",
426 /** adds the given col to priced vars and updates the orthogonalities and scores of remaining cols */
440 SCIP_CALL( GCGcreateNewMasterVarFromGcgCol(pricestore->scip, pricestore->infarkas, col, force, added, NULL, score) );
444 if( SCIPisGT(pricestore->scip, mincolorthogonality, SCIPepsilon(pricestore->scip)) || SCIPisPositive(pricestore->scip, pricestore->orthofac))
553 SCIP_CALL( SCIPallocClearBufferArray(scip, &ncolsappliedprob, GCGgetNPricingprobs(GCGmasterGetOrigprob(scip))) );
559 /* Compute scores for all non-forced cols and initialize orthogonalities - make sure all cols are initialized again for the current dual solution */
579 SCIP_CALL( pricestoreApplyCol(pricestore, col, TRUE, mincolorthogonality, pricestore->scores[pos], &added) );
607 * Note: do not take SCIPsetIsEfficacious(), because constraint handlers often add cols w.r.t. SCIPsetIsFeasPositive().
608 * Note2: if pricerating/feastolfac != -1, constraint handlers may even add cols w.r.t. SCIPsetIsPositive(); those are currently rejected here
610 if( SCIPisDualfeasNegative(scip, GCGcolGetRedcost(col)) && ncolsapplied < maxpricecols && ncolsappliedprob[probnr] < maxpricecolsprob )
617 SCIPdebugMessage(" -> applying col %p (pos=%d/%d, probnr=%d, efficacy=%g, objparallelism=%g, orthogonality=%g, score=%g)\n",
618 (void*) col, bestpos+1, pricestore->ncols, probnr, GCGcolGetRedcost(pricestore->cols[bestpos]), pricestore->objparallelisms[bestpos],
670 /* if we have just finished the initial LP construction, free the (potentially large) cols array */
674 SCIPfreeBlockMemoryArrayNull(pricestore->scip, &pricestore->objparallelisms, pricestore->colssize);
675 SCIPfreeBlockMemoryArrayNull(pricestore->scip, &pricestore->orthogonalities, pricestore->colssize);
static void pricestoreDelCol(GCG_PRICESTORE *pricestore, int pos, SCIP_Bool freecol)
Definition: pricestore_gcg.c:197
SCIP_Real GCGpricestoreGetTime(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:769
GCG interface methods.
void GCGpricestoreStartFarkas(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:152
int GCGpricestoreGetNCols(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:719
static SCIP_RETCODE pricestoreUpdateOrthogonalities(GCG_PRICESTORE *pricestore, GCG_COL *col, SCIP_Real mincolorthogonality)
Definition: pricestore_gcg.c:361
Definition: struct_gcgcol.h:50
@ GCG_EFFICIACYCHOICE_STEEPESTEDGE
Definition: type_pricestore_gcg.h:47
GCG_EFFICIACYCHOICE efficiacychoice
Definition: struct_pricestore_gcg.h:74
void GCGpricestoreRemoveInefficaciousCols(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:683
datastructures for storing priced cols
static int pricestoreFindEqualCol(GCG_PRICESTORE *pricestore, GCG_COL *col)
Definition: pricestore_gcg.c:226
SCIP_RETCODE GCGpricestoreFree(SCIP *scip, GCG_PRICESTORE **pricestore)
Definition: pricestore_gcg.c:127
GCG variable pricer.
SCIP_RETCODE GCGpricestoreApplyCols(GCG_PRICESTORE *pricestore, GCG_COLPOOL *colpool, SCIP_Bool usecolpool, int *nfoundvars)
Definition: pricestore_gcg.c:523
int GCGpricestoreGetNColsApplied(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:759
int GCGpricestoreGetNColsFoundRound(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:749
void GCGpricestoreEndForceCols(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:185
void GCGpricestoreStartForceCols(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:174
SCIP_RETCODE GCGpricestoreAddCol(SCIP *scip, GCG_PRICESTORE *pricestore, GCG_COL *col, SCIP_Bool forcecol)
Definition: pricestore_gcg.c:243
Definition: struct_pricestore_gcg.h:52
Definition: struct_colpool.h:51
SCIP_RETCODE GCGpricestoreCreate(SCIP *scip, GCG_PRICESTORE **pricestore, SCIP_Real efficiacyfac, SCIP_Real objparalfac, SCIP_Real orthofac, SCIP_Real mincolorth, GCG_EFFICIACYCHOICE efficiacychoice)
Definition: pricestore_gcg.c:85
GCG_COL ** GCGpricestoreGetCols(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:709
SCIP_RETCODE GCGcolpoolAddCol(GCG_COLPOOL *colpool, GCG_COL *col, SCIP_Bool *success)
Definition: colpool.c:281
static SCIP_RETCODE computeScore(GCG_PRICESTORE *pricestore, int pos)
Definition: pricestore_gcg.c:480
void GCGpricestoreEndFarkas(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:163
SCIP_RETCODE GCGcreateNewMasterVarFromGcgCol(SCIP *scip, SCIP_Bool infarkas, GCG_COL *gcgcol, SCIP_Bool force, SCIP_Bool *added, SCIP_VAR **addedvar, SCIP_Real score)
Definition: pricer_gcg.cpp:3215
int GCGpricestoreGetNEfficaciousCols(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:729
void GCGpricestoreClearCols(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:648
methods for storing priced cols (based on SCIP's separation storage)
static int pricestoreGetBestCol(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:452
SCIP_Real GCGcolComputeDualObjPara(SCIP *scip, GCG_COL *gcgcol)
Definition: gcgcol.c:651
int GCGpricestoreGetNColsFound(GCG_PRICESTORE *pricestore)
Definition: pricestore_gcg.c:739
static SCIP_RETCODE pricestoreEnsureColsMem(GCG_PRICESTORE *pricestore, int num)
Definition: pricestore_gcg.c:60
static SCIP_RETCODE pricestoreApplyCol(GCG_PRICESTORE *pricestore, GCG_COL *col, SCIP_Bool force, SCIP_Real mincolorthogonality, SCIP_Real score, SCIP_Bool *added)
Definition: pricestore_gcg.c:428
SCIP_Real GCGcolComputeOrth(SCIP *scip, GCG_COL *gcgcol1, GCG_COL *gcgcol2)
Definition: gcgcol.c:758