score_bender.cpp
Go to the documentation of this file.
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
105 if ( partialdec->isVarOpenvar(var) || partialdec->isVarMastervar(var) || partialdec->isVarLinkingvar(var) )
179 benderborderarea = ( nrelevantconss * nrelevantvars ) + ( nrelevantconss2 * nrelevantvars2 ) - badblockvararea;
180 totalarea = ( (unsigned long) partialdec->getNConss() * (unsigned long) partialdec->getNVars() );
SCIP_VAR ** b
class storing partialdecs and the problem matrix
class storing (potentially incomplete) decompositions
Definition: class_detprobdata.h:110
GCG_EXPORT std::vector< int > & getConssForVar(int varIndex)
returns the constraint indices of the coefficient matrix for a variable
Definition: class_detprobdata.cpp:762
GCG_EXPORT int getNVarsForCons(int consIndex)
returns the number of variables for a given constraint
Definition: class_detprobdata.cpp:908
GCG_EXPORT int getNConssForVar(int varIndex)
returns the number of constraints for a given variable where the var has a nonzero entry in
Definition: class_detprobdata.cpp:864
GCG_EXPORT std::vector< int > & getVarsForCons(int consIndex)
returns the variable indices of the coefficient matrix for a constraint
Definition: class_detprobdata.cpp:1023
GCG_EXPORT int getNMasterconss()
Gets size of the vector containing master conss.
Definition: class_partialdecomp.cpp:4481
GCG_EXPORT bool isConsMastercons(int cons)
Gets whether the cons is a master cons.
Definition: class_partialdecomp.cpp:4817
GCG_EXPORT SCIP_Real getScore(GCG_SCORE *score)
returns the score of the partialdec
Definition: class_partialdecomp.cpp:4347
GCG_EXPORT bool isVarLinkingvar(int var)
Checks whether the var is a linking var.
Definition: class_partialdecomp.cpp:5018
GCG_EXPORT std::vector< int > & getMasterconss()
Gets array containing all master conss indices.
Definition: class_partialdecomp.cpp:4286
GCG_EXPORT std::vector< int > & getConssForBlock(int block)
returns array containing constraints assigned to a block
Definition: class_partialdecomp.cpp:3968
GCG_EXPORT DETPROBDATA * getDetprobdata()
Gets the corresponding detprobdata.
Definition: class_partialdecomp.cpp:4725
GCG_EXPORT bool isVarMastervar(int var)
Checks whether the var is a master var.
Definition: class_partialdecomp.cpp:5009
GCG_EXPORT int getNVarsForBlock(int block)
Gets size of the vector containing vars assigned to a block.
Definition: class_partialdecomp.cpp:4537
GCG_EXPORT bool isVarOpenvar(int var)
Checks whether the var is an open var.
Definition: class_partialdecomp.cpp:5048
GCG_EXPORT std::vector< int > & getLinkingvars()
returns array containing all linking vars indices
Definition: class_partialdecomp.cpp:4261
SCIP_Real calcBlockAreaScore()
gets an intermediate score value for the blocks of a partialdec
Definition: class_partialdecomp.cpp:4388
GCG_EXPORT int getNLinkingvars()
Gets size of the vector containing linking vars.
Definition: class_partialdecomp.cpp:4459
GCG_EXPORT int getNConssForBlock(int block)
Gets size of the vector containing conss assigned to a block.
Definition: class_partialdecomp.cpp:4432
GCG_EXPORT bool isConsOpencons(int cons)
Gets whether the cons is an open cons.
Definition: class_partialdecomp.cpp:4826
GCG_EXPORT std::vector< int > & getVarsForBlock(int block)
Gets array containing vars of a block.
Definition: class_partialdecomp.cpp:4771
GCG_SCORE * GCGconshdlrDecompFindScore(GCG *gcg, const char *name)
searches for the score with the given name and returns it or NULL if score is not found
Definition: cons_decomp.cpp:2357
PARTIALDECOMP * GCGconshdlrDecompGetPartialdecFromID(GCG *gcg, int partialdecid)
local method to find a partialdec for a given id or NULL if no partialdec with such id is found
Definition: cons_decomp.cpp:281
constraint handler for structure detection
C++ interface of cons_decomp.
#define SCIP_Real
#define SCIP_CALL(x)
GCG_EXPORT SCIP_RETCODE GCGincludeScore(GCG *gcg, const char *name, const char *shortname, const char *description, GCG_SCOREDATA *scoredata, GCG_DECL_SCOREFREE((*scorefree)), GCG_DECL_SCORECALC((*scorecalc)))
creates a score and includes it in GCG
Definition: score.c:50
#define NULL
Definition: class_conspartition.cpp:44
benders score
Definition: score_bender.cpp:52
Definition: struct_gcg.h:55
SCIP_OKAY
enum SCIP_Retcode SCIP_RETCODE