Scippy

GCG

Branch-and-Price & Column Generation for Everyone

gcg Namespace Reference

Data Structures

class  AbstractColumn
 
class  BipartiteGraph
 
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 enum ConsClassDecompInfo CONS_DECOMPINFO
 
typedef enum VarClassDecompInfo VAR_DECOMPINFO
 
using UNKNOWN_DUMMY_TYPE = bool
 
typedef struct gcg::subset subset
 
typedef enum DistanceMeasure DISTANCE_MEASURE
 
typedef enum WeightType WEIGHT_TYPE
 

Enumerations

enum  ConsClassDecompInfo {
  BOTH = 0,
  ONLY_MASTER = 1,
  ONLY_PRICING = 2
}
 
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  VarClassDecompInfo {
  ALL = 0,
  LINKING = 1,
  MASTER = 2,
  BLOCK = 3
}
 
enum  RETTYPE {
  UNKNOWN,
  INTEGER,
  FLOAT,
  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 More...
 
static bool compare_blocks (std::pair< int, int > const &a, std::pair< int, int > const &b)
 
 SCIP_DECL_SORTPTRCOMP (Pricingcontroller::comparePricingjobs)
 
static UNKNOWN_DUMMY_TYPE UNKNOWN_DUMMY_CALLBACK (SCIP *scip, int id)
 
bool updateIdList (SCIP *scip, std::vector< int > &idlist, unsigned int &npartialdecs, bool includeopenpartialdecs)
 
static void sortPartialdecList (SCIP *scip, std::vector< int > &idlist, std::string &header, std::vector< AbstractColumn * > &columns, bool asc)
 local sorting function for partialdec id vectors More...
 
static SCIP_RETCODE GCGdialogSetNEntires (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, int listlength, int &menulength)
 
static SCIP_RETCODE GCGdialogChangeScore (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog)
 
static SCIP_RETCODE outputCharXTimes (SCIP *scip, const char letter, int x)
 
static SCIP_RETCODE GCGdialogShowMenu (SCIP *scip, std::vector< AbstractColumn * > &columns, unsigned int &npartialdecs, const int startindex, int menulength, std::vector< int > &idlist, bool sortasc, std::string sortby, bool listopenpartialdecs)
 show current menu containing partialdec information More...
 
static SCIP_RETCODE GCGdialogShowLegend (SCIP *scip, std::vector< AbstractColumn * > &columns)
 
static SCIP_RETCODE GCGdialogShowHelp (SCIP *scip)
 Shows help section of explore menu. More...
 
static SCIP_RETCODE GCGdialogSelectVisualize (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< int > &idlist, SCIP_Bool open)
 
static SCIP_RETCODE GCGdialogInspectPartialdec (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< int > &idlist)
 
static SCIP_RETCODE GCGdialogSelect (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< int > idlist)
 
static SCIP_RETCODE GCGdialogSortAsc (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, bool &asc)
 
static bool isHeader (std::string &header, std::vector< AbstractColumn * > &columns)
 
static SCIP_RETCODE GCGdialogSortBy (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< AbstractColumn * > &columns, std::string &sortby)
 
static SCIP_RETCODE GCGdialogChangeListMode (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, bool &listopenpartialdecs)
 
static SCIP_RETCODE GCGdialogExecCommand (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, std::vector< AbstractColumn * > &columns, char *command, int &startindex, int &menulength, bool &finished, std::vector< int > &idlist, bool &sortasc, std::string &sortby, bool &listopenpartialdecs)
 
static int partialdecIdDummyGetter (SCIP *scip, int id)
 
SCIP_RETCODE GCGdialogExecExplore (SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog)
 method to handle user input for "explore" command More...
 
 SCIP_DECL_DIALOGEXEC (DialogWriteGraph::scip_exec)
 
 SCIP_DECL_DIALOGEXEC (DialogGraph::scip_exec)
 
 SCIP_DECL_DIALOGEXEC (DialogReadPartition::scip_exec)
 

Typedef Documentation

◆ CONS_DECOMPINFO

Definition at line 50 of file class_conspartition.h.

◆ VAR_DECOMPINFO

Definition at line 51 of file class_varpartition.h.

◆ UNKNOWN_DUMMY_TYPE

using gcg::UNKNOWN_DUMMY_TYPE = typedef bool

Definition at line 77 of file dialog_explore.cpp.

◆ subset

typedef struct gcg::subset gcg::subset

◆ DISTANCE_MEASURE

Definition at line 52 of file rowgraph_weighted.h.

◆ WEIGHT_TYPE

Definition at line 59 of file rowgraph_weighted.h.

Enumeration Type Documentation

◆ ConsClassDecompInfo

Enumerator
BOTH 

assign class to master or pricing problem

ONLY_MASTER 

assign class only to master problem

ONLY_PRICING 

assign class only to pricing problem

Definition at line 44 of file class_conspartition.h.

◆ 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 61 of file class_partialdecomp.h.

◆ VarClassDecompInfo

Enumerator
ALL 
LINKING 
MASTER 
BLOCK 

Definition at line 44 of file class_varpartition.h.

◆ RETTYPE

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

Enumerator
UNKNOWN 

dummy default to catch errors

INTEGER 

integer

FLOAT 

float

BOOLEAN 

Boolean

STRING 

char*

Definition at line 68 of file dialog_explore.cpp.

◆ DistanceMeasure

Enumerator
JOHNSON 
INTERSECTION 
JACCARD 
COSINE 
SIMPSON 

Definition at line 44 of file rowgraph_weighted.h.

◆ WeightType

Enumerator
SIM 
DIST 

Definition at line 54 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 117 of file class_detprobdata.cpp.

Referenced by gcg::DETPROBDATA::DETPROBDATA().

◆ realArraysAreEqual()

static 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 229 of file class_partialdecomp.cpp.

◆ compare_blocks()

static 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 261 of file class_partialdecomp.cpp.

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

◆ SCIP_DECL_SORTPTRCOMP()

gcg::SCIP_DECL_SORTPTRCOMP ( Pricingcontroller::comparePricingjobs  )

◆ UNKNOWN_DUMMY_CALLBACK()

static UNKNOWN_DUMMY_TYPE gcg::UNKNOWN_DUMMY_CALLBACK ( SCIP *  scip,
int  id 
)
static

Definition at line 79 of file dialog_explore.cpp.

Referenced by GCGdialogExecExplore().

◆ updateIdList()

bool gcg::updateIdList ( SCIP *  scip,
std::vector< int > &  idlist,
unsigned int &  npartialdecs,
bool  includeopenpartialdecs 
)

◆ sortPartialdecList()

static void gcg::sortPartialdecList ( SCIP *  scip,
std::vector< int > &  idlist,
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
scipSCIP data structure
idlistcurrent list of partialdec ids
headerheader of column to sort by
columnsvector of pointers to columns
ascwhether to sort ascending or descending

Definition at line 181 of file dialog_explore.cpp.

References UNKNOWN.

Referenced by GCGdialogExecExplore(), and GCGdialogShowMenu().

◆ GCGdialogSetNEntires()

static SCIP_RETCODE gcg::GCGdialogSetNEntires ( SCIP *  scip,
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
scipSCIP 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 212 of file dialog_explore.cpp.

References GCGconshdlrDecompGetNPartialdecs().

Referenced by GCGdialogExecCommand().

◆ GCGdialogChangeScore()

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

sets the used score according to user input

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

Definition at line 263 of file dialog_explore.cpp.

References GCGconshdlrDecompSetScoretype().

Referenced by GCGdialogExecCommand().

◆ outputCharXTimes()

static 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 306 of file dialog_explore.cpp.

Referenced by GCGdialogShowMenu().

◆ GCGdialogShowMenu()

static SCIP_RETCODE gcg::GCGdialogShowMenu ( SCIP *  scip,
std::vector< AbstractColumn * > &  columns,
unsigned int &  npartialdecs,
const int  startindex,
int  menulength,
std::vector< int > &  idlist,
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
scipSCIP data structure
columnsvector of pointers to columns
npartialdecsmax number of partialdecs
startindexindex (in partialdec list) of uppermost partialdec in extract
menulengthnumber of menu entries
idlistcurrent list of partialdec ids
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 325 of file dialog_explore.cpp.

References DEFAULT_COLUMN_MIN_WIDTH, GCGconshdlrDecompGetPartialdecFromID(), GCGconshdlrDecompGetScoretype(), GCGscoretypeGetShortName(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), gcg::PARTIALDECOMP::isComplete(), outputCharXTimes(), sortPartialdecList(), and updateIdList().

Referenced by GCGdialogExecExplore().

◆ GCGdialogShowLegend()

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

Shows information about the explore screen and its abbreviations

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

Definition at line 479 of file dialog_explore.cpp.

References DECdetectorGetChar(), DECdetectorGetName(), GCGconshdlrDecompGetDetectors(), GCGconshdlrDecompGetNDetectors(), GCGconshdlrDecompGetScoretype(), GCGscoretypeGetDescription(), and GCGscoretypeGetShortName().

Referenced by GCGdialogExecCommand().

◆ GCGdialogShowHelp()

static SCIP_RETCODE gcg::GCGdialogShowHelp ( SCIP *  scip)
static

Shows help section of explore menu.

Outputs al ist of commands and a description of their function

Returns
SCIP status
Parameters
scipSCIP data structure

Definition at line 546 of file dialog_explore.cpp.

Referenced by GCGdialogExecCommand().

◆ GCGdialogSelectVisualize()

static SCIP_RETCODE gcg::GCGdialogSelectVisualize ( SCIP *  scip,
SCIP_DIALOGHDLR *  dialoghdlr,
SCIP_DIALOG *  dialog,
std::vector< int > &  idlist,
SCIP_Bool  open 
)
static

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

Returns
SCIP status
Parameters
scipSCIP data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
idlistcurrent list of partialdec ids
opencompile and open gnuplot file?

Definition at line 585 of file dialog_explore.cpp.

References gcg::PARTIALDECOMP::exportVisualization(), GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::showVisualization().

Referenced by GCGdialogExecCommand().

◆ GCGdialogInspectPartialdec()

static SCIP_RETCODE gcg::GCGdialogInspectPartialdec ( SCIP *  scip,
SCIP_DIALOGHDLR *  dialoghdlr,
SCIP_DIALOG *  dialog,
std::vector< int > &  idlist 
)
static

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

Returns
SCIP status
Parameters
scipSCIP data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
idlistcurrent list of partialdec ids

Definition at line 632 of file dialog_explore.cpp.

References gcg::PARTIALDECOMP::displayInfo(), and GCGconshdlrDecompGetPartialdecFromID().

Referenced by GCGdialogExecCommand().

◆ GCGdialogSelect()

static SCIP_RETCODE gcg::GCGdialogSelect ( SCIP *  scip,
SCIP_DIALOGHDLR *  dialoghdlr,
SCIP_DIALOG *  dialog,
std::vector< int >  idlist 
)
static

Lets the user select decompositions from the explore menu

Returns
SCIP status
Parameters
scipSCIP data structure
dialoghdlrdialog handler for user input management
dialogdialog for user input management
idlistcurrent list of partialdec ids

Definition at line 695 of file dialog_explore.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::isSelected(), and gcg::PARTIALDECOMP::setSelected().

Referenced by GCGdialogExecCommand().

◆ GCGdialogSortAsc()

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

Set whether order in menu should be ascending/descending

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

Definition at line 739 of file dialog_explore.cpp.

Referenced by GCGdialogExecCommand().

◆ isHeader()

static 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 777 of file dialog_explore.cpp.

Referenced by GCGdialogExecExplore(), and GCGdialogSortBy().

◆ GCGdialogSortBy()

static SCIP_RETCODE gcg::GCGdialogSortBy ( SCIP *  scip,
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
scipSCIP 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 797 of file dialog_explore.cpp.

References GCGconshdlrDecompGetScoretype(), GCGscoretypeGetShortName(), and isHeader().

Referenced by GCGdialogExecCommand().

◆ GCGdialogChangeListMode()

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

Set whether order in menu should be ascending/descending

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

Definition at line 835 of file dialog_explore.cpp.

Referenced by GCGdialogExecCommand().

◆ GCGdialogExecCommand()

static SCIP_RETCODE gcg::GCGdialogExecCommand ( SCIP *  scip,
SCIP_DIALOGHDLR *  dialoghdlr,
SCIP_DIALOG *  dialog,
std::vector< AbstractColumn * > &  columns,
char *  command,
int &  startindex,
int &  menulength,
bool &  finished,
std::vector< int > &  idlist,
bool &  sortasc,
std::string &  sortby,
bool &  listopenpartialdecs 
)
static
Parameters
scipSCIP 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
idlistcurrent 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 868 of file dialog_explore.cpp.

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

Referenced by GCGdialogExecExplore().

◆ partialdecIdDummyGetter()

static int gcg::partialdecIdDummyGetter ( SCIP *  scip,
int  id 
)
static

Definition at line 970 of file dialog_explore.cpp.

Referenced by GCGdialogExecExplore().

◆ GCGdialogExecExplore()

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

method to handle user input for "explore" command

Returns
SCIP return code

< 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 980 of file dialog_explore.cpp.

References BOOLEAN, DEFAULT_COLUMNS, DEFAULT_MENULENGTH, DEFAULT_SORT_HEADER, FLOAT, GCGconshdlrDecompGetDetectorHistoryByPartialdecId(), GCGconshdlrDecompGetNBlocksByPartialdecId(), GCGconshdlrDecompGetNLinkingVarsByPartialdecId(), GCGconshdlrDecompGetNMasterConssByPartialdecId(), GCGconshdlrDecompGetNMasterVarsByPartialdecId(), GCGconshdlrDecompGetNOpenConssByPartialdecId(), GCGconshdlrDecompGetNOpenVarsByPartialdecId(), GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId(), GCGconshdlrDecompGetScoreByPartialdecId(), GCGconshdlrDecompIsPresolvedByPartialdecId(), GCGconshdlrDecompIsSelectedByPartialdecId(), GCGdialogExecCommand(), GCGdialogShowMenu(), INTEGER, isHeader(), partialdecIdDummyGetter(), sortPartialdecList(), STRING, UNKNOWN, UNKNOWN_DUMMY_CALLBACK(), and updateIdList().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIP_DECL_DIALOGEXEC() [1/3]

gcg::SCIP_DECL_DIALOGEXEC ( DialogWriteGraph::scip_exec  )

Definition at line 57 of file dialog_graph.cpp.

◆ SCIP_DECL_DIALOGEXEC() [2/3]

gcg::SCIP_DECL_DIALOGEXEC ( DialogGraph::scip_exec  )

Definition at line 69 of file dialog_graph.cpp.

◆ SCIP_DECL_DIALOGEXEC() [3/3]

gcg::SCIP_DECL_DIALOGEXEC ( DialogReadPartition::scip_exec  )

Definition at line 80 of file dialog_graph.cpp.