gcg column

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

SCIP_Real GCGcolComputeDualObjPara ( SCIP *  scip,
GCG_COL gcgcol 
)

compute parallelism of column to dual objective

compute scalar of master values of gcg columns

Parameters
scipSCIP data structure
gcgcolgcg column

Definition at line 640 of file gcgcol.c.

References GCGcolGetMastercoefs(), GCGcolGetMastercuts(), GCGcolGetNMastercoefs(), GCGcolGetNMastercuts(), GCGcolGetProbNr(), GCGgetMasterConss(), GCGgetNIdenticalBlocks(), GCGgetNPricingprobs(), GCGmasterGetOrigprob(), and GCGsepaGetMastercuts().

Referenced by GCGpricestoreAddCol().

void GCGcolComputeNorm ( SCIP *  scip,
GCG_COL gcgcol 
)

get norm of column

compute scalar of master values of gcg columns

Parameters
scipSCIP data structure
gcgcolgcg column structure

Definition at line 442 of file gcgcol.c.

References GCGcolGetLinkvars(), GCGcolGetMastercoefs(), GCGcolGetMastercuts(), GCGcolGetNLinkvars(), GCGcolGetNMastercoefs(), GCGcolGetNMastercuts(), and GCGcolGetVals().

Referenced by GCGpricestoreAddCol().

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

compute orthogonality of two gcg columns

compute scalar of master values of gcg columns

Parameters
scipSCIP data structure
gcgcol1first gcg column
gcgcol2second gcg column

Definition at line 747 of file gcgcol.c.

References GCGcolGetLinkvars(), GCGcolGetMastercoefs(), GCGcolGetMastercuts(), GCGcolGetNLinkvars(), GCGcolGetNMastercoefs(), GCGcolGetNMastercuts(), GCGcolGetProbNr(), GCGcolGetVals(), and GCGcolGetVars().

Referenced by pricestoreUpdateOrthogonalities().

int GCGcolGetAge ( GCG_COL gcgcol)

gets the age of the col

get age of gcg column

Parameters
gcgcolcol

Definition at line 364 of file gcgcol.c.

Referenced by SCIP_DECL_SORTPTRCOMP().

SCIP_Bool GCGcolGetInitializedCoefs ( GCG_COL gcgcol)

return if master coefficients of column have been initialized

Parameters
gcgcolgcg column structure

Definition at line 508 of file gcgcol.c.

Referenced by ObjPricerGcg::computeColMastercoefs().

int* GCGcolGetLinkvars ( GCG_COL gcgcol)

get master coefficients of column

Parameters
gcgcolgcg column structure

Definition at line 516 of file gcgcol.c.

Referenced by GCGcolComputeNorm(), GCGcolComputeOrth(), and ObjPricerGcg::setPricingObjs().

SCIP_Real* GCGcolGetMastercoefs ( GCG_COL gcgcol)

get master coefficients of column

Parameters
gcgcolgcg column structure

Definition at line 390 of file gcgcol.c.

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

SCIP_Real* GCGcolGetMastercuts ( GCG_COL gcgcol)

get master cut coefficients of column

Parameters
gcgcolgcg column structure

Definition at line 555 of file gcgcol.c.

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

int GCGcolGetNLinkvars ( GCG_COL gcgcol)

get number of master coefficients of column

Parameters
gcgcolgcg column structure

Definition at line 524 of file gcgcol.c.

Referenced by GCGcolComputeNorm(), GCGcolComputeOrth(), and ObjPricerGcg::setPricingObjs().

int GCGcolGetNMastercoefs ( GCG_COL gcgcol)

get number of master coefficients of column

Parameters
gcgcolgcg column structure

Definition at line 398 of file gcgcol.c.

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

int GCGcolGetNMastercuts ( GCG_COL gcgcol)

get number of master cut coefficients of column

Parameters
gcgcolgcg column structure

Definition at line 563 of file gcgcol.c.

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

SCIP_Real GCGcolGetNorm ( GCG_COL gcgcol)

get norm of column

Parameters
gcgcolgcg column structure

Definition at line 571 of file gcgcol.c.

Referenced by computeScore(), and pricestoreUpdateOrthogonalities().

int GCGcolGetNVars ( GCG_COL gcgcol)
SCIP* GCGcolGetPricingProb ( GCG_COL gcgcol)

get pricing problem of gcg column

Parameters
gcgcolgcg column structure

Definition at line 316 of file gcgcol.c.

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

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

return solution value of variable in gcg column

Parameters
scipSCIP data structure
gcgcolgcg column
varvariable

Definition at line 602 of file gcgcol.c.

Referenced by ObjPricerGcg::createNewMasterVarFromGcgCol(), and gcg::Stabilization::updateAlpha().

SCIP_Real* GCGcolGetVals ( GCG_COL gcgcol)
SCIP_VAR** GCGcolGetVars ( GCG_COL gcgcol)
SCIP_Bool GCGcolIsAged ( GCG_COL col,
int  agelimit 
)

returns whether the col's age exceeds the age limit

Parameters
colcol to check
agelimitmaximum age a col can reach before it is deleted from the pool, or -1

Definition at line 629 of file gcgcol.c.

Referenced by GCGcolpoolPrice().

SCIP_Bool GCGcolIsEq ( GCG_COL gcgcol1,
GCG_COL gcgcol2 
)

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

Parameters
gcgcol1first gcg column structure
gcgcol2second gcg column structure

Definition at line 243 of file gcgcol.c.

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

Referenced by pricestoreFindEqualCol().

SCIP_Bool GCGcolIsRay ( GCG_COL gcgcol)

is gcg column a ray?

Parameters
gcgcolgcg column structure

Definition at line 348 of file gcgcol.c.

Referenced by ObjPricerGcg::computeRedCostGcgCol(), ObjPricerGcg::createNewMasterVarFromGcgCol(), and ObjPricerGcg::getDualconvsum().

SCIP_RETCODE GCGcolSetInitializedCoefs ( GCG_COL gcgcol)

set master coefficients of column as initialized

Parameters
gcgcolgcg column structure

Definition at line 498 of file gcgcol.c.

Referenced by ObjPricerGcg::computeColMastercoefs().

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

set master coefficients information of column

Parameters
gcgcolgcg column structure
linkvarsarray of linking variable indices for gcgcol->var
nlinkvarsnumber of linking variables in gcgcol->var

Definition at line 532 of file gcgcol.c.

Referenced by ObjPricerGcg::computeColMastercoefs().

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

set master coefficients of column

set master coefficients information of column

Parameters
gcgcolgcg column structure
mastercoefsarray of master coefficients
nmastercoefsnew number of master coefficients

Definition at line 406 of file gcgcol.c.

Referenced by ObjPricerGcg::computeColMastercoefs().

void GCGcolSetNorm ( GCG_COL gcgcol,
SCIP_Real  norm 
)

set norm of column

Parameters
gcgcolgcg column structure
normnorm of column

Definition at line 433 of file gcgcol.c.

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

update master cut coefficients information of column

Parameters
gcgcolgcg column structure
newmastercutspointer to new array of master cut coefficients
nnewmastercutsnew number of master cut coefficients

Definition at line 579 of file gcgcol.c.

References GCGcolGetPricingProb().

Referenced by ObjPricerGcg::computeColMastercuts().

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

update reduced cost of variable and increase age

Parameters
gcgcolgcg column structure
redcostnew reduced cost
growoldchange age depending on reduced cost?

Definition at line 372 of file gcgcol.c.

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

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

Parameters
pricingprobSCIP data structure (pricing problem)
gcgcolpointer to store gcg column
probnrnumber of corresponding pricing problem
vars(sorted) array of variables of corresponding pricing problem
valsarray of solution values (belonging to vars)
nvarsnumber of variables
israyis the column a ray?
redcostlast known reduced cost

Definition at line 52 of file gcgcol.c.

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

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

Parameters
pricingprobSCIP data structure (pricing problem)
gcgcolpointer to store gcg column
probnumber of corresponding pricing problem
solsolution of pricing problem with index prob
israyis column a ray?
redcostlast known reduced cost

Definition at line 151 of file gcgcol.c.

References GCGcreateGcgCol().

Referenced by getColumnsFromPricingprob(), and solveCplex().

void GCGfreeGcgCol ( GCG_COL **  gcgcol)

free a gcg column

Parameters
gcgcolpointer to store gcg column

Definition at line 132 of file gcgcol.c.

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

SCIP_DECL_SORTPTRCOMP ( GCGcolCompRedcost  )

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

Definition at line 209 of file gcgcol.c.

References GCGcolGetRedcost().

SCIP_DECL_SORTPTRCOMP ( GCGcolCompAge  )

comparison method for sorting gcg columns by non-increasing age

Definition at line 226 of file gcgcol.c.

References GCGcolGetAge().