clscons_gamssymbol.cpp
Go to the documentation of this file.
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
65 std::map<std::string, int>* constosymbol; /**< maps constraint name to the corresponding symbol index */
115 std::vector<int> classForCons( ncons, - 1 ); // [i] holds class index for constraint i -> indexing over detection internal constraint array!
126 // iterating over classdata->constosymbol and lookup constraints with getIndexForCons fails with assertion if constraint is not found -> should return error value?
170 gcg::ConsPartition* partition = new gcg::ConsPartition(gcg, "gamssymbols", counterClasses, detprobdata->getNConss() );
180 text << "This class contains all constraints with gams symbol index" << symbolidxForClass[c] << ".";
189 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, " Consclassifier \"%s\" yields a classification with %d different constraint classes \n", partition->getName(), partition->getNClasses() );
228 SCIP_CALL( GCGincludeConsClassifier(gcg, CLSCONS_NAME, CLSCONS_DESC, CLSCONS_PRIORITY, CLSCONS_ENABLED, classifierdata, classifierFree, classifierClassify) );
static SCIP_RETCODE partition(SCIP *scip, SCIP_VAR **J, int *Jsize, SCIP_Longint *priority, SCIP_VAR **F, int Fsize, SCIP_VAR **origvar, SCIP_Real *median)
Definition: branch_generic.c:910
class representing a partition of a set of constraints
class storing partialdecs and the problem matrix
Definition: class_conspartition.h:60
Definition: class_detprobdata.h:110
GCG_EXPORT int getNConss()
returns the number of variables considered in the detprobdata
Definition: class_detprobdata.cpp:850
GCG_EXPORT void addConsPartition(ConsPartition *partition)
adds a constraint partition if it is no duplicate of an existing constraint partition
Definition: class_detprobdata.cpp:553
GCG_EXPORT SCIP_CONS * getCons(int consIndex)
returns the SCIP constraint related to a constraint index
Definition: class_detprobdata.cpp:746
static GCG_DECL_CONSCLASSIFY(classifierClassify)
Definition: clscons_gamssymbol.cpp:100
static GCG_DECL_FREECONSCLASSIFIER(classifierFree)
Definition: clscons_gamssymbol.cpp:81
SCIP_RETCODE GCGconsClassifierGamssymbolAddEntry(GCG_CONSCLASSIFIER *classifier, SCIP_CONS *cons, int symbolIdx)
Definition: clscons_gamssymbol.cpp:200
SCIP_RETCODE GCGincludeConsClassifierGamssymbol(GCG *gcg)
Definition: clscons_gamssymbol.cpp:217
Constraints which have the same symbol are put into same class.
GCG_CONSCLASSIFIER * GCGfindConsClassifier(GCG *gcg, const char *name)
searches for the consclassifier with the given name and returns it or NULL if classifier is not found
Definition: cons_decomp.cpp:2279
DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved(GCG *gcg)
help method to access detprobdata for transformed problem
Definition: cons_decomp.cpp:3976
DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig(GCG *gcg)
help method to access detprobdata for unpresolved problem
Definition: cons_decomp.cpp:3962
SCIP_RETCODE GCGincludeConsClassifier(GCG *gcg, const char *name, const char *description, int priority, SCIP_Bool enabled, GCG_CLASSIFIERDATA *classifierdata, GCG_DECL_FREECONSCLASSIFIER((*freeClassifier)),)
Definition: cons_decomp.cpp:2494
constraint handler for structure detection
C++ interface of cons_decomp.
#define SCIP_CALL(x)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
GCG_CLASSIFIERDATA * GCGconsClassifierGetData(GCG_CONSCLASSIFIER *consClassifier)
Definition: clscons.c:46
const char * GCGconsClassifierGetName(GCG_CONSCLASSIFIER *consClassifier)
Definition: clscons.c:67
const char * SCIPconsGetName(SCIP_CONS *cons)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define NULL
Definition: class_conspartition.cpp:44
various SCIP helper methods
std::map< std::string, int > * constosymbol
Definition: clscons_gamssymbol.cpp:65
Definition: struct_consclassifier.h:44
Definition: struct_gcg.h:55
SCIP_VERBLEVEL_HIGH
SCIP_OKAY
enum SCIP_Retcode SCIP_RETCODE