GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
gcg Namespace Reference

Data Structures

class  AbstractColumn
class  BipartiteGraph
struct  BLOCK_STRUCTURE
class  Bridge
class  Column
class  ColumnGraph
class  ConsPartition
class  DETPROBDATA
class  DialogGraph
class  DialogReadGraphs
class  DialogReadPartition
class  DialogWriteGraph
class  DialogWriteGraphs
class  EdgeGCG
class  function
class  Graph
class  GraphAlgorithms
class  GraphGCG
class  GraphInterface
class  GraphTclique
class  HypercolGraph
class  Hypergraph
class  HyperrowcolGraph
class  HyperrowGraph
class  IndexPartition
class  MatrixGraph
class  ObjDialog
 C++ wrapper for dialogs. More...
struct  pair_hash
 combine two hash function of objects of a pair to get a vaulue for the pair More...
class  PARTIALDECOMP
 class to manage partial decompositions More...
class  Pricingcontroller
class  RowGraph
class  RowGraphWeighted
struct  sort_decr
struct  sort_pred
class  Stabilization
struct  subset
class  VarPartition
class  Weights

Typedefs

typedef struct gcg::subset subset
typedef enum DistanceMeasure DISTANCE_MEASURE
typedef enum WeightType WEIGHT_TYPE

Enumerations

enum  USERGIVEN {
  NOT = 0 ,
  PARTIAL = - 1 ,
  COMPLETE = - 2 ,
  COMPLETED_CONSTOMASTER = - 3
}
 enumeration to display if a decomposition was given by the user and if so, how it was processed after adding More...
enum  RETTYPE {
  UNKNOWN ,
  INTEGER ,
  REAL ,
  BOOLEAN ,
  STRING
}
enum  DistanceMeasure {
  JOHNSON = 1 ,
  INTERSECTION = 2 ,
  JACCARD = 5 ,
  COSINE = 6 ,
  SIMPSON = 9
}
enum  WeightType {
  SIM = 0 ,
  DIST = 1
}

Functions

SCIP_Bool varIsFixedToZero (SCIP *scip, SCIP_VAR *var)
static SCIP_Bool realArraysAreEqual (SCIP *scip, SCIP_Real *array1, int array1length, SCIP_Real *array2, int array2length)
 checks whether two arrays of SCIP_Real's are identical
static bool compare_blocks (std::pair< int, int > const &a, std::pair< int, int > const &b)
 SCIP_DECL_SORTPTRCOMP (Pricingcontroller::comparePricingjobs)
bool updatePartialdecList (GCG *gcg, std::vector< PARTIALDECOMP * > &partialdeclist, unsigned int &npartialdecs, bool includeopenpartialdecs)
static void sortPartialdecList (std::vector< PARTIALDECOMP * > &partialdeclist, std::string &header, std::vector< AbstractColumn * > &columns, bool asc)
 local sorting function for partialdec id vectors
static SCIP_RETCODE GCGdialogSetNEntires (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, int listlength, int &menulength)
static SCIP_RETCODE GCGdialogChangeScore (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog)
static SCIP_RETCODE outputCharXTimes (SCIP *scip, const char letter, int x)
static SCIP_RETCODE GCGdialogShowMenu (GCG *gcg, std::vector< AbstractColumn * > &columns, unsigned int &npartialdecs, const int startindex, int menulength, std::vector< PARTIALDECOMP * > &partialdeclist, bool sortasc, std::string sortby, bool listopenpartialdecs)
 show current menu containing partialdec information
static SCIP_RETCODE GCGdialogShowLegend (GCG *gcg, std::vector< AbstractColumn * > &columns)
static SCIP_RETCODE GCGdialogShowHelp (GCG *gcg)
 Shows help section of explore menu.
static SCIP_RETCODE GCGdialogSelectVisualize (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< PARTIALDECOMP * > &partialdeclist, SCIP_Bool open)
static SCIP_RETCODE GCGdialogInspectPartialdec (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< PARTIALDECOMP * > &partialdeclist)
static SCIP_RETCODE GCGdialogSelect (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< PARTIALDECOMP * > &partialdeclist)
static SCIP_RETCODE GCGdialogSortAsc (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, bool &asc)
static bool isHeader (std::string &header, std::vector< AbstractColumn * > &columns)
static SCIP_RETCODE GCGdialogSortBy (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< AbstractColumn * > &columns, std::string &sortby)
static SCIP_RETCODE GCGdialogChangeListMode (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, bool &listopenpartialdecs)
static SCIP_RETCODE GCGdialogExecCommand (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< AbstractColumn * > &columns, char *command, int &startindex, int &menulength, bool &finished, std::vector< PARTIALDECOMP * > &partialdeclist, bool &sortasc, std::string &sortby, bool &listopenpartialdecs)
SCIP_RETCODE GCGdialogExecExplore (GCG *gcg, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog)
 SCIP_DECL_DIALOGEXEC (DialogWriteGraph::scip_exec)
 SCIP_DECL_DIALOGEXEC (DialogGraph::scip_exec)
 SCIP_DECL_DIALOGEXEC (DialogReadPartition::scip_exec)

Variables

template<typename T>
double GraphAlgorithms< T >::cutoff = 0.0
enum  ConsClassDecompInfo {
  BOTH = 0 ,
  ONLY_MASTER = 1 ,
  ONLY_PRICING = 2
}
typedef enum ConsClassDecompInfo CONS_DECOMPINFO
enum  VarClassDecompInfo {
  ALL = 0 ,
  LINKING = 1 ,
  MASTER = 2 ,
  BLOCK = 3
}
typedef enum VarClassDecompInfo VAR_DECOMPINFO

Typedef Documentation

◆ subset

typedef struct gcg::subset gcg::subset

◆ DISTANCE_MEASURE

Definition at line 53 of file rowgraph_weighted.h.

◆ WEIGHT_TYPE

Definition at line 60 of file rowgraph_weighted.h.

Enumeration Type Documentation

◆ USERGIVEN

enumeration to display if a decomposition was given by the user and if so, how it was processed after adding

Enumerator
NOT 

this partialdec was not given by the user

PARTIAL 

this partial partialdec was given by the user as it is

COMPLETE 

this complete partialdec was given by the user as it is

COMPLETED_CONSTOMASTER 

this partialdec was partially given by the user and then completed by setting all missing constraints to the master

Definition at line 67 of file class_partialdecomp.h.

◆ RETTYPE

RETTYPE is used to store the return type of a callback function

Enumerator
UNKNOWN 

dummy default

INTEGER 

integer

REAL 

SCIP_Real

BOOLEAN 

Boolean

STRING 

char*

Definition at line 71 of file dialog_explore.cpp.

◆ DistanceMeasure

Enumerator
JOHNSON 
INTERSECTION 
JACCARD 
COSINE 
SIMPSON 

Definition at line 45 of file rowgraph_weighted.h.

◆ WeightType

Enumerator
SIM 
DIST 

Definition at line 55 of file rowgraph_weighted.h.

Function Documentation

◆ varIsFixedToZero()

SCIP_Bool gcg::varIsFixedToZero ( SCIP * scip,
SCIP_VAR * var )

returns the relevant representative of a var

Definition at line 119 of file class_detprobdata.cpp.

References var, and varIsFixedToZero().

Referenced by gcg::DETPROBDATA::DETPROBDATA(), and varIsFixedToZero().

◆ realArraysAreEqual()

SCIP_Bool gcg::realArraysAreEqual ( SCIP * scip,
SCIP_Real * array1,
int array1length,
SCIP_Real * array2,
int array2length )
static

checks whether two arrays of SCIP_Real's are identical

Returns
true iff the given arrays are identical
Parameters
scipSCIP data structure
array1first array
array1lengthlength of first array
array2second array
array2lengthlength of second array

Definition at line 392 of file class_partialdecomp.cpp.

References assert(), i, and realArraysAreEqual().

Referenced by realArraysAreEqual().

◆ compare_blocks()

bool gcg::compare_blocks ( std::pair< int, int > const & a,
std::pair< int, int > const & b )
static

Checks whether the second value of a is lower than the second value of b

Returns
true iff the second value of a is lower than the second value of b

Definition at line 424 of file class_partialdecomp.cpp.

References compare_blocks().

Referenced by compare_blocks(), and gcg::PARTIALDECOMP::isEqual().

◆ SCIP_DECL_SORTPTRCOMP()

gcg::SCIP_DECL_SORTPTRCOMP ( Pricingcontroller::comparePricingjobs )

◆ updatePartialdecList()

bool gcg::updatePartialdecList ( GCG * gcg,
std::vector< PARTIALDECOMP * > & partialdeclist,
unsigned int & npartialdecs,
bool includeopenpartialdecs )

◆ sortPartialdecList()

void gcg::sortPartialdecList ( std::vector< PARTIALDECOMP * > & partialdeclist,
std::string & header,
std::vector< AbstractColumn * > & columns,
bool asc )
static

local sorting function for partialdec id vectors

avoids redundant sorting calls, sorts by score in given order

Parameters
partialdeclistcurrent list of partialdecs
headerheader of column to sort by
columnsvector of pointers to columns
ascwhether to sort ascending or descending

Definition at line 177 of file dialog_explore.cpp.

References sortPartialdecList(), and UNKNOWN.

Referenced by GCGdialogExecExplore(), GCGdialogShowMenu(), and sortPartialdecList().

◆ GCGdialogSetNEntires()

SCIP_RETCODE gcg::GCGdialogSetNEntires ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog,
int listlength,
int & menulength )
static

modifies menulength according to input and updates menu accordingly

Returns
SCIP return code
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
listlengthlength of partialdec id list
menulengthcurrent menu length to be modified

Definition at line 207 of file dialog_explore.cpp.

References GCGconshdlrDecompGetNPartialdecs(), GCGdialogSetNEntires(), GCGgetOrigprob(), and SCIP_CALL().

Referenced by GCGdialogExecCommand(), and GCGdialogSetNEntires().

◆ GCGdialogChangeScore()

SCIP_RETCODE gcg::GCGdialogChangeScore ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog )
static

sets the used score according to user input

Returns
SCIP return code
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management

Definition at line 261 of file dialog_explore.cpp.

References GCGconshdlrDecompGetNScores(), GCGconshdlrDecompGetScores(), GCGdialogChangeScore(), GCGgetOrigprob(), GCGscoreGetName(), GCGscoreGetShortname(), i, and SCIP_CALL().

Referenced by GCGdialogChangeScore(), and GCGdialogExecCommand().

◆ outputCharXTimes()

SCIP_RETCODE gcg::outputCharXTimes ( SCIP * scip,
const char letter,
int x )
static

Outputs the given char x times as SCIPdialogMessage

Returns
SCIP status
Parameters
scipSCIP data structure
letterchar to write
xwrite char x times

Definition at line 311 of file dialog_explore.cpp.

References i, and outputCharXTimes().

Referenced by GCGdialogShowMenu(), and outputCharXTimes().

◆ GCGdialogShowMenu()

SCIP_RETCODE gcg::GCGdialogShowMenu ( GCG * gcg,
std::vector< AbstractColumn * > & columns,
unsigned int & npartialdecs,
const int startindex,
int menulength,
std::vector< PARTIALDECOMP * > & partialdeclist,
bool sortasc,
std::string sortby,
bool listopenpartialdecs )
static

show current menu containing partialdec information

Update partialdec list in case it changed since the last command and show the table of partialdecs.

Returns
SCIP status
Parameters
gcgGCG data structure
columnsvector of pointers to columns
npartialdecsmax number of partialdecs
startindexindex (in partialdec list) of uppermost partialdec in extract
menulengthnumber of menu entries
partialdeclistcurrent list of partialdecs
sortasctrue iff sorting should be ascending
sortbytable header of column to sort by
listopenpartialdecsopen partialdecs will be listed iff set to true

Definition at line 330 of file dialog_explore.cpp.

References assert(), DEFAULT_COLUMN_MIN_WIDTH, GCGdialogShowMenu(), GCGgetCurrentScore(), GCGgetOrigprob(), GCGscoreGetShortname(), i, outputCharXTimes(), sortPartialdecList(), and updatePartialdecList().

Referenced by GCGdialogExecExplore(), and GCGdialogShowMenu().

◆ GCGdialogShowLegend()

SCIP_RETCODE gcg::GCGdialogShowLegend ( GCG * gcg,
std::vector< AbstractColumn * > & columns )
static

Shows information about the explore screen and its abbreviations

Returns
SCIP status
Parameters
gcgGCG data structure
columnsvector of pointers to columns

Definition at line 486 of file dialog_explore.cpp.

References assert(), GCGconshdlrDecompGetDetectors(), GCGconshdlrDecompGetNDetectors(), GCGdetectorGetChar(), GCGdetectorGetName(), GCGdialogShowLegend(), GCGgetCurrentScore(), GCGgetOrigprob(), GCGscoreGetDesc(), and GCGscoreGetShortname().

Referenced by GCGdialogExecCommand(), and GCGdialogShowLegend().

◆ GCGdialogShowHelp()

SCIP_RETCODE gcg::GCGdialogShowHelp ( GCG * gcg)
static

Shows help section of explore menu.

Outputs al ist of commands and a description of their function

Returns
SCIP status
Parameters
gcgGCG data structure

Definition at line 556 of file dialog_explore.cpp.

References assert(), GCGdialogShowHelp(), and GCGgetOrigprob().

Referenced by GCGdialogExecCommand(), and GCGdialogShowHelp().

◆ GCGdialogSelectVisualize()

SCIP_RETCODE gcg::GCGdialogSelectVisualize ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog,
std::vector< PARTIALDECOMP * > & partialdeclist,
SCIP_Bool open )
static

Shows a visualization of the partialdec specified by the user via the dialog

Returns
SCIP status
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
partialdeclistcurrent list of partialdecs
opencompile and open gnuplot file?

Definition at line 598 of file dialog_explore.cpp.

References assert(), gcg::PARTIALDECOMP::exportVisualization(), GCGdialogSelectVisualize(), GCGgetOrigprob(), SCIP_CALL(), and gcg::PARTIALDECOMP::showVisualization().

Referenced by GCGdialogExecCommand(), and GCGdialogSelectVisualize().

◆ GCGdialogInspectPartialdec()

SCIP_RETCODE gcg::GCGdialogInspectPartialdec ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog,
std::vector< PARTIALDECOMP * > & partialdeclist )
static

Displays information about a partialdec that is chosen by the user in a dialog.

Returns
SCIP status
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
partialdeclistcurrent list of partialdecs

Definition at line 648 of file dialog_explore.cpp.

References assert(), gcg::PARTIALDECOMP::displayInfo(), GCGdialogInspectPartialdec(), GCGgetOrigprob(), and SCIP_CALL().

Referenced by GCGdialogExecCommand(), and GCGdialogInspectPartialdec().

◆ GCGdialogSelect()

SCIP_RETCODE gcg::GCGdialogSelect ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog,
std::vector< PARTIALDECOMP * > & partialdeclist )
static

Lets the user select decompositions from the explore menu

Returns
SCIP status
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
partialdeclistcurrent list of partialdecs

Definition at line 714 of file dialog_explore.cpp.

References assert(), GCGdialogSelect(), GCGgetOrigprob(), gcg::PARTIALDECOMP::isSelected(), SCIP_CALL(), and gcg::PARTIALDECOMP::setSelected().

Referenced by GCGdialogExecCommand(), and GCGdialogSelect().

◆ GCGdialogSortAsc()

SCIP_RETCODE gcg::GCGdialogSortAsc ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog,
bool & asc )
static

Set whether order in menu should be ascending/descending

Returns
SCIP return code
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
asctrue iff sorting should be ascending

Definition at line 761 of file dialog_explore.cpp.

References assert(), GCGdialogSortAsc(), GCGgetOrigprob(), and SCIP_CALL().

Referenced by GCGdialogExecCommand(), and GCGdialogSortAsc().

◆ isHeader()

bool gcg::isHeader ( std::string & header,
std::vector< AbstractColumn * > & columns )
static

Checks whether the given header is valid

Returns
true iff header is valid
Parameters
headerheader to check
columnsvector of pointers to columns

Definition at line 802 of file dialog_explore.cpp.

References isHeader().

Referenced by GCGdialogExecExplore(), GCGdialogSortBy(), and isHeader().

◆ GCGdialogSortBy()

SCIP_RETCODE gcg::GCGdialogSortBy ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog,
std::vector< AbstractColumn * > & columns,
std::string & sortby )
static

Set whether order in menu should be ascending/descending

Returns
SCIP return code
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
columnsvector of pointers to columns
sortbytable header, identifies by which column to sort by

Definition at line 822 of file dialog_explore.cpp.

References assert(), GCGdialogSortBy(), GCGgetCurrentScore(), GCGgetOrigprob(), GCGscoreGetShortname(), isHeader(), and SCIP_CALL().

Referenced by GCGdialogExecCommand(), and GCGdialogSortBy().

◆ GCGdialogChangeListMode()

SCIP_RETCODE gcg::GCGdialogChangeListMode ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog,
bool & listopenpartialdecs )
static

Set whether order in menu should be ascending/descending

Returns
SCIP return code
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
listopenpartialdecswill be updated

Definition at line 863 of file dialog_explore.cpp.

References assert(), GCGdialogChangeListMode(), GCGgetOrigprob(), and SCIP_CALL().

Referenced by GCGdialogChangeListMode(), and GCGdialogExecCommand().

◆ GCGdialogExecCommand()

SCIP_RETCODE gcg::GCGdialogExecCommand ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog,
std::vector< AbstractColumn * > & columns,
char * command,
int & startindex,
int & menulength,
bool & finished,
std::vector< PARTIALDECOMP * > & partialdeclist,
bool & sortasc,
std::string & sortby,
bool & listopenpartialdecs )
static
Parameters
gcgGCG data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
columnsvector of pointers to columns
commandthe command that was entered
startindexnumber of partialdec there the menu extract starts
menulengthcurrent menu length to be modified
finishedwhether to quit the menu
partialdeclistcurrent list of partialdec ids
sortasctrue iff sorting should be ascending
sortbyname of table header to identify sorting column
listopenpartialdecswhether open patialdecs should be listed

Definition at line 899 of file dialog_explore.cpp.

References GCGdialogChangeListMode(), GCGdialogChangeScore(), GCGdialogExecCommand(), GCGdialogInspectPartialdec(), GCGdialogSelect(), GCGdialogSelectVisualize(), GCGdialogSetNEntires(), GCGdialogShowHelp(), GCGdialogShowLegend(), GCGdialogSortAsc(), GCGdialogSortBy(), and SCIP_CALL().

Referenced by GCGdialogExecCommand(), and GCGdialogExecExplore().

◆ GCGdialogExecExplore()

SCIP_RETCODE gcg::GCGdialogExecExplore ( GCG * gcg,
SCIP_DIALOGHDLR * dialoghdlr,
SCIP_DIALOG * dialog )

< number of partialdec there the menu extract starts

< number of entries shown in menu

< whether to show entries in ascending order (score)

< table header, identifies by which column to sort by

< stores the last known number of partialdecs, is handed down to check for changes in partialdec number

Note
devs: if you want to add new headers, please specify their getters here!

Definition at line 1002 of file dialog_explore.cpp.

References assert(), BOOLEAN, gcg::PARTIALDECOMP::buildDecChainString(), gcg::Column< T >::Column(), DEFAULT_COLUMNS, DEFAULT_MENULENGTH, DEFAULT_SORT_HEADER, GCGdialogExecCommand(), GCGdialogExecExplore(), GCGdialogShowMenu(), GCGgetOrigprob(), gcg::PARTIALDECOMP::getID(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNMastervars(), gcg::PARTIALDECOMP::getNOpenconss(), gcg::PARTIALDECOMP::getNOpenvars(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getScore(), INTEGER, gcg::PARTIALDECOMP::isAssignedToPresolvedProb(), isHeader(), gcg::PARTIALDECOMP::isSelected(), REAL, SCIP_CALL(), sortPartialdecList(), STRING, UNKNOWN, and updatePartialdecList().

Referenced by GCGdialogExecExplore().

◆ SCIP_DECL_DIALOGEXEC() [1/3]

gcg::SCIP_DECL_DIALOGEXEC ( DialogWriteGraph::scip_exec )

◆ SCIP_DECL_DIALOGEXEC() [2/3]

gcg::SCIP_DECL_DIALOGEXEC ( DialogGraph::scip_exec )

Definition at line 70 of file dialog_graph.cpp.

References SCIP_CALL(), and SCIP_DECL_DIALOGEXEC().

◆ SCIP_DECL_DIALOGEXEC() [3/3]

gcg::SCIP_DECL_DIALOGEXEC ( DialogReadPartition::scip_exec )

Definition at line 81 of file dialog_graph.cpp.

References SCIP_CALL(), and SCIP_DECL_DIALOGEXEC().

Variable Documentation

◆ GraphAlgorithms< T >::cutoff

template<typename T>
double gcg::GraphAlgorithms< T >::cutoff = 0.0

Definition at line 55 of file graphalgorithms_def.h.