GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
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
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
GCG_EXPORT SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec (GCG *gcg, gcg::PARTIALDECOMP *partialdec)
 adds a preexisting partial dec to be considered at the beginning of the detection
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
GCG_EXPORT void GCGconshdlrDecompDeregisterPartialdec (GCG *gcg, gcg::PARTIALDECOMP *partialdec)
 deregisters a partialdec in the conshdlr
GCG_EXPORT void GCGconshdlrDecompRegisterPartialdec (GCG *gcg, gcg::PARTIALDECOMP *partialdec)
 registers a partialdec in the conshdlr
GCG_EXPORT gcg::DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig (GCG *gcg)
 help method to access detprobdata for unpresolved problem
GCG_EXPORT gcg::DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved (GCG *gcg)
 help method to access detprobdata for transformed problem
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
GCG_EXPORT std::string GCGconshdlrDecompGetDetectorHistoryByPartialdecId (GCG *gcg, int id)
 gets detector history of partialdec with given id

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 assert(), GCGconshdlrDecompGetPartialdecs(), getConshdlrdata(), and SCIP_ConshdlrData::partialdecs.

Referenced by GCGconshdlrDecompGetPartialdecs(), and gcg::updatePartialdecList().

◆ GCGgetPartialdecToWrite()

◆ GCGconshdlrDecompGetPartialdecFromID()

◆ 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 GCGconshdlrDecompAddPreexisitingPartialDec().

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

◆ GCGconshdlrDecompAddPreexisitingPartialDec() [2/2]

◆ 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 assert(), GCGconshdlrDecompDeregisterPartialdec(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), i, SCIP_ConshdlrData::partialdecs, and SCIP_ConshdlrData::partialdecsbyid.

Referenced by GCGconshdlrDecompDeregisterPartialdec(), and 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 GCGconshdlrDecompRegisterPartialdec(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), SCIP_ConshdlrData::partialdecs, and SCIP_ConshdlrData::partialdecsbyid.

Referenced by GCGconshdlrDecompRegisterPartialdec(), gcg::PARTIALDECOMP::PARTIALDECOMP(), and gcg::PARTIALDECOMP::PARTIALDECOMP().

◆ GCGconshdlrDecompGetDetprobdataOrig()

◆ GCGconshdlrDecompGetDetprobdataPresolved()

◆ 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

References GCG_EXPORT, and GCGconshdlrDecompChooseCandidatesFromSelected().

◆ 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

References GCGconshdlrDecompGetDetectorHistoryByPartialdecId().

Referenced by GCGconshdlrDecompGetDetectorHistoryByPartialdecId().