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 |
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 | |
| 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 | |
| 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 | |
| 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 | |
| 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 | |
| static SCIP_RETCODE | createTestPricingprobConss (SCIP *scip, SCIP *subscip, gcg::PARTIALDECOMP *partialdec, int block, SCIP_HASHMAP *hashorig2pricingvar) |
| creates the pricing problem constraints | |
| 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.
Referenced by GCGincludeScoreStrongDecomp().
◆ 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.
Referenced by GCGincludeScoreStrongDecomp().
◆ 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.
Referenced by GCGincludeScoreStrongDecomp().
◆ 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.
Referenced by GCG_DECL_SCORECALC().
◆ 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.
Referenced by GCG_DECL_SCORECALC().
◆ 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.
Referenced by GCG_DECL_SCORECALC().
◆ 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.
Referenced by GCG_DECL_SCORECALC().
◆ DEFAULT_RANDPARTIALDEC
| #define DEFAULT_RANDPARTIALDEC 23 |
initial random partialdec
Definition at line 62 of file score_strong.cpp.
Referenced by shuffleDualvalsRandom().
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 c, 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(), SCIP_CALL(), and shuffleDualvalsRandom().
Referenced by getDualvalRandom(), and shuffleDualvalsRandom().
◆ 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(), getDualvalRandom(), and shuffleDualvalsRandom().
Referenced by GCG_DECL_SCORECALC(), and getDualvalRandom().
◆ 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 assert(), c, calculateDualvalsOptimalOrigLP(), GCG_ScoreData::dualvalsoptimaloriglp, GCGconsGetDualsol(), GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompGetDetprobdataPresolved(), GCGgetOrigprob(), GCGscoreGetData(), gcg::DETPROBDATA::getCons(), nvars, and var.
Referenced by calculateDualvalsOptimalOrigLP(), and 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(), and getDualvalOptimalLP().
Referenced by GCG_DECL_SCORECALC(), and getDualvalOptimalLP().
◆ 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 assert(), GCG_DECTYPE_UNKNOWN, GCGsetPricingProblemParameters(), SCIP_CALL(), and setTestpricingProblemParameters().
Referenced by GCG_DECL_SCORECALC(), and setTestpricingProblemParameters().
◆ 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 assert(), c, createTestPricingprobConss(), GCGconsGetNVars(), GCGconsGetVars(), gcg::DETPROBDATA::getCons(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::DETPROBDATA::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), SCIP_CALL(), SCIPdebugMessage(), and success.
Referenced by createTestPricingprobConss(), and 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 assert(), GCG_ScoreData::dualvalsoptimaloriglp, GCG_ScoreData::dualvalsrandom, GCG_DECL_SCOREFREE, GCGgetOrigprob(), GCGscoreGetData(), GCGscoreGetName(), SCIPfreeMemory(), and SCORE_NAME.
◆ GCG_DECL_SCORECALC()
|
static |
Definition at line 545 of file score_strong.cpp.
References c, createTestPricingprobConss(), DEFAULT_SCORECOEF_FASTBENEFICIAL, DEFAULT_SCORECOEF_FASTNOTBENEFICIAL, DEFAULT_SCORECOEF_MEDIUMBENEFICIAL, DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL, GCG_DECL_SCORECALC, 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(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), gcg::PARTIALDECOMP::isConsMastercons(), obj, SCIP_CALL(), setTestpricingProblemParameters(), GCG_ScoreData::strongtimelimit, and var.
◆ GCGincludeScoreStrongDecomp()
| SCIP_RETCODE GCGincludeScoreStrongDecomp | ( | GCG * | gcg | ) |
creates the strong decomposition score and includes it in SCIP
creates the strong score and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 781 of file score_strong.cpp.
References assert(), GCG_ScoreData::coeffactororigvsrandom, DEFAULT_COEFFACTORORIGVSRANDOM, DEFAULT_DUALVALRANDOMMETHOD, DEFAULT_STRONGTIMELIMIT, GCG_ScoreData::dualvalsoptimaloriglp, GCG_ScoreData::dualvalsoptimaloriglpcalculated, GCG_ScoreData::dualvalsrandom, GCG_ScoreData::dualvalsrandomset, GCGgetOrigprob(), GCGincludeScore(), GCGincludeScoreStrongDecomp(), SCIP_CALL(), SCORE_DESC, SCORE_NAME, SCORE_SHORTNAME, GCG_ScoreData::strongdetectiondualvalrandommethod, and GCG_ScoreData::strongtimelimit.
Referenced by GCGincludeGcgPlugins(), and GCGincludeScoreStrongDecomp().