Detailed Description
gcg solver for pricing problem
Definition in file solver_gcg.cpp.
#include "scip/scip.h"#include "gcg/gcg.h"#include "gcg/objpricer_gcg.h"#include "gcg/solver_gcg.h"#include "gcg/gcgplugins.h"#include "gcg/struct_solver.h"#include "gcg/solver_mip.h"#include "gcg/cons_decomp.h"#include "gcg/cons_decomp.hpp"#include "gcg/pub_solver.h"#include "gcg/pricer_gcg.h"#include "gcg/relax_gcg.h"#include "gcg/cons_origbranch.h"#include "gcg/class_partialdecomp.h"#include "scip/scip_timing.h"#include "gcg/struct_decomp.h"#include "gcg/class_detprobdata.h"#include "gcg/pub_gcg.hpp"Go to the source code of this file.
Data Structures | |
| struct | GCG_SolverData |
Macros | |
| #define | SUBGCG_DEBUG_ITER -1 |
| #define | SOLVER_NAME "gcg" |
| #define | SOLVER_DESC "gcg solver for pricing problems" |
| #define | SOLVER_PRIORITY 110 |
| #define | SOLVER_ENABLED TRUE |
| #define | SOLVER_HEU_ENABLED TRUE |
| #define | DEFAULT_MAX_RECURSION_DEPTH 0 |
| #define | DEFAULT_CHECKSOLS TRUE |
| #define | DEFAULT_STARTNODELIMIT 1000LL |
| #define | DEFAULT_STARTSTALLNODELIMIT 100LL |
| #define | DEFAULT_STARTGAPLIMIT 0.2 |
| #define | DEFAULT_STARTSOLLIMIT 10 |
| #define | DEFAULT_NODELIMITFAC 1.25 |
| #define | DEFAULT_STALLNODELIMITFAC 1.25 |
| #define | DEFAULT_GAPLIMITFAC 0.8 |
| #define | DEFAULT_SOLLIMITFAC 1.5 |
| #define | DEFAULT_SETTINGSFILE "-" |
| #define | DEFAULT_PRESOL_MAX_ROUNDS 0 |
| #define | DEFAULT_ENABLE_WARNINGS FALSE |
| #define | solverInitGcg NULL |
| #define | solverExitGcg NULL |
Functions | |
| static SCIP_RETCODE | solverGcgPrepareNestedSolver (GCG_SOLVERDATA *solverdata, GCG_SOLVER *nestedsolver) |
| static SCIP_RETCODE | adjustSettings (GCG_SOLVERDATA *solverdata, SCIP *pricingprob, GCG *subgcg, SCIP *subgcgorig) |
| static SCIP_RETCODE | buildProblem (GCG *gcg, GCG_SOLVERDATA *solverdata, SCIP *pricingprob, int probnr) |
| static SCIP_RETCODE | updateVars (SCIP *scip, GCG_SOLVERDATA *solverdata, SCIP *pricingprob, int probnr, SCIP_Bool varobjschanged, SCIP_Bool varbndschanged) |
| static SCIP_RETCODE | updateBranchingConss (SCIP *scip, GCG_SOLVERDATA *solverdata, SCIP *pricingprob, int probnr) |
| static SCIP_RETCODE | solveProblem (GCG *gcg, SCIP *pricingprob, GCG *subgcg, int probnr, GCG_SOLVERDATA *solverdata, SCIP_Real *lowerbound, GCG_PRICINGSTATUS *status) |
| static | GCG_DECL_SOLVERFREE (solverFreeGcg) |
| static SCIP_RETCODE | freeBlockMemory (GCG *gcg, GCG_SOLVERDATA *solverdata) |
| static | GCG_DECL_SOLVERINITSOL (solverInitsolGcg) |
| static | GCG_DECL_SOLVEREXITSOL (solverExitsolGcg) |
| static | GCG_DECL_SOLVERSOLVE (solverSolveGcg) |
| static | GCG_DECL_SOLVERSOLVEHEUR (solverSolveHeurGcg) |
| static | GCG_DECL_SOLVERUPDATE (solverUpdateGcg) |
| SCIP_RETCODE | GCGincludeSolverGcg (GCG *gcg) |
Macro Definition Documentation
◆ SUBGCG_DEBUG_ITER
| #define SUBGCG_DEBUG_ITER -1 |
Definition at line 41 of file solver_gcg.cpp.
Referenced by solveProblem().
◆ SOLVER_NAME
| #define SOLVER_NAME "gcg" |
Definition at line 66 of file solver_gcg.cpp.
◆ SOLVER_DESC
| #define SOLVER_DESC "gcg solver for pricing problems" |
Definition at line 67 of file solver_gcg.cpp.
◆ SOLVER_PRIORITY
| #define SOLVER_PRIORITY 110 |
Definition at line 68 of file solver_gcg.cpp.
◆ SOLVER_ENABLED
| #define SOLVER_ENABLED TRUE |
indicates whether the exact solving method of the solver should be enabled
Definition at line 70 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg().
◆ SOLVER_HEU_ENABLED
| #define SOLVER_HEU_ENABLED TRUE |
indicates whether the heuristic solving method of the solver should be enabled
Definition at line 71 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg().
◆ DEFAULT_MAX_RECURSION_DEPTH
| #define DEFAULT_MAX_RECURSION_DEPTH 0 |
Definition at line 73 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg().
◆ DEFAULT_CHECKSOLS
| #define DEFAULT_CHECKSOLS TRUE |
should solutions be checked extensively
Definition at line 74 of file solver_gcg.cpp.
◆ DEFAULT_STARTNODELIMIT
| #define DEFAULT_STARTNODELIMIT 1000LL |
start node limit for heuristic pricing
Definition at line 75 of file solver_gcg.cpp.
◆ DEFAULT_STARTSTALLNODELIMIT
| #define DEFAULT_STARTSTALLNODELIMIT 100LL |
start stalling node limit for heuristic pricing
Definition at line 76 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg(), and GCGincludeSolverMip().
◆ DEFAULT_STARTGAPLIMIT
| #define DEFAULT_STARTGAPLIMIT 0.2 |
start gap limit for heuristic pricing
Definition at line 77 of file solver_gcg.cpp.
◆ DEFAULT_STARTSOLLIMIT
| #define DEFAULT_STARTSOLLIMIT 10 |
start solution limit for heuristic pricing
Definition at line 78 of file solver_gcg.cpp.
◆ DEFAULT_NODELIMITFAC
| #define DEFAULT_NODELIMITFAC 1.25 |
factor by which to increase node limit for heuristic pricing
Definition at line 79 of file solver_gcg.cpp.
◆ DEFAULT_STALLNODELIMITFAC
| #define DEFAULT_STALLNODELIMITFAC 1.25 |
factor by which to increase stalling node limit for heuristic pricing
Definition at line 80 of file solver_gcg.cpp.
◆ DEFAULT_GAPLIMITFAC
| #define DEFAULT_GAPLIMITFAC 0.8 |
factor by which to decrease gap limit for heuristic pricing
Definition at line 81 of file solver_gcg.cpp.
◆ DEFAULT_SOLLIMITFAC
| #define DEFAULT_SOLLIMITFAC 1.5 |
factor by which to increase solution limit for heuristic pricing
Definition at line 82 of file solver_gcg.cpp.
◆ DEFAULT_SETTINGSFILE
| #define DEFAULT_SETTINGSFILE "-" |
settings file to be applied in pricing problems
Definition at line 83 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg(), and GCGincludeSolverMip().
◆ DEFAULT_PRESOL_MAX_ROUNDS
| #define DEFAULT_PRESOL_MAX_ROUNDS 0 |
default maximal number of presolving rounds
Definition at line 84 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg().
◆ DEFAULT_ENABLE_WARNINGS
| #define DEFAULT_ENABLE_WARNINGS FALSE |
should warnings (of pricing problems) be enabled by default
Definition at line 85 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg(), and GCGincludeSolverMip().
◆ solverInitGcg
| #define solverInitGcg NULL |
initialization method of pricing solver (called after problem was transformed and solver is active)
Definition at line 929 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg().
◆ solverExitGcg
| #define solverExitGcg NULL |
deinitialization method of pricing solver (called before transformed problem is freed and solver is active)
Definition at line 932 of file solver_gcg.cpp.
Referenced by GCGincludeSolverGcg().
Function Documentation
◆ solverGcgPrepareNestedSolver()
|
static |
prepares a nested solver by copying parameteters and increasing the depth
- Parameters
-
solverdata (outer) solver data structure nestedsolver nested GCG solver
Definition at line 143 of file solver_gcg.cpp.
References GCG_SolverData::checksols, GCG_SolverData::depth, GCG_SolverData::enablewarnings, GCG_SolverData::gaplimitfac, GCGsolverGetData(), GCG_SolverData::maxdepth, GCG_SolverData::nodelimitfac, GCG_SolverData::origprob, GCG_SolverData::presolmaxrounds, SCIP_CALL(), GCG_SolverData::settingsfile, GCG_SolverData::sollimitfac, solverGcgPrepareNestedSolver(), GCG_SolverData::stallnodelimitfac, GCG_SolverData::startgaplimit, GCG_SolverData::startnodelimit, GCG_SolverData::startsollimit, and GCG_SolverData::startstallnodelimit.
Referenced by buildProblem(), and solverGcgPrepareNestedSolver().
◆ adjustSettings()
|
static |
adjusts settings of the gcg instance used to solve a given pricing problem
- Parameters
-
solverdata solver data structure pricingprob pricing problem subgcg subgcg data structure subgcgorig subgcg origprob
Definition at line 173 of file solver_gcg.cpp.
References adjustSettings(), GCG_SolverData::presolmaxrounds, and SCIP_CALL().
Referenced by adjustSettings(), and buildProblem().
◆ buildProblem()
|
static |
creates and initializes the GCG data structure for a given pricing problem, calls the detection if necessary
- Parameters
-
gcg GCG data structure solverdata solver data structure pricingprob pricing problem probnr problem number
Definition at line 250 of file solver_gcg.cpp.
References adjustSettings(), assert(), buildProblem(), gcg::BLOCK_STRUCTURE::createPartialdec(), GCG_SolverData::enablewarnings, GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompGetPartialdecFromID(), GCGcreate(), GCGdetectStructure(), GCGfree(), GCGgetObjPricer(), GCGgetOrigprob(), GCGgetStructDecomp(), gcg::PARTIALDECOMP::getBlockStructure(), gcg::PARTIALDECOMP::getDetprobdata(), ObjPricerGcg::getNumSolvers(), gcg::DETPROBDATA::getScip(), ObjPricerGcg::getSolvers(), i, gcg::PARTIALDECOMP::isNested(), GCG_Solver::name, GCG_SolverData::nbasicpricingconss, GCG_SolverData::origprob, GCG_Decomp::partialdecid, SCIP_CALL(), SCIPdebugMessage(), GCG_SolverData::settingsfile, SOLVER_NAME, solverGcgPrepareNestedSolver(), GCG_SolverData::subgcgs, GCG_SolverData::translatesymmetry, and GCG_SolverData::varmaps.
Referenced by buildProblem(), and GCG_DECL_SOLVERINITSOL().
◆ updateVars()
|
static |
updates bounds and objective coefficients of variables in the given pricing problem
- Parameters
-
scip SCIP data structure solverdata solver data structure pricingprob pricing problem probnr problem number varobjschanged have the objective coefficients changed? varbndschanged have the lower and upper bounds changed?
Definition at line 401 of file solver_gcg.cpp.
References assert(), GCGgetOrigprob(), i, nvars, GCG_SolverData::subgcgs, GCG_SolverData::translatesymmetry, updateVars(), var, GCG_SolverData::varmaps, and vars.
Referenced by GCG_DECL_SOLVERUPDATE(), and updateVars().
◆ updateBranchingConss()
|
static |
updates branching constraints in the given pricing problem
- Parameters
-
scip SCIP data structure solverdata solver data structure pricingprob pricing problem probnr problem number
Definition at line 473 of file solver_gcg.cpp.
References c, GCGgetOrigprob(), GCG_SolverData::nbasicpricingconss, SCIP_CALL(), GCG_SolverData::subgcgs, updateBranchingConss(), and GCG_SolverData::varmaps.
Referenced by GCG_DECL_SOLVERUPDATE(), and updateBranchingConss().
◆ solveProblem()
|
static |
solves a given pricing problem with GCG
- Parameters
-
gcg GCG data structure pricingprob pricing problem SCIP data structure subgcg nested gcg pricing problem SCIP data structure probnr problem number solverdata solver data structure lowerbound pointer to store lower bound status pointer to store pricing problem status
Definition at line 544 of file solver_gcg.cpp.
References assert(), GCG_SolverData::checksols, GCG_SolverData::count, createColumnFromRay(), GCG_PRICINGSTATUS_INFEASIBLE, GCG_PRICINGSTATUS_OPTIMAL, GCG_PRICINGSTATUS_SOLVERLIMIT, GCG_PRICINGSTATUS_UNBOUNDED, GCG_PRICINGSTATUS_UNKNOWN, GCGconshdlrDecompFreeOrigOnExit(), GCGconshdlrDecompTranslateNBestOrigPartialdecs(), GCGgetOrigprob(), GCGpresolve(), GCGpricerAddCol(), GCGsolve(), GCGstashLimitSettings(), getColumnsFromPricingprob(), getPricingstatus(), GCG_SolverData::nrelpricingprobs, GCG_SolverData::origprob, GCG_SolverData::relpricingprobidxs, retcode, SCIP_CALL(), SCIPdebugMessage(), solveProblem(), SUBGCG_DEBUG_ITER, GCG_SolverData::translatesymmetry, and GCG_SolverData::varmaps.
Referenced by GCG_DECL_SOLVERSOLVE(), GCG_DECL_SOLVERSOLVEHEUR(), and solveProblem().
◆ GCG_DECL_SOLVERFREE()
|
static |
destructor of pricing solver to free user data (called when SCIP is exiting)
Definition at line 747 of file solver_gcg.cpp.
References assert(), GCG_DECL_SOLVERFREE, GCGgetDwMasterprob(), GCGsolverGetData(), GCGsolverSetData(), and SCIPfreeMemory().
◆ freeBlockMemory()
|
static |
Definition at line 765 of file solver_gcg.cpp.
References GCG_SolverData::curgaplimit, GCG_SolverData::curnodelimit, GCG_SolverData::cursollimit, GCG_SolverData::curstallnodelimit, freeBlockMemory(), GCGconshdlrDecompFreeDetprobdata(), GCGfree(), GCGgetMasterprob(), GCGisPricingprobRelevant(), i, masterprob, GCG_SolverData::nbasicpricingconss, GCG_SolverData::npricingprobs, GCG_SolverData::origprob, GCG_SolverData::relpricingprobidxs, SCIP_CALL(), GCG_SolverData::subgcgs, GCG_SolverData::translatesymmetry, and GCG_SolverData::varmaps.
Referenced by freeBlockMemory(), and GCG_DECL_SOLVEREXITSOL().
◆ GCG_DECL_SOLVERINITSOL()
|
static |
solving process initialization method of pricing solver (called when branch and bound process is about to begin)
Definition at line 824 of file solver_gcg.cpp.
References assert(), buildProblem(), GCG_SolverData::curgaplimit, GCG_SolverData::curnodelimit, GCG_SolverData::cursollimit, GCG_SolverData::curstallnodelimit, GCG_SolverData::depth, GCG_DECL_SOLVERINITSOL, GCGgetMasterprob(), GCGgetNPricingprobs(), GCGgetPricingprob(), GCGisPricingprobRelevant(), GCGsolverGetData(), i, j, masterprob, GCG_SolverData::maxdepth, GCG_SolverData::nbasicpricingconss, GCG_SolverData::npricingprobs, GCG_SolverData::nrelpricingprobs, GCG_SolverData::origprob, GCG_SolverData::relpricingprobidxs, SCIP_CALL(), SCIPdebugMessage(), GCG_SolverData::startgaplimit, GCG_SolverData::startnodelimit, GCG_SolverData::startsollimit, GCG_SolverData::startstallnodelimit, GCG_SolverData::subgcgs, GCG_SolverData::translatesymmetry, and GCG_SolverData::varmaps.
◆ GCG_DECL_SOLVEREXITSOL()
|
static |
solving process deinitialization method of pricing solver (called before branch and bound process data is freed)
Definition at line 897 of file solver_gcg.cpp.
References assert(), GCG_SolverData::count, GCG_SolverData::depth, freeBlockMemory(), GCG_DECL_SOLVEREXITSOL, GCGgetOrigprob(), GCGsolverGetData(), GCG_SolverData::origprob, and SCIP_CALL().
◆ GCG_DECL_SOLVERSOLVE()
|
static |
solving method for pricing solver which solves the pricing problem to optimality
Definition at line 936 of file solver_gcg.cpp.
References assert(), GCG_SolverData::count, GCG_DECL_SOLVERSOLVE, GCG_PRICINGSTATUS_NOTAPPLICABLE, GCGgetOrigprob(), GCGprintStatistics(), GCGsolverGetData(), GCG_SolverData::origprob, SCIP_CALL(), SCIPdebugMessage(), solveProblem(), and GCG_SolverData::subgcgs.
◆ GCG_DECL_SOLVERSOLVEHEUR()
|
static |
Definition at line 997 of file solver_gcg.cpp.
References assert(), GCG_SolverData::count, GCG_SolverData::curgaplimit, GCG_SolverData::curnodelimit, GCG_SolverData::cursollimit, GCG_SolverData::curstallnodelimit, GCG_SolverData::gaplimitfac, GCG_DECL_SOLVERSOLVEHEUR, GCG_PRICINGSTATUS_NOTAPPLICABLE, GCG_PRICINGSTATUS_UNKNOWN, GCGgetOrigprob(), GCGsolverGetData(), GCG_SolverData::nodelimitfac, GCG_SolverData::origprob, SCIP_CALL(), SCIPdebugMessage(), GCG_SolverData::sollimitfac, solveProblem(), GCG_SolverData::stallnodelimitfac, GCG_SolverData::startgaplimit, GCG_SolverData::startnodelimit, GCG_SolverData::startsollimit, GCG_SolverData::startstallnodelimit, and GCG_SolverData::subgcgs.
◆ GCG_DECL_SOLVERUPDATE()
|
static |
update method for pricing solver, used to update solver specific pricing problem data
Definition at line 1105 of file solver_gcg.cpp.
References assert(), GCG_SolverData::curgaplimit, GCG_SolverData::curnodelimit, GCG_SolverData::cursollimit, GCG_SolverData::curstallnodelimit, GCG_DECL_SOLVERUPDATE, GCGconshdlrDecompFreeOrigOnExit(), GCGgetOrigprob(), GCGsolverGetData(), GCG_SolverData::masterprob, GCG_SolverData::origprob, SCIP_CALL(), SCIPdebugMessage(), GCG_SolverData::startgaplimit, GCG_SolverData::startnodelimit, GCG_SolverData::startsollimit, GCG_SolverData::startstallnodelimit, GCG_SolverData::subgcgs, updateBranchingConss(), and updateVars().
◆ GCGincludeSolverGcg()
| SCIP_RETCODE GCGincludeSolverGcg | ( | GCG * | gcg | ) |
creates the most infeasible LP braching rule and includes it in SCIP
creates the xyz solver for pricing problems and includes it in GCG
- Parameters
-
gcg GCG data structure
Definition at line 1149 of file solver_gcg.cpp.
References GCG_SolverData::checksols, GCG_SolverData::count, DEFAULT_CHECKSOLS, DEFAULT_ENABLE_WARNINGS, DEFAULT_GAPLIMITFAC, DEFAULT_MAX_RECURSION_DEPTH, DEFAULT_NODELIMITFAC, DEFAULT_PRESOL_MAX_ROUNDS, DEFAULT_SETTINGSFILE, DEFAULT_SOLLIMITFAC, DEFAULT_STALLNODELIMITFAC, DEFAULT_STARTGAPLIMIT, DEFAULT_STARTNODELIMIT, DEFAULT_STARTSOLLIMIT, DEFAULT_STARTSTALLNODELIMIT, GCG_SolverData::depth, GCG_SolverData::enablewarnings, GCG_SolverData::gaplimitfac, GCGgetDwMasterprob(), GCGgetOrigprob(), GCGincludeSolverGcg(), GCGpricerIncludeSolver(), GCG_SolverData::masterprob, masterprob, GCG_SolverData::maxdepth, GCG_SolverData::nbasicpricingconss, GCG_SolverData::nodelimitfac, GCG_SolverData::npricingprobs, GCG_SolverData::nrelpricingprobs, GCG_SolverData::origprob, origprob, GCG_SolverData::presolmaxrounds, GCG_SolverData::relpricingprobidxs, SCIP_CALL(), GCG_SolverData::settingsfile, GCG_SolverData::sollimitfac, SOLVER_DESC, SOLVER_ENABLED, SOLVER_HEU_ENABLED, SOLVER_NAME, SOLVER_PRIORITY, solverExitGcg, solverInitGcg, GCG_SolverData::stallnodelimitfac, GCG_SolverData::startgaplimit, GCG_SolverData::startnodelimit, GCG_SolverData::startsollimit, GCG_SolverData::startstallnodelimit, GCG_SolverData::subgcgs, GCG_SolverData::translatesymmetry, and GCG_SolverData::varmaps.
Referenced by GCGincludeMasterPlugins(), and GCGincludeSolverGcg().