Scippy

GCG

Branch-and-Price & Column Generation for Everyone

dialog_gcg.c File Reference

Detailed Description

GCG user interface dialog.

Author
Tobias Achterberg
Timo Berthold
Gerald Gamrath
Martin Bergner
Christian Puchert

Definition in file dialog_gcg.c.

#include <sys/stat.h>
#include <assert.h>
#include <string.h>
#include "scip/pub_dialog.h"
#include "scip/type_dialog.h"
#include "scip/dialog_default.h"
#include "gcg.h"
#include "dialog_gcg.h"
#include "relax_gcg.h"
#include "pricer_gcg.h"
#include "cons_decomp.h"
#include "pub_gcgheur.h"
#include "pub_gcgsepa.h"
#include "stat.h"
#include "reader_tex.h"
#include "reader_gp.h"
#include "params_visu.h"
#include "dialog_explore.h"

Go to the source code of this file.

Functions

static void displayReaders (SCIP *scip, SCIP_Bool reader, SCIP_Bool writer)
 
static SCIP_RETCODE writeAllDecompositions (SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog, SCIP_Bool original, SCIP_Bool presolved)
 
static SCIP_RETCODE writeSelectedDecompositions (SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog)
 
static SCIP_RETCODE writeMatrix (SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog, SCIP_Bool originalmatrix)
 
static SCIP_RETCODE reportAllDecompositions (SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecDisplayStatistics)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecPrintDetectionInformation)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecChangeAddBlocknr)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecDisplayDecomposition)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecDisplayNBlockcandidates)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecDisplayAdditionalStatistics)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecDisplayDetectors)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecDisplaySolvers)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetMaster)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetLoadmaster)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecTransform)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecPresolve)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecDetect)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSelect)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecOptimize)
 
static SCIP_DECL_DIALOGEXEC (GCGdialogExecWriteAllDecompositions)
 
static SCIP_DECL_DIALOGEXEC (GCGdialogExecWriteSelectedDecompositions)
 
static SCIP_DECL_DIALOGEXEC (GCGdialogExecWriteOrigMatrix)
 
static SCIP_DECL_DIALOGEXEC (GCGdialogExecWriteTransMatrix)
 
static SCIP_DECL_DIALOGEXEC (GCGdialogExecReportAllDecompositions)
 
static SCIP_DECL_DIALOGEXEC (GCGdialogExecWriteStatistics)
 
 SCIP_DECL_DIALOGEXEC (SCIPdialogExecSetDetectorsAggressive)
 
 SCIP_DECL_DIALOGEXEC (SCIPdialogExecSetDetectorsDefault)
 
 SCIP_DECL_DIALOGEXEC (SCIPdialogExecSetDetectorsOff)
 
 SCIP_DECL_DIALOGEXEC (SCIPdialogExecSetDetectorsFast)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetHeuristicsAggressive)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetHeuristicsOff)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetHeuristicsFast)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetSeparatorsDefault)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetSeparatorsAggressive)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetSeparatorsOff)
 
 SCIP_DECL_DIALOGEXEC (GCGdialogExecSetSeparatorsFast)
 
SCIP_RETCODE GCGcreateRootDialog (SCIP *scip, SCIP_DIALOG **root)
 
static SCIP_RETCODE createEmphasisSubmenu (SCIP *scip, SCIP_DIALOG *root, SCIP_DIALOG **submenu)
 
SCIP_RETCODE SCIPincludeDialogGcg (SCIP *scip)
 

Function Documentation

◆ displayReaders()

static void displayReaders ( SCIP *  scip,
SCIP_Bool  reader,
SCIP_Bool  writer 
)
static

display the reader information

Returns
nothing
Parameters
scipSCIP data structure
readerdisplay reader which can read
writerdisplay reader which can write

Definition at line 64 of file dialog_gcg.c.

Referenced by writeAllDecompositions(), and writeSelectedDecompositions().

◆ writeAllDecompositions()

static SCIP_RETCODE writeAllDecompositions ( SCIP *  scip,
SCIP_DIALOG *  dialog,
SCIP_DIALOGHDLR *  dialoghdlr,
SCIP_DIALOG **  nextdialog,
SCIP_Bool  original,
SCIP_Bool  presolved 
)
static

writes out all decompositions currently known to cons_decomp

Returns
SCIP return code
Parameters
scipSCIP data structure
dialogdialog menu
dialoghdlrdialog handler
nextdialogpointer to store next dialog to execute
originalshould decomps for original problem be written
presolvedshould decomps for presolved problem be written

Definition at line 102 of file dialog_gcg.c.

References DECwriteAllDecomps(), displayReaders(), and GCGconshdlrDecompGetNDecomps().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ writeSelectedDecompositions()

static SCIP_RETCODE writeSelectedDecompositions ( SCIP *  scip,
SCIP_DIALOG *  dialog,
SCIP_DIALOGHDLR *  dialoghdlr,
SCIP_DIALOG **  nextdialog 
)
static

writes out all decompositions currently known to cons_decomp

Parameters
scipSCIP data structure
dialogdialog menu
dialoghdlrdialog handler
nextdialogpointer to store next dialog to execute

Definition at line 193 of file dialog_gcg.c.

References DECwriteSelectedDecomps(), displayReaders(), and GCGconshdlrDecompGetNDecomps().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ writeMatrix()

static SCIP_RETCODE writeMatrix ( SCIP *  scip,
SCIP_DIALOG *  dialog,
SCIP_DIALOGHDLR *  dialoghdlr,
SCIP_DIALOG **  nextdialog,
SCIP_Bool  originalmatrix 
)
static

writes a block matrix to the location specified by the user

Returns
SCIP return code
Parameters
scipSCIP data structure
dialogdialog menu
dialoghdlrdialog handler
nextdialogpointer to store next dialog to execute
originalmatrixshould the original (or transformed) matrix be written

Definition at line 281 of file dialog_gcg.c.

References GCGWriteGpDecompMatrix().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ reportAllDecompositions()

static SCIP_RETCODE reportAllDecompositions ( SCIP *  scip,
SCIP_DIALOG *  dialog,
SCIP_DIALOGHDLR *  dialoghdlr,
SCIP_DIALOG **  nextdialog 
)
static

writes out visualizations and statistics of all decompositions currently known to cons_decomp to a PDF file

Returns
SCIP return code
Parameters
scipSCIP data structure
dialogdialog menu
dialoghdlrdialog handler
nextdialogpointer to store next dialog to execute

Definition at line 367 of file dialog_gcg.c.

References GCGconshdlrDecompGetFinishedPartialdecsList(), GCGconshdlrDecompGetNDecomps(), GCGgetUseGp(), GCGreportGetShowStatistics(), GCGreportGetShowTitlepage(), GCGreportGetShowToc(), and GCGwriteTexReport().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIP_DECL_DIALOGEXEC() [1/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecDisplayStatistics  )

dialog execution method for the display statistics command

Definition at line 449 of file dialog_gcg.c.

References GCGprintStatistics().

◆ SCIP_DECL_DIALOGEXEC() [2/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecPrintDetectionInformation  )

dialog execution method print complete detection information

Definition at line 462 of file dialog_gcg.c.

References GCGprintCompleteDetectionStatistics().

◆ SCIP_DECL_DIALOGEXEC() [3/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecChangeAddBlocknr  )

dialog execution method for adding block number candidate

Definition at line 475 of file dialog_gcg.c.

References GCGconshdlrDecompAddUserCandidatesNBlocks().

◆ SCIP_DECL_DIALOGEXEC() [4/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecDisplayDecomposition  )

dialog execution method for the display decomposition command

Definition at line 512 of file dialog_gcg.c.

◆ SCIP_DECL_DIALOGEXEC() [5/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecDisplayNBlockcandidates  )

dialog execution method for the display block number candidates

Definition at line 530 of file dialog_gcg.c.

References GCGprintBlockcandidateInformation().

◆ SCIP_DECL_DIALOGEXEC() [6/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecDisplayAdditionalStatistics  )

dialog execution method for the display additionalstatistics command

Definition at line 543 of file dialog_gcg.c.

References DEC_DECTYPE_DIAGONAL, DECdecompFree(), DECdecompGetType(), DECgetBestDecomp(), GCGgetMasterprob(), GCGpricerPrintStatistics(), GCGwriteDecompositionData(), and GCGwriteVarCreationDetails().

◆ SCIP_DECL_DIALOGEXEC() [7/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecDisplayDetectors  )

dialog execution method for the display detectors command

Definition at line 587 of file dialog_gcg.c.

References DECprintListOfDetectors().

◆ SCIP_DECL_DIALOGEXEC() [8/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecDisplaySolvers  )

dialog execution method for the display solvers command

Definition at line 600 of file dialog_gcg.c.

References GCGgetMasterprob(), and GCGpricerPrintListOfSolvers().

◆ SCIP_DECL_DIALOGEXEC() [9/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetMaster  )

dialog execution method for the master command

Definition at line 613 of file dialog_gcg.c.

References GCGgetMasterprob().

◆ SCIP_DECL_DIALOGEXEC() [10/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetLoadmaster  )

dialog execution method for the set loadmaster command

Definition at line 636 of file dialog_gcg.c.

References GCGgetMasterprob().

◆ SCIP_DECL_DIALOGEXEC() [11/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecTransform  )

dialog execution method for the transform command

Definition at line 674 of file dialog_gcg.c.

References GCGtransformProb().

◆ SCIP_DECL_DIALOGEXEC() [12/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecPresolve  )

dialog execution method for the presolve command

Definition at line 717 of file dialog_gcg.c.

References GCGpresolve().

◆ SCIP_DECL_DIALOGEXEC() [13/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecDetect  )

dialog execution method for the detect command

Definition at line 763 of file dialog_gcg.c.

References GCGdetect().

◆ SCIP_DECL_DIALOGEXEC() [14/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSelect  )

dialog execution method for the displaying and selecting decompositions command

Definition at line 803 of file dialog_gcg.c.

References GCGdialogExecExplore().

◆ SCIP_DECL_DIALOGEXEC() [15/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecOptimize  )

dialog execution method for the optimize command

Definition at line 818 of file dialog_gcg.c.

References GCGsolve().

◆ SCIP_DECL_DIALOGEXEC() [16/32]

static SCIP_DECL_DIALOGEXEC ( GCGdialogExecWriteAllDecompositions  )
static

dialog execution method for writing all known decompositions

Definition at line 862 of file dialog_gcg.c.

References writeAllDecompositions().

◆ SCIP_DECL_DIALOGEXEC() [17/32]

static SCIP_DECL_DIALOGEXEC ( GCGdialogExecWriteSelectedDecompositions  )
static

dialog execution method for writing selected decompositions

Definition at line 881 of file dialog_gcg.c.

References writeSelectedDecompositions().

◆ SCIP_DECL_DIALOGEXEC() [18/32]

static SCIP_DECL_DIALOGEXEC ( GCGdialogExecWriteOrigMatrix  )
static

dialog execution method for writing the original matrix

Definition at line 900 of file dialog_gcg.c.

References writeMatrix().

◆ SCIP_DECL_DIALOGEXEC() [19/32]

static SCIP_DECL_DIALOGEXEC ( GCGdialogExecWriteTransMatrix  )
static

dialog execution method for writing the transformed matrix

Definition at line 918 of file dialog_gcg.c.

References writeMatrix().

◆ SCIP_DECL_DIALOGEXEC() [20/32]

static SCIP_DECL_DIALOGEXEC ( GCGdialogExecReportAllDecompositions  )
static

dialog execution method for reporting all known decompositions in a PDF file

Definition at line 938 of file dialog_gcg.c.

References reportAllDecompositions().

◆ SCIP_DECL_DIALOGEXEC() [21/32]

static SCIP_DECL_DIALOGEXEC ( GCGdialogExecWriteStatistics  )
static

dialog execution method for writing problem statistics

Definition at line 956 of file dialog_gcg.c.

References GCGprintStatistics().

◆ SCIP_DECL_DIALOGEXEC() [22/32]

SCIP_DECL_DIALOGEXEC ( SCIPdialogExecSetDetectorsAggressive  )

dialog execution method for the set detectors aggressive command

Definition at line 1006 of file dialog_gcg.c.

References GCGconshdlrDecompSetDetection().

◆ SCIP_DECL_DIALOGEXEC() [23/32]

SCIP_DECL_DIALOGEXEC ( SCIPdialogExecSetDetectorsDefault  )

dialog execution method for the set detectors default command

Definition at line 1018 of file dialog_gcg.c.

References GCGconshdlrDecompSetDetection().

◆ SCIP_DECL_DIALOGEXEC() [24/32]

SCIP_DECL_DIALOGEXEC ( SCIPdialogExecSetDetectorsOff  )

dialog execution method for the set detectors off command

Definition at line 1030 of file dialog_gcg.c.

References GCGconshdlrDecompSetDetection().

◆ SCIP_DECL_DIALOGEXEC() [25/32]

SCIP_DECL_DIALOGEXEC ( SCIPdialogExecSetDetectorsFast  )

dialog execution method for the set detectors fast command

Definition at line 1042 of file dialog_gcg.c.

References GCGconshdlrDecompSetDetection().

◆ SCIP_DECL_DIALOGEXEC() [26/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetHeuristicsAggressive  )

dialog execution method for the set heuristics aggressive command

Definition at line 1054 of file dialog_gcg.c.

References GCGsetHeuristics().

◆ SCIP_DECL_DIALOGEXEC() [27/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetHeuristicsOff  )

dialog execution method for the set heuristics off command

Definition at line 1067 of file dialog_gcg.c.

References GCGsetHeuristics().

◆ SCIP_DECL_DIALOGEXEC() [28/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetHeuristicsFast  )

dialog execution method for the set heuristics fast command

Definition at line 1080 of file dialog_gcg.c.

References GCGsetHeuristics().

◆ SCIP_DECL_DIALOGEXEC() [29/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetSeparatorsDefault  )

dialog execution method for the set gcg separators default command

Definition at line 1093 of file dialog_gcg.c.

References GCGsetSeparators().

◆ SCIP_DECL_DIALOGEXEC() [30/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetSeparatorsAggressive  )

dialog execution method for the set gcg separators aggressive command

Definition at line 1105 of file dialog_gcg.c.

References GCGsetSeparators().

◆ SCIP_DECL_DIALOGEXEC() [31/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetSeparatorsOff  )

dialog execution method for the set gcg separators off command

Definition at line 1117 of file dialog_gcg.c.

References GCGsetSeparators().

◆ SCIP_DECL_DIALOGEXEC() [32/32]

SCIP_DECL_DIALOGEXEC ( GCGdialogExecSetSeparatorsFast  )

dialog execution method for the set gcg separators fast command

Definition at line 1129 of file dialog_gcg.c.

References GCGsetSeparators().

◆ GCGcreateRootDialog()

SCIP_RETCODE GCGcreateRootDialog ( SCIP *  scip,
SCIP_DIALOG **  root 
)

creates a root dialog

Returns
SCIP return code
Parameters
scipSCIP data structure
rootpointer to store the root dialog

Definition at line 1142 of file dialog_gcg.c.

Referenced by SCIPincludeDialogGcg().

◆ createEmphasisSubmenu()

static SCIP_RETCODE createEmphasisSubmenu ( SCIP *  scip,
SCIP_DIALOG *  root,
SCIP_DIALOG **  submenu 
)
static

create an "emphasis" sub menu

Returns
SCIP return code
Parameters
scipSCIP data structure
rootthe menu to add the empty sub menu
submenupointer to store the created emphasis sub menu

Definition at line 1160 of file dialog_gcg.c.

Referenced by SCIPincludeDialogGcg().

◆ SCIPincludeDialogGcg()

SCIP_RETCODE SCIPincludeDialogGcg ( SCIP *  scip)

includes or updates the GCG dialog menus in SCIP

Returns
SCIP return code
Parameters
scipSCIP data structure

Definition at line 1187 of file dialog_gcg.c.

References createEmphasisSubmenu(), and GCGcreateRootDialog().

Referenced by SCIPincludeGcgPlugins().