Scippy

GCG

Branch-and-Price & Column Generation for Everyone

Detailed Description

Functions

SCIP_RETCODE GCGcreateGcgCol (SCIP *scip, GCG_COL **gcgcol, int prob, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool isray, SCIP_Real redcost)
 
void GCGfreeGcgCol (GCG_COL **gcgcol)
 
SCIP_RETCODE GCGcreateGcgColFromSol (SCIP *scip, GCG_COL **gcgcol, int prob, SCIP_SOL *sol, SCIP_Bool isray, SCIP_Real redcost)
 
int GCGcolGetProbNr (GCG_COL *gcgcol)
 
SCIP * GCGcolGetPricingProb (GCG_COL *gcgcol)
 
SCIP_VAR ** GCGcolGetVars (GCG_COL *gcgcol)
 
SCIP_Real * GCGcolGetVals (GCG_COL *gcgcol)
 
int GCGcolGetNVars (GCG_COL *gcgcol)
 
SCIP_Bool GCGcolIsRay (GCG_COL *gcgcol)
 
SCIP_Real GCGcolGetRedcost (GCG_COL *gcgcol)
 
 SCIP_DECL_SORTPTRCOMP (GCGcolCompRedcost)
 
 SCIP_DECL_SORTPTRCOMP (GCGcolCompAge)
 
SCIP_Bool GCGcolIsEq (GCG_COL *gcgcol1, GCG_COL *gcgcol2)
 
void GCGcolUpdateRedcost (GCG_COL *gcgcol, SCIP_Real redcost, SCIP_Bool growold)
 
SCIP_Real GCGcolGetSolVal (SCIP *scip, GCG_COL *gcgcol, SCIP_VAR *var)
 
SCIP_Real * GCGcolGetMastercoefs (GCG_COL *gcgcol)
 
int GCGcolGetNMastercoefs (GCG_COL *gcgcol)
 
SCIP_RETCODE GCGcolSetMastercoefs (GCG_COL *gcgcol, SCIP_Real *mastercoefs, int nmastercoefs)
 
void GCGcolSetNorm (GCG_COL *gcgcol, SCIP_Real norm)
 
void GCGcolComputeNorm (SCIP *scip, GCG_COL *gcgcol)
 
SCIP_RETCODE GCGcolSetInitializedCoefs (GCG_COL *gcgcol)
 
SCIP_Bool GCGcolGetInitializedCoefs (GCG_COL *gcgcol)
 
int * GCGcolGetLinkvars (GCG_COL *gcgcol)
 
int GCGcolGetNLinkvars (GCG_COL *gcgcol)
 
SCIP_RETCODE GCGcolSetLinkvars (GCG_COL *gcgcol, int *linkvars, int nlinkvars)
 
SCIP_Real * GCGcolGetMastercuts (GCG_COL *gcgcol)
 
int GCGcolGetNMastercuts (GCG_COL *gcgcol)
 
SCIP_Real GCGcolGetNorm (GCG_COL *gcgcol)
 
SCIP_RETCODE GCGcolUpdateMastercuts (GCG_COL *gcgcol, SCIP_Real *newmastercuts, int nnewmastercuts)
 
int GCGcolGetAge (GCG_COL *col)
 
SCIP_Bool GCGcolIsAged (GCG_COL *col, int agelimit)
 
SCIP_Real GCGcolComputeDualObjPara (SCIP *scip, GCG_COL *gcgcol)
 
SCIP_Real GCGcolComputeOrth (SCIP *scip, GCG_COL *gcgcol1, GCG_COL *gcgcol2)
 

Function Documentation

◆ GCGcreateGcgCol()

SCIP_RETCODE GCGcreateGcgCol ( SCIP *  pricingprob,
GCG_COL **  gcgcol,
int  probnr,
SCIP_VAR **  vars,
SCIP_Real *  vals,
int  nvars,
SCIP_Bool  isray,
SCIP_Real  redcost 
)

create a gcg column

Definition at line 52 of file gcgcol.c.

Referenced by createColumnFromRay(), GCGcreateGcgColFromSol(), solveCliquer(), solveCplex(), and solveKnapsack().

◆ GCGfreeGcgCol()

void GCGfreeGcgCol ( GCG_COL **  gcgcol)

free a gcg column

Definition at line 135 of file gcgcol.c.

Referenced by colpoolDelCol(), GCGpricestoreAddCol(), GCGpricestoreClearCols(), and pricestoreDelCol().

◆ GCGcreateGcgColFromSol()

SCIP_RETCODE GCGcreateGcgColFromSol ( SCIP *  pricingprob,
GCG_COL **  gcgcol,
int  prob,
SCIP_SOL *  sol,
SCIP_Bool  isray,
SCIP_Real  redcost 
)

create a gcg column from a solution to a pricing problem

Definition at line 154 of file gcgcol.c.

References GCGcreateGcgCol().

Referenced by getColumnsFromPricingprob(), and solveCplex().

◆ GCGcolGetProbNr()

◆ GCGcolGetPricingProb()

SCIP* GCGcolGetPricingProb ( GCG_COL gcgcol)

get pricing problem of gcg column

Definition at line 319 of file gcgcol.c.

References GCG_Col::pricingprob.

Referenced by ObjPricerGcg::computeColMastercoefs(), GCGcolIsEq(), and GCGcolUpdateMastercuts().

◆ GCGcolGetVars()

◆ GCGcolGetVals()

◆ GCGcolGetNVars()

int GCGcolGetNVars ( GCG_COL gcgcol)

◆ GCGcolIsRay()

SCIP_Bool GCGcolIsRay ( GCG_COL gcgcol)

◆ GCGcolGetRedcost()

◆ SCIP_DECL_SORTPTRCOMP() [1/2]

SCIP_DECL_SORTPTRCOMP ( GCGcolCompRedcost  )

comparison method for sorting gcg columns by non-decreasing reduced cost

Definition at line 212 of file gcgcol.c.

References GCGcolGetRedcost().

◆ SCIP_DECL_SORTPTRCOMP() [2/2]

SCIP_DECL_SORTPTRCOMP ( GCGcolCompAge  )

comparison method for sorting gcg columns by non-increasing age

Definition at line 229 of file gcgcol.c.

References GCGcolGetAge().

◆ GCGcolIsEq()

SCIP_Bool GCGcolIsEq ( GCG_COL gcgcol1,
GCG_COL gcgcol2 
)

comparison method for gcg columns. Returns TRUE iff columns are equal

Definition at line 246 of file gcgcol.c.

References GCGcolGetNVars(), GCGcolGetPricingProb(), GCGcolGetProbNr(), GCGcolGetVals(), and GCGcolGetVars().

Referenced by pricestoreFindEqualCol().

◆ GCGcolUpdateRedcost()

void GCGcolUpdateRedcost ( GCG_COL gcgcol,
SCIP_Real  redcost,
SCIP_Bool  growold 
)

update reduced cost of variable and increase age

Definition at line 375 of file gcgcol.c.

References GCG_Col::age, GCG_Col::pricingprob, and GCG_Col::redcost.

Referenced by ObjPricerGcg::addColToPricestore(), ObjPricerGcg::computeRedCostGcgCol(), and GCGcolpoolUpdateRedcost().

◆ GCGcolGetSolVal()

SCIP_Real GCGcolGetSolVal ( SCIP *  scip,
GCG_COL gcgcol,
SCIP_VAR *  var 
)

return solution value of variable in gcg column

Definition at line 613 of file gcgcol.c.

References GCG_Col::nvars, GCG_Col::vals, and GCG_Col::vars.

◆ GCGcolGetMastercoefs()

SCIP_Real* GCGcolGetMastercoefs ( GCG_COL gcgcol)

get master coefficients of column

Definition at line 393 of file gcgcol.c.

References GCG_Col::mastercoefs.

Referenced by GCGcolComputeDualObjPara(), GCGcolComputeNorm(), and GCGcolComputeOrth().

◆ GCGcolGetNMastercoefs()

int GCGcolGetNMastercoefs ( GCG_COL gcgcol)

get number of master coefficients of column

Definition at line 401 of file gcgcol.c.

References GCG_Col::nmastercoefs.

Referenced by ObjPricerGcg::computeColMastercoefs(), GCGcolComputeDualObjPara(), GCGcolComputeNorm(), and GCGcolComputeOrth().

◆ GCGcolSetMastercoefs()

SCIP_RETCODE GCGcolSetMastercoefs ( GCG_COL gcgcol,
SCIP_Real *  mastercoefs,
int  nmastercoefs 
)

set master coefficients of column

set master coefficients information of column

Definition at line 409 of file gcgcol.c.

References GCG_Col::mastercoefs, GCG_Col::maxmastercoefs, GCG_Col::nmastercoefs, and GCG_Col::pricingprob.

Referenced by ObjPricerGcg::computeColMastercoefs().

◆ GCGcolSetNorm()

void GCGcolSetNorm ( GCG_COL gcgcol,
SCIP_Real  norm 
)

set norm of column

Definition at line 437 of file gcgcol.c.

References GCG_Col::norm.

◆ GCGcolComputeNorm()

void GCGcolComputeNorm ( SCIP *  scip,
GCG_COL gcgcol 
)

◆ GCGcolSetInitializedCoefs()

SCIP_RETCODE GCGcolSetInitializedCoefs ( GCG_COL gcgcol)

set master coefficients of column as initialized

Definition at line 502 of file gcgcol.c.

References GCG_Col::initcoefs.

Referenced by ObjPricerGcg::computeColMastercoefs().

◆ GCGcolGetInitializedCoefs()

SCIP_Bool GCGcolGetInitializedCoefs ( GCG_COL gcgcol)

return if master coefficients of column have been initialized

Definition at line 512 of file gcgcol.c.

References GCG_Col::initcoefs.

Referenced by ObjPricerGcg::computeColMastercoefs().

◆ GCGcolGetLinkvars()

int* GCGcolGetLinkvars ( GCG_COL gcgcol)

get master coefficients of column

Definition at line 520 of file gcgcol.c.

References GCG_Col::linkvars.

Referenced by GCGcolComputeNorm(), and GCGcolComputeOrth().

◆ GCGcolGetNLinkvars()

int GCGcolGetNLinkvars ( GCG_COL gcgcol)

get number of master coefficients of column

Definition at line 528 of file gcgcol.c.

References GCG_Col::nlinkvars.

Referenced by GCGcolComputeNorm(), and GCGcolComputeOrth().

◆ GCGcolSetLinkvars()

SCIP_RETCODE GCGcolSetLinkvars ( GCG_COL gcgcol,
int *  linkvars,
int  nlinkvars 
)

set master coefficients information of column

Definition at line 536 of file gcgcol.c.

References GCG_Col::linkvars, GCG_Col::maxlinkvars, GCG_Col::nlinkvars, and GCG_Col::pricingprob.

Referenced by ObjPricerGcg::computeColMastercoefs().

◆ GCGcolGetMastercuts()

SCIP_Real* GCGcolGetMastercuts ( GCG_COL gcgcol)

get master cut coefficients of column

Definition at line 560 of file gcgcol.c.

References GCG_Col::mastercuts.

Referenced by GCGcolComputeDualObjPara(), GCGcolComputeNorm(), and GCGcolComputeOrth().

◆ GCGcolGetNMastercuts()

int GCGcolGetNMastercuts ( GCG_COL gcgcol)

get number of master cut coefficients of column

Definition at line 568 of file gcgcol.c.

References GCG_Col::nmastercuts.

Referenced by ObjPricerGcg::computeColMastercuts(), GCGcolComputeDualObjPara(), GCGcolComputeNorm(), and GCGcolComputeOrth().

◆ GCGcolGetNorm()

SCIP_Real GCGcolGetNorm ( GCG_COL gcgcol)

get norm of column

Definition at line 576 of file gcgcol.c.

References GCG_Col::norm.

Referenced by computeScore(), and pricestoreUpdateOrthogonalities().

◆ GCGcolUpdateMastercuts()

SCIP_RETCODE GCGcolUpdateMastercuts ( GCG_COL gcgcol,
SCIP_Real *  newmastercuts,
int  nnewmastercuts 
)

update master cut coefficients information of column

Definition at line 584 of file gcgcol.c.

References GCGcolGetPricingProb(), GCG_Col::mastercuts, GCG_Col::maxmastercuts, GCG_Col::nmastercuts, and GCG_Col::pricingprob.

Referenced by ObjPricerGcg::computeColMastercuts().

◆ GCGcolGetAge()

int GCGcolGetAge ( GCG_COL gcgcol)

gets the age of the col

get age of gcg column

Definition at line 367 of file gcgcol.c.

References GCG_Col::age.

Referenced by SCIP_DECL_SORTPTRCOMP().

◆ GCGcolIsAged()

SCIP_Bool GCGcolIsAged ( GCG_COL col,
int  agelimit 
)

returns whether the col's age exceeds the age limit

Definition at line 640 of file gcgcol.c.

References GCG_Col::age.

Referenced by GCGcolpoolPrice().

◆ GCGcolComputeDualObjPara()

SCIP_Real GCGcolComputeDualObjPara ( SCIP *  scip,
GCG_COL gcgcol 
)

◆ GCGcolComputeOrth()

SCIP_Real GCGcolComputeOrth ( SCIP *  scip,
GCG_COL gcgcol1,
GCG_COL gcgcol2 
)