GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
pricingprob.c File Reference

Detailed Description

methods for working with pricing problems

Author
Christian Puchert

Various methods to work with pricing problems

Definition in file pricingprob.c.

#include "gcg/pricingprob.h"
#include "gcg/pub_pricingprob.h"
#include "gcg/gcg.h"
#include "gcg/pricestore_gcg.h"
#include "gcg/pub_colpool.h"
#include "gcg/pub_gcgcol.h"
#include "gcg/pub_pricingjob.h"
#include "scip/scip.h"

Go to the source code of this file.

Functions

SCIP_RETCODE GCGpricingprobCreate (GCG *gcg, GCG_PRICINGPROB **pricingprob, SCIP *pricingscip, int probnr, int nroundscol)
void GCGpricingprobFree (GCG *gcg, GCG_PRICINGPROB **pricingprob)
void GCGpricingprobInitPricing (GCG_PRICINGPROB *pricingprob)
void GCGpricingprobExitPricing (GCG_PRICINGPROB *pricingprob, int nroundscol)
SCIP_RETCODE GCGpricingprobAddGenericBranchData (GCG *gcg, GCG_PRICINGPROB *pricingprob, SCIP_CONS *branchcons, SCIP_Real branchdual)
void GCGpricingprobReset (GCG *gcg, GCG_PRICINGPROB *pricingprob)
void GCGpricingprobUpdate (GCG *gcg, GCG_PRICINGPROB *pricingprob, GCG_PRICINGSTATUS status, SCIP_Real lowerbound, int nimpcols)
SCIP * GCGpricingprobGetPricingscip (GCG_PRICINGPROB *pricingprob)
int GCGpricingprobGetProbnr (GCG_PRICINGPROB *pricingprob)
void GCGpricingprobGetGenericBranchData (GCG_PRICINGPROB *pricingprob, SCIP_CONS ***branchconss, SCIP_Real **branchduals, int *nbranchconss)
int GCGpricingprobGetNGenericBranchconss (GCG_PRICINGPROB *pricingprob)
int GCGpricingprobGetBranchconsIdx (GCG_PRICINGPROB *pricingprob)
SCIP_Bool GCGpricingprobBranchconsIsAdded (GCG_PRICINGPROB *pricingprob)
void GCGpricingprobMarkBranchconsAdded (GCG_PRICINGPROB *pricingprob)
void GCGpricingprobNextBranchcons (GCG_PRICINGPROB *pricingprob)
GCG_PRICINGSTATUS GCGpricingprobGetStatus (GCG_PRICINGPROB *pricingprob)
SCIP_Real GCGpricingprobGetLowerbound (GCG_PRICINGPROB *pricingprob)
int GCGpricingprobGetNImpCols (GCG_PRICINGPROB *pricingprob)
int GCGpricingprobGetNSolves (GCG_PRICINGPROB *pricingprob)
int GCGpricingprobGetNColsLastRounds (GCG_PRICINGPROB *pricingprob, int nroundscol)

Function Documentation

◆ GCGpricingprobCreate()

SCIP_RETCODE GCGpricingprobCreate ( GCG * gcg,
GCG_PRICINGPROB ** pricingprob,
SCIP * pricingscip,
int probnr,
int nroundscol )

create a pricing problem

Parameters
gcgGCG data structure (master problem)
pricingprobpricing problem to be created
pricingscipSCIP data structure of the corresponding pricing problem
probnrindex of the corresponding pricing problem
nroundscolnumber of previous pricing rounds for which the number of improving columns should be counted

Definition at line 52 of file pricingprob.c.

References GCG_PRICINGSTATUS_UNKNOWN, GCGgetMasterprob(), GCGpricingprobCreate(), and SCIP_CALL().

Referenced by GCGpricingprobCreate(), and gcg::Pricingcontroller::initSol().

◆ GCGpricingprobFree()

void GCGpricingprobFree ( GCG * gcg,
GCG_PRICINGPROB ** pricingprob )

free a pricing problem

Parameters
gcgGCG data structure (master problem)
pricingprobpricing problem to be freed

Definition at line 84 of file pricingprob.c.

References GCGgetMasterprob(), and GCGpricingprobFree().

Referenced by gcg::Pricingcontroller::exitSol(), and GCGpricingprobFree().

◆ GCGpricingprobInitPricing()

void GCGpricingprobInitPricing ( GCG_PRICINGPROB * pricingprob)

initialize pricing problem at the beginning of the pricing round

Parameters
pricingprobpricing problem structure

Definition at line 98 of file pricingprob.c.

References assert(), GCG_PricingProb::branchconsidx, GCG_PricingProb::consisadded, GCGpricingprobInitPricing(), GCG_PricingProb::nbranchconss, and GCG_PricingProb::nimpcols.

Referenced by GCGpricingprobInitPricing(), and gcg::Pricingcontroller::initPricing().

◆ GCGpricingprobExitPricing()

void GCGpricingprobExitPricing ( GCG_PRICINGPROB * pricingprob,
int nroundscol )

uninitialize pricing problem at the beginning of the pricing round

Parameters
pricingprobpricing problem structure
nroundscolnumber of previous pricing rounds for which the number of improving columns should be counted

Definition at line 110 of file pricingprob.c.

References GCGpricingprobExitPricing(), i, GCG_PricingProb::ncolsround, and GCG_PricingProb::nimpcols.

Referenced by gcg::Pricingcontroller::exitPricing(), and GCGpricingprobExitPricing().

◆ GCGpricingprobAddGenericBranchData()

SCIP_RETCODE GCGpricingprobAddGenericBranchData ( GCG * gcg,
GCG_PRICINGPROB * pricingprob,
SCIP_CONS * branchcons,
SCIP_Real branchdual )

add generic branching data (constraint and dual value) to the current pricing problem

Parameters
gcgGCG data structure (master problem)
pricingprobpricing problem structure
branchconsgeneric branching constraint
branchdualcorresponding dual solution value

Definition at line 125 of file pricingprob.c.

References assert(), GCG_PricingProb::branchconsidx, GCG_PricingProb::branchconss, GCG_PricingProb::branchconsssize, GCG_PricingProb::branchduals, GCGgetMasterprob(), GCGpricingprobAddGenericBranchData(), GCG_PricingProb::nbranchconss, and SCIP_CALL().

Referenced by GCGpricingprobAddGenericBranchData().

◆ GCGpricingprobReset()

void GCGpricingprobReset ( GCG * gcg,
GCG_PRICINGPROB * pricingprob )

reset the pricing problem statistics for the current pricing round

Parameters
gcgGCG data structure (master problem)
pricingprobpricing problem structure

Definition at line 164 of file pricingprob.c.

References assert(), GCG_PricingProb::branchconsidx, GCG_PRICINGSTATUS_UNKNOWN, GCGgetMasterprob(), GCGpricingprobReset(), GCG_PricingProb::lowerbound, GCG_PricingProb::nbranchconss, GCG_PricingProb::nimpcols, GCG_PricingProb::nsolves, and GCG_PricingProb::status.

Referenced by GCGpricingprobReset(), and gcg::Pricingcontroller::setupPriorityQueue().

◆ GCGpricingprobUpdate()

void GCGpricingprobUpdate ( GCG * gcg,
GCG_PRICINGPROB * pricingprob,
GCG_PRICINGSTATUS status,
SCIP_Real lowerbound,
int nimpcols )

update solution information of a pricing problem

Parameters
gcgGCG data structure (master problem)
pricingprobpricing problem structure
statusstatus of last pricing job
lowerboundnew lower bound
nimpcolsnumber of new improving columns

Definition at line 178 of file pricingprob.c.

References GCG_PRICINGSTATUS_NOTAPPLICABLE, GCGgetMasterprob(), GCGpricingprobUpdate(), GCG_PricingProb::lowerbound, GCG_PricingProb::nimpcols, GCG_PricingProb::nsolves, and GCG_PricingProb::status.

Referenced by GCGpricingprobUpdate(), and gcg::Pricingcontroller::updatePricingprob().

◆ GCGpricingprobGetProbnr()

◆ GCGpricingprobGetGenericBranchData()

void GCGpricingprobGetGenericBranchData ( GCG_PRICINGPROB * pricingprob,
SCIP_CONS *** branchconss,
SCIP_Real ** branchduals,
int * nbranchconss )

get generic branching data corresponding to the pricing problem

Parameters
pricingprobpricing problem structure
branchconsspointer to store branching constraints array, or NULL
branchdualspointer to store array of corresponding dual values, or NULL
nbranchconsspointer to store number of generic branching constraints, or NULL

Definition at line 216 of file pricingprob.c.

References GCG_PricingProb::branchconss, GCG_PricingProb::branchduals, GCGpricingprobGetGenericBranchData(), and GCG_PricingProb::nbranchconss.

Referenced by ObjPricerGcg::computeRedCostGcgCol(), and GCGpricingprobGetGenericBranchData().

◆ GCGpricingprobGetNGenericBranchconss()

int GCGpricingprobGetNGenericBranchconss ( GCG_PRICINGPROB * pricingprob)

get the number of generic branching constraints corresponding to the pricing problem

Parameters
pricingprobpricing problem structure

Definition at line 232 of file pricingprob.c.

References GCGpricingprobGetNGenericBranchconss(), and GCG_PricingProb::nbranchconss.

Referenced by GCGpricingprobGetNGenericBranchconss(), and gcg::Pricingcontroller::initPricing().

◆ GCGpricingprobGetBranchconsIdx()

int GCGpricingprobGetBranchconsIdx ( GCG_PRICINGPROB * pricingprob)

get index of current generic branching constraint considered the pricing problem

Parameters
pricingprobpricing problem structure

Definition at line 240 of file pricingprob.c.

References GCG_PricingProb::branchconsidx, and GCGpricingprobGetBranchconsIdx().

Referenced by GCGpricingprobGetBranchconsIdx().

◆ GCGpricingprobBranchconsIsAdded()

SCIP_Bool GCGpricingprobBranchconsIsAdded ( GCG_PRICINGPROB * pricingprob)

check if the current generic branching constraint has already been added

Parameters
pricingprobpricing problem structure

Definition at line 248 of file pricingprob.c.

References GCG_PricingProb::consisadded, and GCGpricingprobBranchconsIsAdded().

Referenced by GCGpricingprobBranchconsIsAdded().

◆ GCGpricingprobMarkBranchconsAdded()

void GCGpricingprobMarkBranchconsAdded ( GCG_PRICINGPROB * pricingprob)

mark the current generic branching constraint to be added

Parameters
pricingprobpricing problem structure

Definition at line 256 of file pricingprob.c.

References GCG_PricingProb::consisadded, and GCGpricingprobMarkBranchconsAdded().

Referenced by GCGpricingprobMarkBranchconsAdded().

◆ GCGpricingprobNextBranchcons()

void GCGpricingprobNextBranchcons ( GCG_PRICINGPROB * pricingprob)

add the information that the next branching constraint must be added

Parameters
pricingprobpricing problem structure

Definition at line 264 of file pricingprob.c.

References assert(), GCG_PricingProb::branchconsidx, GCG_PricingProb::consisadded, GCG_PRICINGSTATUS_UNKNOWN, GCGpricingprobNextBranchcons(), and GCG_PricingProb::status.

Referenced by GCGpricingprobNextBranchcons(), and gcg::Pricingcontroller::pricingprobNextBranchcons().

◆ GCGpricingprobGetStatus()

GCG_PRICINGSTATUS GCGpricingprobGetStatus ( GCG_PRICINGPROB * pricingprob)

get the status of a pricing problem

Parameters
pricingprobpricing problem structure

Definition at line 275 of file pricingprob.c.

References GCGpricingprobGetStatus(), and GCG_PricingProb::status.

Referenced by gcg::Pricingcontroller::collectResults(), and GCGpricingprobGetStatus().

◆ GCGpricingprobGetLowerbound()

SCIP_Real GCGpricingprobGetLowerbound ( GCG_PRICINGPROB * pricingprob)

get the lower bound of a pricing problem

Parameters
pricingprobpricing problem structure

Definition at line 283 of file pricingprob.c.

References GCGpricingprobGetLowerbound(), and GCG_PricingProb::lowerbound.

Referenced by gcg::Pricingcontroller::collectResults(), and GCGpricingprobGetLowerbound().

◆ GCGpricingprobGetNImpCols()

int GCGpricingprobGetNImpCols ( GCG_PRICINGPROB * pricingprob)

get the number of improving columns found for this pricing problem

Parameters
pricingprobpricing problem structure

Definition at line 291 of file pricingprob.c.

References GCGpricingprobGetNImpCols(), and GCG_PricingProb::nimpcols.

Referenced by gcg::Pricingcontroller::collectResults(), and GCGpricingprobGetNImpCols().

◆ GCGpricingprobGetNSolves()

int GCGpricingprobGetNSolves ( GCG_PRICINGPROB * pricingprob)

get the number of times the pricing problem was solved during the loop

Parameters
pricingprobpricing problem structure

Definition at line 299 of file pricingprob.c.

References GCGpricingprobGetNSolves(), and GCG_PricingProb::nsolves.

Referenced by GCGpricingprobGetNSolves().

◆ GCGpricingprobGetNColsLastRounds()

int GCGpricingprobGetNColsLastRounds ( GCG_PRICINGPROB * pricingprob,
int nroundscol )

get the total number of improving columns found in the last pricing rounds

get the total number of improving colums found in the last pricing rounds

Parameters
pricingprobpricing problem structure
nroundscolnumber of previous pricing rounds for which the number of improving columns should be counted

Definition at line 307 of file pricingprob.c.

References GCGpricingprobGetNColsLastRounds(), i, and GCG_PricingProb::ncolsround.

Referenced by GCGpricingjobSetup(), and GCGpricingprobGetNColsLastRounds().