clsvar_objvalues.cpp
Go to the documentation of this file.
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
98 std::vector<int> classforvars(detprobdata->getNVars(), -1); /* vector assigning a class index to each variable */
99 int curclassindex; /* stores a var's classindex if the objective value of a var has already been found for another var */
131 classifier = new gcg::VarPartition(gcg, "varobjvals", (int) foundobjvals.size(), detprobdata->getNVars());
140 text << "This class contains all variables with objective function value " << name.str() << ".";
152 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, " Varclassifier \"%s\" yields a classification with %d different variable classes\n", classifier->getName(), classifier->getNClasses()) ;
168 SCIP_CALL( GCGincludeVarClassifier(gcg, CLSVAR_NAME, CLSVAR_DESC, CLSVAR_PRIORITY, CLSVAR_ENABLED, classifierdata, classifierFree, classifierClassify) );
class storing partialdecs and the problem matrix
class representing a partition of a set of variables
Definition: class_detprobdata.h:110
GCG_EXPORT int getNVars()
return the number of variables considered in the detprobdata
Definition: class_detprobdata.cpp:902
GCG_EXPORT void addVarPartition(VarPartition *partition)
adds a variable partition if it is no duplicate of an existing variable partition
Definition: class_detprobdata.cpp:637
GCG_EXPORT SCIP_VAR * getVar(int varIndex)
returns SCIP variable related to a variable index
Definition: class_detprobdata.cpp:1015
GCG_EXPORT int getNClasses()
Definition: class_indexpartition.cpp:241
GCG_EXPORT const char * getName()
Definition: class_indexpartition.cpp:234
GCG_EXPORT void setClassDescription(int classindex, const char *desc)
Definition: class_indexpartition.cpp:366
GCG_EXPORT void setClassName(int classindex, const char *name)
Definition: class_indexpartition.cpp:374
Definition: class_varpartition.h:61
GCG_EXPORT void assignVarToClass(int varindex, int classindex)
Definition: class_varpartition.cpp:81
SCIP_RETCODE GCGincludeVarClassifierObjValues(GCG *gcg)
Definition: clsvar_objvalues.cpp:162
static GCG_DECL_VARCLASSIFY(classifierClassify)
Definition: clsvar_objvalues.cpp:82
classifies variables according to their objective function values
DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved(GCG *gcg)
help method to access detprobdata for transformed problem
Definition: cons_decomp.cpp:3976
SCIP_RETCODE GCGincludeVarClassifier(GCG *gcg, const char *name, const char *description, int priority, SCIP_Bool enabled, GCG_CLASSIFIERDATA *classifierdata, GCG_DECL_FREEVARCLASSIFIER((*freeClassifier)),)
Definition: cons_decomp.cpp:2730
DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig(GCG *gcg)
help method to access detprobdata for unpresolved problem
Definition: cons_decomp.cpp:3962
constraint handler for structure detection
C++ interface of cons_decomp.
#define SCIP_Real
#define SCIP_CALL(x)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
#define NULL
Definition: class_conspartition.cpp:44
various SCIP helper methods
Definition: struct_gcg.h:55
SCIP_VERBLEVEL_HIGH
SCIP_OKAY
enum SCIP_Retcode SCIP_RETCODE