Detailed Description
strong score
Definition in file score_strong.cpp.
#include <sstream>#include <scip/scipdefplugins.h>#include "gcg/class_partialdecomp.h"#include "gcg/class_detprobdata.h"#include "gcg/cons_decomp.h"#include "gcg/cons_decomp.hpp"#include "gcg/scip_misc.h"#include "gcg/score.h"#include "gcg/score_strong.h"Go to the source code of this file.
Data Structures | |
| struct | GCG_ScoreData |
Macros | |
| #define | SCORE_NAME "strong decomposition score" |
| #define | SCORE_SHORTNAME "strong" |
| #define | SCORE_DESC "strong decomposition score" |
| #define | DEFAULT_STRONGTIMELIMIT 30. |
| #define | DEFAULT_DUALVALRANDOMMETHOD 1 |
| #define | DEFAULT_COEFFACTORORIGVSRANDOM 0.5 |
| #define | DEFAULT_SCORECOEF_FASTBENEFICIAL 1. |
| #define | DEFAULT_SCORECOEF_MEDIUMBENEFICIAL 0.75 |
| #define | DEFAULT_SCORECOEF_FASTNOTBENEFICIAL 0.3 |
| #define | DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL 0.1 |
| #define | DEFAULT_RANDPARTIALDEC 23 |
Typedefs | |
| typedef enum GCG_Random_dual_methods | GCG_RANDOM_DUAL_METHOD |
Enumerations | |
| enum | GCG_Random_dual_methods { GCG_RANDOM_DUAL_NAIVE = 0 , GCG_RANDOM_DUAL_EXPECTED_EQUAL = 1 , GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE = 2 } |
Functions | |
| static SCIP_RETCODE | shuffleDualvalsRandom (GCG *gcg, GCG_SCORE *score, SCIP_Bool transformed) |
| method that shuffles randomly and set dual variable values, used for strong detection score More... | |
| static SCIP_Real | getDualvalRandom (GCG *gcg, GCG_SCORE *score, int consindex, SCIP_Bool transformed) |
| return the a random value of the dual variable of the corresponding ; if it is not calculated yet it will be calculated More... | |
| static SCIP_RETCODE | calculateDualvalsOptimalOrigLP (GCG *gcg, GCG_SCORE *score, SCIP_Bool transformed) |
| method to calculate and set the optimal dual values from original lp, used for strong detection score More... | |
| static SCIP_Real | getDualvalOptimalLP (GCG *gcg, GCG_SCORE *score, int consindex, SCIP_Bool transformed) |
| returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the detprobdata; if it is not calculated yet it will be calculated More... | |
| static SCIP_RETCODE | setTestpricingProblemParameters (SCIP *scip, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastolfactor, SCIP_Real dualfeastol, SCIP_Bool enableppcuts, SCIP_Real timelimit) |
| sets the pricing problem parameters More... | |
| static SCIP_RETCODE | createTestPricingprobConss (SCIP *scip, SCIP *subscip, gcg::PARTIALDECOMP *partialdec, int block, SCIP_HASHMAP *hashorig2pricingvar) |
| creates the pricing problem constraints More... | |
| static | GCG_DECL_SCOREFREE (scoreFreeStrong) |
| static | GCG_DECL_SCORECALC (scoreCalcStrong) |
| SCIP_RETCODE | GCGincludeScoreStrongDecomp (GCG *gcg) |
Macro Definition Documentation
◆ SCORE_NAME
| #define SCORE_NAME "strong decomposition score" |
Definition at line 50 of file score_strong.cpp.
◆ SCORE_SHORTNAME
| #define SCORE_SHORTNAME "strong" |
Definition at line 51 of file score_strong.cpp.
◆ SCORE_DESC
| #define SCORE_DESC "strong decomposition score" |
Definition at line 52 of file score_strong.cpp.
◆ DEFAULT_STRONGTIMELIMIT
| #define DEFAULT_STRONGTIMELIMIT 30. |
timelimit for strong decompotition score calculation per partialdec
Definition at line 54 of file score_strong.cpp.
◆ DEFAULT_DUALVALRANDOMMETHOD
| #define DEFAULT_DUALVALRANDOMMETHOD 1 |
default value for method to dual initialization of dual values for strong decomposition: 1) naive, 2) expected equal, 3) expected overestimation
Definition at line 55 of file score_strong.cpp.
◆ DEFAULT_COEFFACTORORIGVSRANDOM
| #define DEFAULT_COEFFACTORORIGVSRANDOM 0.5 |
default value for convex coefficient for orig dual val (1-this coef is factor for random dual value)
Definition at line 56 of file score_strong.cpp.
◆ DEFAULT_SCORECOEF_FASTBENEFICIAL
| #define DEFAULT_SCORECOEF_FASTBENEFICIAL 1. |
coefficient for fast & beneficial in strong decomposition score computation
Definition at line 58 of file score_strong.cpp.
◆ DEFAULT_SCORECOEF_MEDIUMBENEFICIAL
| #define DEFAULT_SCORECOEF_MEDIUMBENEFICIAL 0.75 |
coefficient for not fast but beneficial in strong decomposition score computation
Definition at line 59 of file score_strong.cpp.
◆ DEFAULT_SCORECOEF_FASTNOTBENEFICIAL
| #define DEFAULT_SCORECOEF_FASTNOTBENEFICIAL 0.3 |
coefficient for fast & not beneficial in strong decomposition score computation
Definition at line 60 of file score_strong.cpp.
◆ DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL
| #define DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL 0.1 |
coefficient for not & not beneficial in strong decomposition score computation
Definition at line 61 of file score_strong.cpp.
◆ DEFAULT_RANDPARTIALDEC
| #define DEFAULT_RANDPARTIALDEC 23 |
initial random partialdec
Definition at line 62 of file score_strong.cpp.
Typedef Documentation
◆ GCG_RANDOM_DUAL_METHOD
| typedef enum GCG_Random_dual_methods GCG_RANDOM_DUAL_METHOD |
Definition at line 85 of file score_strong.cpp.
Enumeration Type Documentation
◆ GCG_Random_dual_methods
| Enumerator | |
|---|---|
| GCG_RANDOM_DUAL_NAIVE | |
| GCG_RANDOM_DUAL_EXPECTED_EQUAL | |
| GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE | |
Definition at line 79 of file score_strong.cpp.
Function Documentation
◆ shuffleDualvalsRandom()
|
static |
method that shuffles randomly and set dual variable values, used for strong detection score
- Returns
- scip return code
- Parameters
-
gcg GCG data structure score score transformed whether the problem is tranformed yet
Definition at line 98 of file score_strong.cpp.
References ABS, DEFAULT_RANDPARTIALDEC, GCG_ScoreData::dualvalsrandom, GCG_RANDOM_DUAL_EXPECTED_EQUAL, GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE, GCG_RANDOM_DUAL_NAIVE, GCGconsGetLhs(), GCGconsGetNVars(), GCGconsGetRhs(), GCGconsGetVals(), GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompGetDetprobdataPresolved(), GCGgetOrigprob(), GCGscoreGetData(), gcg::DETPROBDATA::getCons(), gcg::DETPROBDATA::getVar(), MAX, NULL, SCIP_CALL, SCIP_CALL_ABORT, SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_HIGH, SCIPallocBufferArray, SCIPcreateRandom(), SCIPfreeBufferArrayNull, SCIPgetIntParam(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetObjsense(), SCIPisInfinity(), SCIPrandomGetReal(), SCIPvarGetObj(), SCIPverbMessage(), and TRUE.
Referenced by getDualvalRandom().
◆ getDualvalRandom()
|
static |
return the a random value of the dual variable of the corresponding ; if it is not calculated yet it will be calculated
- Returns
- the a random value of the dual variable of the corresponding
- Parameters
-
gcg GCG data structure score score consindex consindex index of constraint the value is asked for transformed is the problem transformed yet
Definition at line 262 of file score_strong.cpp.
References GCG_ScoreData::dualvalsrandom, GCG_ScoreData::dualvalsrandomset, GCGscoreGetData(), SCIP_Real, shuffleDualvalsRandom(), and TRUE.
Referenced by GCG_DECL_SCORECALC().
◆ calculateDualvalsOptimalOrigLP()
|
static |
method to calculate and set the optimal dual values from original lp, used for strong detection score
- Returns
- scip return code
- Parameters
-
gcg GCG data structure score score transformed whether the problem is transormed yet
Definition at line 283 of file score_strong.cpp.
References GCG_ScoreData::dualvalsoptimaloriglp, FALSE, GCGconsGetDualsol(), GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompGetDetprobdataPresolved(), GCGgetOrigprob(), GCGscoreGetData(), gcg::DETPROBDATA::getCons(), NULL, SCIP_Bool, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VERBLEVEL_FULL, SCIP_VERBLEVEL_HIGH, SCIPblkmem(), SCIPchgVarType(), SCIPchgVarUbGlobal(), SCIPconsGetName(), SCIPconsIsTransformed(), SCIPcopy(), SCIPcreate(), SCIPfree(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetTransformedCons(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPisFeasEQ(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsolve(), SCIPtransformProb(), SCIPvarGetType(), SCIPverbMessage(), and SCIPwarningMessage().
Referenced by getDualvalOptimalLP().
◆ getDualvalOptimalLP()
|
static |
returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the detprobdata; if it is not calculated yet it will be calculated
- Returns
- the value of the optimal lp relaxation dual value of the given constraint rid correspondoning problem of the detprobdata
- Parameters
-
gcg GCG data structure score score consindex consindex index of constraint the value is asked for transformed is the problem transformed yet
Definition at line 399 of file score_strong.cpp.
References calculateDualvalsOptimalOrigLP(), GCG_ScoreData::dualvalsoptimaloriglp, GCG_ScoreData::dualvalsoptimaloriglpcalculated, GCGscoreGetData(), SCIP_Real, and TRUE.
Referenced by GCG_DECL_SCORECALC().
◆ setTestpricingProblemParameters()
|
static |
sets the pricing problem parameters
- Returns
- scip return code
- Parameters
-
scip SCIP data structure of the pricing problem clocktype clocktype to use in the pricing problem infinity values larger than this are considered infinity in the pricing problem epsilon absolute values smaller than this are considered zero in the pricing problem sumepsilon absolute values of sums smaller than this are considered zero in the pricing problem feastol feasibility tolerance for constraints in the pricing problem lpfeastolfactor primal feasibility tolerance factor of LP solver in the pricing problem dualfeastol feasibility tolerance for reduced costs in LP solution in the pricing problem enableppcuts should ppcuts be stored for sepa_basis timelimit limit of time
Definition at line 419 of file score_strong.cpp.
References GCG_DECTYPE_UNKNOWN, GCGsetPricingProblemParameters(), infinity, NULL, SCIP_CALL, SCIP_OKAY, and SCIPsetRealParam().
Referenced by GCG_DECL_SCORECALC().
◆ createTestPricingprobConss()
|
static |
creates the pricing problem constraints
- Returns
- scip return code
- Parameters
-
scip SCIP data structure subscip the relaxator data data structure partialdec partialdec corresponding to the decomposition to test block which pricing problem hashorig2pricingvar hashmap mapping original to corresponding pricing variables
Definition at line 446 of file score_strong.cpp.
References FALSE, GCGconsGetNVars(), GCGconsGetVars(), gcg::DETPROBDATA::getCons(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::DETPROBDATA::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPblkmem(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsActive(), SCIPdebugMessage, SCIPfreeBufferArrayNull, SCIPgetConsCopy(), SCIPgetTransformedCons(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPreleaseCons(), SCIPsnprintf(), and TRUE.
Referenced by GCG_DECL_SCORECALC().
◆ GCG_DECL_SCOREFREE()
|
static |
destructor of score to free user data (called when GCG is exiting)
Definition at line 526 of file score_strong.cpp.
References GCG_ScoreData::dualvalsoptimaloriglp, GCG_ScoreData::dualvalsrandom, GCGgetOrigprob(), GCGscoreGetData(), GCGscoreGetName(), NULL, SCIP_OKAY, SCIPfreeMemory, and SCORE_NAME.
◆ GCG_DECL_SCORECALC()
|
static |
Definition at line 545 of file score_strong.cpp.
References createTestPricingprobConss(), DEFAULT_SCORECOEF_FASTBENEFICIAL, DEFAULT_SCORECOEF_FASTNOTBENEFICIAL, DEFAULT_SCORECOEF_MEDIUMBENEFICIAL, DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL, FALSE, GCGconshdlrDecompGetPartialdecFromID(), GCGgetOrigprob(), GCGscoreGetData(), gcg::DETPROBDATA::getConssForVar(), gcg::PARTIALDECOMP::getDetprobdata(), getDualvalOptimalLP(), getDualvalRandom(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::DETPROBDATA::getNConssForVar(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::DETPROBDATA::getVal(), gcg::DETPROBDATA::getVar(), gcg::PARTIALDECOMP::getVarsForBlock(), infinity, gcg::PARTIALDECOMP::isAssignedToOrigProb(), gcg::PARTIALDECOMP::isConsMastercons(), NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_STATUS_OPTIMAL, SCIP_STATUS_TIMELIMIT, SCIP_VERBLEVEL_FULL, SCIP_VERBLEVEL_HIGH, SCIP_VERBLEVEL_MINIMAL, SCIPaddVar(), SCIPblkmem(), SCIPcreate(), SCIPcreateProb(), SCIPcreateVar(), SCIPfree(), SCIPgetBoolParam(), SCIPgetDualbound(), SCIPgetFirstLPLowerboundRoot(), SCIPgetIntParam(), SCIPgetNVars(), SCIPgetRealParam(), SCIPgetSolvingTime(), SCIPgetStatus(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapSetImage(), SCIPincludeDefaultPlugins(), SCIPisEQ(), SCIPisFeasLE(), SCIPreleaseVar(), SCIPsetIntParam(), SCIPsnprintf(), SCIPsolve(), SCIPtransformProb(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetProbvar(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPverbMessage(), setTestpricingProblemParameters(), GCG_ScoreData::strongtimelimit, and TRUE.
◆ GCGincludeScoreStrongDecomp()
| SCIP_RETCODE GCGincludeScoreStrongDecomp | ( | GCG * | gcg | ) |
creates the strong decomposition score and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 781 of file score_strong.cpp.
References GCG_ScoreData::coeffactororigvsrandom, DEFAULT_COEFFACTORORIGVSRANDOM, DEFAULT_DUALVALRANDOMMETHOD, DEFAULT_STRONGTIMELIMIT, GCG_ScoreData::dualvalsoptimaloriglp, GCG_ScoreData::dualvalsoptimaloriglpcalculated, GCG_ScoreData::dualvalsrandom, GCG_ScoreData::dualvalsrandomset, FALSE, GCGgetOrigprob(), GCGincludeScore(), NULL, SCIP_CALL, SCIP_OKAY, SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocMemory, SCORE_DESC, SCORE_NAME, SCORE_SHORTNAME, GCG_ScoreData::strongdetectiondualvalrandommethod, and GCG_ScoreData::strongtimelimit.
Referenced by GCGincludeGcgPlugins().