Scippy

GCG

Branch-and-Price & Column Generation for Everyone

solver.h File Reference

Detailed Description

public methods for GCG pricing solvers

private methods for GCG pricing solvers

Author
Christian Puchert
Henri Lotze
Christian Puchert

Definition in file solver.h.

#include "gcg/type_solver.h"
#include "scip/scip.h"

Go to the source code of this file.

Functions

GCG_EXPORT SCIP_RETCODE GCGsolverCreate (GCG *gcg, GCG_SOLVER **solver, const char *name, const char *desc, int priority, SCIP_Bool heurenabled, SCIP_Bool exactenabled, GCG_DECL_SOLVERUPDATE((*solverupdate)), GCG_DECL_SOLVERSOLVE((*solversolve)), GCG_DECL_SOLVERSOLVEHEUR((*solveheur)), GCG_DECL_SOLVERFREE((*solverfree)), GCG_DECL_SOLVERINIT((*solverinit)), GCG_DECL_SOLVEREXIT((*solverexit)), GCG_DECL_SOLVERINITSOL((*solverinitsol)), GCG_DECL_SOLVEREXITSOL((*solverexitsol)), GCG_SOLVERDATA *solverdata)
 
GCG_EXPORT SCIP_RETCODE GCGsolverFree (GCG *gcg, GCG_SOLVER **solver)
 
GCG_EXPORT SCIP_RETCODE GCGsolverInit (GCG *gcg, GCG_SOLVER *solver)
 
GCG_EXPORT SCIP_RETCODE GCGsolverExit (GCG *gcg, GCG_SOLVER *solver)
 
GCG_EXPORT SCIP_RETCODE GCGsolverInitsol (GCG *gcg, GCG_SOLVER *solver)
 
GCG_EXPORT SCIP_RETCODE GCGsolverExitsol (GCG *gcg, GCG_SOLVER *solver)
 
GCG_EXPORT SCIP_RETCODE GCGsolverUpdate (GCG *gcg, SCIP *pricingprob, GCG_SOLVER *solver, int probnr, SCIP_Bool varobjschanged, SCIP_Bool varbndschanged, SCIP_Bool consschanged)
 
GCG_EXPORT SCIP_RETCODE GCGsolverSolve (GCG *gcg, SCIP *pricingprob, GCG_SOLVER *solver, SCIP_Bool redcost, SCIP_Bool heuristic, int probnr, SCIP_Real dualsolconv, SCIP_Real *lowerbound, GCG_PRICINGSTATUS *status, SCIP_Bool *solved)
 

Function Documentation

◆ GCGsolverCreate()

GCG_EXPORT SCIP_RETCODE GCGsolverCreate ( GCG *  gcg,
GCG_SOLVER **  solver,
const char *  name,
const char *  desc,
int  priority,
SCIP_Bool  heurenabled,
SCIP_Bool  exactenabled,
GCG_DECL_SOLVERUPDATE((*solverupdate))  ,
GCG_DECL_SOLVERSOLVE((*solversolve))  ,
GCG_DECL_SOLVERSOLVEHEUR((*solveheur))  ,
GCG_DECL_SOLVERFREE((*solverfree))  ,
GCG_DECL_SOLVERINIT((*solverinit))  ,
GCG_DECL_SOLVEREXIT((*solverexit))  ,
GCG_DECL_SOLVERINITSOL((*solverinitsol))  ,
GCG_DECL_SOLVEREXITSOL((*solverexitsol))  ,
GCG_SOLVERDATA *  solverdata 
)

creates a GCG pricing solver

Parameters
gcgGCG data structure
solverpointer to pricing solver data structure
namename of solver
descdescription of solver
prioritypriority of solver
heurenabledflag to indicate whether heuristic solving method of the solver is enabled
exactenabledflag to indicate whether exact solving method of the solver is enabled
solverdatapricing solver data

Definition at line 64 of file solver.c.

References BMSduplicateMemoryArray, FALSE, GCGgetMasterprob(), GCGgetOrigprob(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddIntParam(), SCIPallocMemory, SCIPcreateCPUClock(), SCIPsnprintf(), and SCIPwarningMessage().

Referenced by GCGpricerIncludeSolver().

◆ GCGsolverFree()

GCG_EXPORT SCIP_RETCODE GCGsolverFree ( GCG *  gcg,
GCG_SOLVER **  solver 
)

calls destructor and frees memory of GCG pricing solver

Parameters
gcgGCG data structure
solverpointer to pricing solver data structure

Definition at line 152 of file solver.c.

References BMSfreeMemoryArray, GCGgetMasterprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeClock(), and SCIPfreeMemory.

◆ GCGsolverInit()

◆ GCGsolverExit()

GCG_EXPORT SCIP_RETCODE GCGsolverExit ( GCG *  gcg,
GCG_SOLVER *  solver 
)

calls exit method of GCG pricing solver

Parameters
gcgGCG data structure
solverpricing solver

Definition at line 218 of file solver.c.

References NULL, SCIP_CALL, and SCIP_OKAY.

◆ GCGsolverInitsol()

GCG_EXPORT SCIP_RETCODE GCGsolverInitsol ( GCG *  gcg,
GCG_SOLVER *  solver 
)

calls solving process initialization method of GCG pricing solver

Parameters
gcgGCG data structure
solverpricing solver

Definition at line 235 of file solver.c.

References NULL, SCIP_CALL, and SCIP_OKAY.

◆ GCGsolverExitsol()

GCG_EXPORT SCIP_RETCODE GCGsolverExitsol ( GCG *  gcg,
GCG_SOLVER *  solver 
)

calls solving process deinitialization method of GCG pricing solver

Parameters
gcgGCG data structure
solverpricing solver

Definition at line 252 of file solver.c.

References NULL, SCIP_CALL, and SCIP_OKAY.

◆ GCGsolverUpdate()

GCG_EXPORT SCIP_RETCODE GCGsolverUpdate ( GCG *  gcg,
SCIP *  pricingprob,
GCG_SOLVER *  solver,
int  probnr,
SCIP_Bool  varobjschanged,
SCIP_Bool  varbndschanged,
SCIP_Bool  consschanged 
)

calls update method of GCG pricing solver

Parameters
gcgGCG data structure
pricingprobthe pricing problem that should be solved
solverpricing solver
probnrnumber of the pricing problem
varobjschangedhave the objective coefficients changed?
varbndschangedhave the lower and upper bounds changed?
consschangedhave the constraints changed?

Definition at line 269 of file solver.c.

References NULL, SCIP_CALL, and SCIP_OKAY.

◆ GCGsolverSolve()

GCG_EXPORT SCIP_RETCODE GCGsolverSolve ( GCG *  gcg,
SCIP *  pricingprob,
GCG_SOLVER *  solver,
SCIP_Bool  redcost,
SCIP_Bool  heuristic,
int  probnr,
SCIP_Real  dualsolconv,
SCIP_Real *  lowerbound,
GCG_PRICINGSTATUS *  status,
SCIP_Bool *  solved 
)

calls heuristic or exact solving method of GCG pricing solver

calls heuristic or exact solving method of GCG pricing solver

Note
This method has to be threadsafe!
Parameters
gcgGCG data structure
pricingprobthe pricing problem that should be solved
solverpricing solver
redcostis reduced cost (TRUE) or Farkas (FALSE) pricing performed?
heuristicshall the pricing problem be solved heuristically?
probnrnumber of the pricing problem
dualsolconvdual solution of the corresponding convexity constraint
lowerboundpointer to store lower bound of pricing problem
statuspointer to store the returned pricing status
solvedpointer to store whether the solution method was called

Definition at line 293 of file solver.c.

References GCG_Solver::exactenabled, FALSE, GCG_PRICINGSTATUS_NOTAPPLICABLE, GCGgetMasterprob(), GCG_Solver::heurenabled, GCG_Solver::heurfarkascalls, GCG_Solver::heurfarkasclock, GCG_Solver::heurredcostcalls, GCG_Solver::heurredcostclock, NULL, GCG_Solver::optfarkascalls, GCG_Solver::optfarkasclock, GCG_Solver::optredcostcalls, GCG_Solver::optredcostclock, SCIP_CALL, SCIP_CALL_ABORT, SCIP_OKAY, SCIPstartClock(), SCIPstopClock(), and TRUE.