GCG 4.1.1 (dev)

Generic Column Generation

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

Detailed Description

methods for working with pricing jobs

Author
Christian Puchert

Various methods to work with pricing jobs

Definition in file pricingjob.c.

#include "gcg/pricingjob.h"
#include "gcg/pub_gcgcol.h"
#include "gcg/pub_pricingjob.h"
#include "gcg/gcg.h"
#include "gcg/pricer_gcg.h"
#include "gcg/pub_pricingprob.h"
#include "gcg/pub_solver.h"
#include "scip/scip.h"

Go to the source code of this file.

Functions

SCIP_RETCODE GCGpricingjobCreate (GCG *gcg, GCG_PRICINGJOB **pricingjob, GCG_PRICINGPROB *pricingprob, GCG_SOLVER *solver, int chunk)
void GCGpricingjobFree (GCG *gcg, GCG_PRICINGJOB **pricingjob)
SCIP_RETCODE GCGpricingjobSetup (GCG *gcg, GCG_PRICINGJOB *pricingjob, SCIP_Bool heuristic, int scoring, int nroundscol, SCIP_Real dualsolconv, int npointsprob, int nraysprob)
GCG_PRICINGPROB * GCGpricingjobGetPricingprob (GCG_PRICINGJOB *pricingjob)
GCG_SOLVER * GCGpricingjobGetSolver (GCG_PRICINGJOB *pricingjob)
void GCGpricingjobResetSolver (GCG *gcg, GCG_PRICINGJOB *pricingjob)
void GCGpricingjobNextSolver (GCG *gcg, GCG_PRICINGJOB *pricingjob)
SCIP_Bool GCGpricingjobSolverChanged (GCG_PRICINGJOB *pricingjob)
void GCGpricingjobSolverCalled (GCG_PRICINGJOB *pricingjob)
SCIP_Real GCGpricingjobGetChunk (GCG_PRICINGJOB *pricingjob)
SCIP_Real GCGpricingjobGetScore (GCG_PRICINGJOB *pricingjob)
SCIP_Bool GCGpricingjobIsHeuristic (GCG_PRICINGJOB *pricingjob)
void GCGpricingjobSetExact (GCG_PRICINGJOB *pricingjob)
void GCGpricingjobResetHeuristic (GCG_PRICINGJOB *pricingjob)
void GCGpricingjobIncreaseNHeurIters (GCG_PRICINGJOB *pricingjob)
int GCGpricingjobGetNHeurIters (GCG_PRICINGJOB *pricingjob)

Function Documentation

◆ GCGpricingjobCreate()

SCIP_RETCODE GCGpricingjobCreate ( GCG * gcg,
GCG_PRICINGJOB ** pricingjob,
GCG_PRICINGPROB * pricingprob,
GCG_SOLVER * solver,
int chunk )

create a pricing job

Parameters
gcgGCG data structure
pricingjobpricing job to be created
pricingprobdata structure of the corresponding pricing problem
solverpricing solver responsible for the pricing job
chunkchunk that the pricing problem should belong to

Definition at line 52 of file pricingjob.c.

References GCGgetMasterprob(), GCGpricingjobCreate(), masterprob, and SCIP_CALL().

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

◆ GCGpricingjobFree()

void GCGpricingjobFree ( GCG * gcg,
GCG_PRICINGJOB ** pricingjob )

free a pricing job

Parameters
gcgGCG data structure
pricingjobpricing job to be freed

Definition at line 75 of file pricingjob.c.

References GCGgetMasterprob(), GCGpricingjobFree(), and masterprob.

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

◆ GCGpricingjobSetup()

SCIP_RETCODE GCGpricingjobSetup ( GCG * gcg,
GCG_PRICINGJOB * pricingjob,
SCIP_Bool heuristic,
int scoring,
int nroundscol,
SCIP_Real dualsolconv,
int npointsprob,
int nraysprob )

setup a pricing job at the beginning of the pricing loop

The solver in the pricing job is reset during this call. This is to ensure that a valid solver is available for the pricing job. In some cases, such as when columns could not be found from a particular solver, the solver could be set to NULL. As such, the highest priority solver is assigned to the pricing job in this function.

setup a pricing job at the beginning of the pricing loop

Parameters
gcgGCG data structure
pricingjobpricing job
heuristicis heuristic pricing still possible at the current solving stage
scoringscoring parameter
nroundscolnumber of previous pricing rounds for which the number of improving columns should be counted
dualsolconvdual solution value of corresponding convexity constraint
npointsprobtotal number of extreme points generated so far by the pricing problem
nraysprobtotal number of extreme rays generated so far by the pricing problem

Definition at line 91 of file pricingjob.c.

References assert(), GCGpricingjobGetPricingprob(), GCGpricingjobResetHeuristic(), GCGpricingjobResetSolver(), GCGpricingjobSetExact(), GCGpricingjobSetup(), GCGpricingprobGetNColsLastRounds(), GCGpricingprobGetProbnr(), GCGsolverIsHeurEnabled(), GCG_PricingJob::score, and GCG_PricingJob::solver.

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

◆ GCGpricingjobGetSolver()

GCG_SOLVER * GCGpricingjobGetSolver ( GCG_PRICINGJOB * pricingjob)

get the pricing solver with which the pricing job is to be performed

Parameters
pricingjobpricing job

Definition at line 142 of file pricingjob.c.

References GCGpricingjobGetSolver(), and GCG_PricingJob::solver.

Referenced by gcg::Pricingcontroller::evaluatePricingjob(), GCGpricingjobGetSolver(), ObjPricerGcg::pricingLoop(), and gcg::SCIP_DECL_SORTPTRCOMP().

◆ GCGpricingjobResetSolver()

void GCGpricingjobResetSolver ( GCG * gcg,
GCG_PRICINGJOB * pricingjob )

reset the pricing solver to be used to the one with the highest priority

Parameters
gcgGCG data structure
pricingjobpricing job

Definition at line 150 of file pricingjob.c.

References assert(), GCGpricerGetNSolvers(), GCGpricerGetSolvers(), GCGpricingjobResetSolver(), GCGsolverIsExactEnabled(), GCGsolverIsHeurEnabled(), i, GCG_PricingJob::solver, and GCG_PricingJob::solverchanged.

Referenced by GCGpricingjobResetSolver(), and GCGpricingjobSetup().

◆ GCGpricingjobNextSolver()

void GCGpricingjobNextSolver ( GCG * gcg,
GCG_PRICINGJOB * pricingjob )

get the next pricing solver to be used, or NULL of there is none

Parameters
gcgGCG data structure
pricingjobpricing job

Definition at line 180 of file pricingjob.c.

References assert(), GCGpricerGetNSolvers(), GCGpricerGetSolvers(), GCGpricingjobNextSolver(), GCGsolverIsExactEnabled(), GCGsolverIsHeurEnabled(), i, GCG_PricingJob::solver, and GCG_PricingJob::solverchanged.

Referenced by gcg::Pricingcontroller::evaluatePricingjob(), and GCGpricingjobNextSolver().

◆ GCGpricingjobSolverChanged()

SCIP_Bool GCGpricingjobSolverChanged ( GCG_PRICINGJOB * pricingjob)

returns TRUE iff the solver was changed after the last solver call

Parameters
pricingjobpricing job

Definition at line 216 of file pricingjob.c.

References GCGpricingjobSolverChanged(), and GCG_PricingJob::solverchanged.

Referenced by GCGpricingjobSolverChanged().

◆ GCGpricingjobSolverCalled()

void GCGpricingjobSolverCalled ( GCG_PRICINGJOB * pricingjob)

inform the pricing job that the current solver was called

Parameters
pricingjobpricing job

Definition at line 224 of file pricingjob.c.

References GCGpricingjobSolverCalled(), and GCG_PricingJob::solverchanged.

Referenced by GCGpricingjobSolverCalled().

◆ GCGpricingjobGetChunk()

SCIP_Real GCGpricingjobGetChunk ( GCG_PRICINGJOB * pricingjob)

get the chunk of a pricing job

Parameters
pricingjobpricing job

Definition at line 232 of file pricingjob.c.

References GCG_PricingJob::chunk, and GCGpricingjobGetChunk().

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

◆ GCGpricingjobGetScore()

SCIP_Real GCGpricingjobGetScore ( GCG_PRICINGJOB * pricingjob)

get the score of a pricing job

Parameters
pricingjobpricing job

Definition at line 240 of file pricingjob.c.

References GCGpricingjobGetScore(), and GCG_PricingJob::score.

Referenced by GCGpricingjobGetScore(), and gcg::SCIP_DECL_SORTPTRCOMP().

◆ GCGpricingjobIsHeuristic()

SCIP_Bool GCGpricingjobIsHeuristic ( GCG_PRICINGJOB * pricingjob)

return whether the pricing job is to be performed heuristically

Parameters
pricingjobpricing job

Definition at line 248 of file pricingjob.c.

References GCGpricingjobIsHeuristic(), and GCG_PricingJob::heuristic.

Referenced by gcg::Pricingcontroller::evaluatePricingjob(), GCGpricingjobIsHeuristic(), ObjPricerGcg::pricingLoop(), and gcg::SCIP_DECL_SORTPTRCOMP().

◆ GCGpricingjobSetExact()

void GCGpricingjobSetExact ( GCG_PRICINGJOB * pricingjob)

set the pricing job to be performed exactly

Parameters
pricingjobpricing job

Definition at line 256 of file pricingjob.c.

References GCGpricingjobSetExact(), and GCG_PricingJob::heuristic.

Referenced by gcg::Pricingcontroller::evaluatePricingjob(), GCGpricingjobSetExact(), and GCGpricingjobSetup().

◆ GCGpricingjobResetHeuristic()

void GCGpricingjobResetHeuristic ( GCG_PRICINGJOB * pricingjob)

◆ GCGpricingjobIncreaseNHeurIters()

void GCGpricingjobIncreaseNHeurIters ( GCG_PRICINGJOB * pricingjob)

update number of heuristic pricing iterations of a pricing job

Parameters
pricingjobpricing job

Definition at line 276 of file pricingjob.c.

References GCGpricingjobIncreaseNHeurIters(), GCG_PricingJob::heuristic, and GCG_PricingJob::nheuriters.

Referenced by gcg::Pricingcontroller::evaluatePricingjob(), and GCGpricingjobIncreaseNHeurIters().

◆ GCGpricingjobGetNHeurIters()

int GCGpricingjobGetNHeurIters ( GCG_PRICINGJOB * pricingjob)

get the number of heuristic pricing iterations of the pricing job

Parameters
pricingjobpricing job

Definition at line 285 of file pricingjob.c.

References GCGpricingjobGetNHeurIters(), and GCG_PricingJob::nheuriters.

Referenced by gcg::Pricingcontroller::evaluatePricingjob(), GCGpricingjobGetNHeurIters(), and gcg::SCIP_DECL_SORTPTRCOMP().