Scippy

GCG

Branch-and-Price & Column Generation for Everyone

cons_decomp.hpp File Reference

Detailed Description

C++ interface of cons_decomp.

Author
Erik Muehmer

Definition in file cons_decomp.hpp.

Go to the source code of this file.

Functions

GCG_EXPORT std::vector< gcg::PARTIALDECOMP * > * GCGconshdlrDecompGetPartialdecs (GCG *gcg)
 gets vector of all partialdecs More...
 
GCG_EXPORT gcg::PARTIALDECOMP * GCGgetPartialdecToWrite (GCG *gcg, SCIP_Bool transformed)
 
GCG_EXPORT gcg::PARTIALDECOMP * GCGconshdlrDecompGetPartialdecFromID (GCG *scip, int partialdecid)
 local method to find a partialdec for a given id or NULL if no partialdec with such id is found More...
 
GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec (GCG *gcg, gcg::PARTIALDECOMP *partialdec)
 adds a preexisting partial dec to be considered at the beginning of the detection More...
 
GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec (GCG *gcg, gcg::PARTIALDECOMP *partialdec, SCIP_Bool addpartialdec)
 adds a preexisting partial dec to be considered at the beginning of the detection More...
 
GCG_EXPORT void GCGconshdlrDecompDeregisterPartialdec (GCG *gcg, gcg::PARTIALDECOMP *partialdec)
 deregisters a partialdec in the conshdlr More...
 
GCG_EXPORT void GCGconshdlrDecompRegisterPartialdec (GCG *gcg, gcg::PARTIALDECOMP *partialdec)
 registers a partialdec in the conshdlr More...
 
GCG_EXPORT gcg::DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig (GCG *gcg)
 help method to access detprobdata for unpresolved problem More...
 
GCG_EXPORT gcg::DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved (GCG *gcg)
 help method to access detprobdata for transformed problem More...
 
GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompChooseCandidatesFromSelected (GCG *gcg, std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > &candidates, SCIP_Bool original, SCIP_Bool printwarnings)
 initilizes the candidates data structures with selected partialdecs More...
 
GCG_EXPORT std::string GCGconshdlrDecompGetDetectorHistoryByPartialdecId (GCG *gcg, int id)
 gets detector history of partialdec with given id More...
 

Function Documentation

◆ GCGconshdlrDecompGetPartialdecs()

GCG_EXPORT std::vector< gcg::PARTIALDECOMP * > * GCGconshdlrDecompGetPartialdecs ( GCG *  gcg)

gets vector of all partialdecs

Returns
finished partialdecs
Parameters
gcgGCG data structure

Definition at line 4397 of file cons_decomp.cpp.

References getConshdlrdata(), NULL, and SCIP_ConshdlrData::partialdecs.

Referenced by gcg::updatePartialdecList().

◆ GCGgetPartialdecToWrite()

◆ GCGconshdlrDecompGetPartialdecFromID()

GCG_EXPORT gcg::PARTIALDECOMP * GCGconshdlrDecompGetPartialdecFromID ( GCG *  scip,
int  partialdecid 
)

local method to find a partialdec for a given id or NULL if no partialdec with such id is found

Returns
partialdec pointer of partialdec with given id or NULL if it does not exist
Note
returns NULL if no partialdec by this id is known
Parameters
scipGCG data structure
partialdecidpartialdec id

Definition at line 281 of file cons_decomp.cpp.

References getConshdlrdata(), NULL, and SCIP_ConshdlrData::partialdecsbyid.

Referenced by buildProblem(), checkIdenticalBlocks(), GCG_DECL_SCORECALC(), GCGconshdlrDecompCheckConsistency(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompGetNextPartialdecID(), GCGconshdlrDecompGetPartialdecFromID(), GCGgetPartialdecToWrite(), GCGWriteGpDecompMatrix(), GCGwriteGpVisualizationFormat(), GCGwriteTexReport(), and GCGwriteTexVisualization().

◆ GCGconshdlrDecompAddPreexisitingPartialDec() [1/2]

GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec ( GCG *  gcg,
gcg::PARTIALDECOMP *  partialdec 
)

adds a preexisting partial dec to be considered at the beginning of the detection

Note
refines the partialdec to be consistent, adds meta data/statistics, completes partial dec by assigning open conss to master if USERGIVEN::COMPLETED_CONSTOMASTER is set
Returns
SCIP return code
Parameters
gcgGCG data structure
partialdecpartial dec to add

Definition at line 3133 of file cons_decomp.cpp.

References FALSE, and GCGconshdlrDecompAddPreexisitingPartialDec().

Referenced by gcg::BLOCK_STRUCTURE::createPartialdec(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompAddPreexistingDecomp(), readBLKFile(), readDECFile(), and readJDec().

◆ GCGconshdlrDecompAddPreexisitingPartialDec() [2/2]

GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec ( GCG *  gcg,
gcg::PARTIALDECOMP *  partialdec,
SCIP_Bool  addpartialdec 
)

◆ GCGconshdlrDecompDeregisterPartialdec()

GCG_EXPORT void GCGconshdlrDecompDeregisterPartialdec ( GCG *  gcg,
gcg::PARTIALDECOMP *  partialdec 
)

deregisters a partialdec in the conshdlr

Use this function at deletion of the partialdec. The partialdec is not destroyed in this function, the conshdlr will not know that it exists.

Parameters
gcgGCG data structure
partialdecthe partialdec

Definition at line 3774 of file cons_decomp.cpp.

References getConshdlrdata(), gcg::PARTIALDECOMP::getID(), NULL, SCIP_ConshdlrData::partialdecs, and SCIP_ConshdlrData::partialdecsbyid.

Referenced by gcg::PARTIALDECOMP::~PARTIALDECOMP().

◆ GCGconshdlrDecompRegisterPartialdec()

GCG_EXPORT void GCGconshdlrDecompRegisterPartialdec ( GCG *  gcg,
gcg::PARTIALDECOMP *  partialdec 
)

registers a partialdec in the conshdlr

Use this function at initialization of the partialdec. If the partialdec already exists in the conshdlr it is ignored.

Parameters
gcgGCG data structure
partialdecthe partialdec to register

Definition at line 4568 of file cons_decomp.cpp.

References getConshdlrdata(), gcg::PARTIALDECOMP::getID(), SCIP_ConshdlrData::partialdecs, and SCIP_ConshdlrData::partialdecsbyid.

Referenced by gcg::PARTIALDECOMP::PARTIALDECOMP().

◆ GCGconshdlrDecompGetDetprobdataOrig()

GCG_EXPORT gcg::DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig ( GCG *  gcg)

help method to access detprobdata for unpresolved problem

Returns
pointer to detprobdata in wrapper data structure
Parameters
gcgGCG data structure

Definition at line 3962 of file cons_decomp.cpp.

References SCIP_ConshdlrData::detprobdataorig, GCGconshdlrDecompOrigDetprobdataExists(), getConshdlrdata(), NULL, and resetDetprobdata().

Referenced by buildProblem(), calculateDualvalsOptimalOrigLP(), createPartialdecFromDecomp(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_VARCLASSIFY(), gcg::PARTIALDECOMP::getDetprobdata(), shuffleDualvalsRandom(), and writeCls().

◆ GCGconshdlrDecompGetDetprobdataPresolved()

GCG_EXPORT gcg::DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved ( GCG *  gcg)

help method to access detprobdata for transformed problem

Returns
pointer to detprobdata in wrapper data structure
Parameters
gcgGCG data structure

Definition at line 3976 of file cons_decomp.cpp.

References SCIP_ConshdlrData::detprobdatapres, GCGconshdlrDecompPresolvedDetprobdataExists(), getConshdlrdata(), NULL, and resetDetprobdata().

Referenced by calculateDualvalsOptimalOrigLP(), createPartialdecFromDecomp(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_VARCLASSIFY(), gcg::PARTIALDECOMP::getDetprobdata(), shuffleDualvalsRandom(), and writeCls().

◆ GCGconshdlrDecompChooseCandidatesFromSelected()

GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompChooseCandidatesFromSelected ( GCG *  gcg,
std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > &  candidates,
SCIP_Bool  original,
SCIP_Bool  printwarnings 
)

initilizes the candidates data structures with selected partialdecs

initializes it with all if there are no selected partialdecs, sort them according to the current scoretype

Parameters
gcgGCG data structure
candidatestuples of partialdecs and scores will be added to this vector (sorted w.r.t. the scores).
originalchoose candidates for the original problem?
printwarningsshould warnings be printed?
Returns
SCIP return code

◆ GCGconshdlrDecompGetDetectorHistoryByPartialdecId()

GCG_EXPORT std::string GCGconshdlrDecompGetDetectorHistoryByPartialdecId ( GCG *  gcg,
int  id 
)

gets detector history of partialdec with given id

Returns
detector history of partialdec as string
Parameters
gcgGCG data structure
idid of partialdec