Scippy

SCIP

Solving Constraint Integer Programs

visual.h File Reference

Detailed Description

methods for creating output for visualization tools (VBC, BAK)

Author
Tobias Achterberg
Marc Pfetsch

Definition in file visual.h.

#include "scip/def.h"
#include "scip/type_set.h"
#include "scip/type_sol.h"
#include "scip/type_stat.h"
#include "scip/type_tree.h"
#include "scip/type_visual.h"

Go to the source code of this file.

Functions

SCIP_EXPORT SCIP_RETCODE SCIPvisualCreate (SCIP_VISUAL **visual, SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_EXPORT void SCIPvisualFree (SCIP_VISUAL **visual)
 
SCIP_EXPORT SCIP_RETCODE SCIPvisualInit (SCIP_VISUAL *visual, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_EXPORT void SCIPvisualExit (SCIP_VISUAL *visual, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_EXPORT SCIP_RETCODE SCIPvisualNewChild (SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
 
SCIP_RETCODE SCIPvisualUpdateChild (SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
 
SCIP_EXPORT void SCIPvisualSolvedNode (SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
 
SCIP_EXPORT void SCIPvisualCutoffNode (SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node, SCIP_Bool infeasible)
 
SCIP_EXPORT void SCIPvisualFoundConflict (SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
 
SCIP_EXPORT void SCIPvisualMarkedRepropagateNode (SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
 
SCIP_EXPORT void SCIPvisualRepropagatedNode (SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
 
SCIP_EXPORT void SCIPvisualFoundSolution (SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node, SCIP_Bool bettersol, SCIP_SOL *sol)
 
SCIP_EXPORT void SCIPvisualLowerbound (SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real lowerbound)
 
SCIP_EXPORT void SCIPvisualUpperbound (SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real upperbound)
 

Function Documentation

◆ SCIPvisualCreate()

SCIP_EXPORT SCIP_RETCODE SCIPvisualCreate ( SCIP_VISUAL **  visual,
SCIP_MESSAGEHDLR messagehdlr 
)

creates visualization data structure

Parameters
visualpointer to store visualization information
messagehdlrmessage handler

Definition at line 76 of file visual.c.

References BMSallocMemory, FALSE, SCIP_Visual::messagehdlr, NULL, SCIP_ALLOC, SCIP_INVALID, SCIP_OKAY, and SCIP_VBCCOLOR_NONE.

Referenced by SCIPstatCreate().

◆ SCIPvisualFree()

SCIP_EXPORT void SCIPvisualFree ( SCIP_VISUAL **  visual)

frees visualization data structure

Parameters
visualpointer to store visualization information

Definition at line 97 of file visual.c.

References BMSfreeMemory, and NULL.

Referenced by SCIPstatFree().

◆ SCIPvisualInit()

SCIP_EXPORT SCIP_RETCODE SCIPvisualInit ( SCIP_VISUAL visual,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr 
)

initializes visualization information and creates a file for visualization output

Parameters
visualvisualization information
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler

Definition at line 111 of file visual.c.

References SCIP_Visual::bakfile, SCIP_Visual::lastcolor, SCIP_Visual::lastlowerbound, SCIP_Visual::lastnode, SCIP_Visual::messagehdlr, SCIP_Visual::nodenum, NULL, SCIP_CALL, SCIP_FILECREATEERROR, SCIP_HASHSIZE_VBC, SCIP_OKAY, SCIP_VBCCOLOR_NONE, SCIP_VERBLEVEL_NORMAL, SCIPerrorMessage, SCIPhashmapCreate(), SCIPmessageFPrintInfo(), SCIPmessagePrintVerbInfo(), SCIPprintSysError(), SCIPsetInfinity(), SCIP_Visual::timestep, SCIP_Visual::userealtime, and SCIP_Visual::vbcfile.

Referenced by initSolve().

◆ SCIPvisualExit()

SCIP_EXPORT void SCIPvisualExit ( SCIP_VISUAL visual,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr 
)

closes the visualization output file

Parameters
visualvisualization information
setglobal SCIP settings
messagehdlrmessage handler

Definition at line 180 of file visual.c.

References SCIP_Visual::bakfile, SCIP_Visual::nodenum, NULL, SCIP_VERBLEVEL_FULL, SCIPhashmapFree(), SCIPmessagePrintVerbInfo(), and SCIP_Visual::vbcfile.

Referenced by freeReoptSolve(), and freeSolve().

◆ SCIPvisualNewChild()

◆ SCIPvisualUpdateChild()

◆ SCIPvisualSolvedNode()

SCIP_EXPORT void SCIPvisualSolvedNode ( SCIP_VISUAL visual,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NODE node 
)

◆ SCIPvisualCutoffNode()

SCIP_EXPORT void SCIPvisualCutoffNode ( SCIP_VISUAL visual,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NODE node,
SCIP_Bool  infeasible 
)

changes the color of the node to the color of cutoff nodes

Parameters
visualvisualization information
setglobal SCIP settings
statproblem statistics
nodenode, that was cut off
infeasiblewhether the node is infeasible (otherwise exceeded the cutoff bound)

Definition at line 524 of file visual.c.

References SCIP_Visual::bakfile, FALSE, getBranchInfo(), SCIP_Visual::messagehdlr, SCIP_Stat::nnodes, SCIP_Visual::nodenum, NULL, SCIP_Node::parent, printTime(), SCIP_BOUNDTYPE_LOWER, SCIP_NODETYPE_PROBINGNODE, SCIP_Real, SCIP_VBCCOLOR_CUTOFF, SCIPhashmapGetImageInt(), SCIPmessageFPrintInfo(), SCIPnodeGetDepth(), SCIPnodeGetLowerbound(), SCIPnodeGetType(), SCIPretransformObj(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), TRUE, SCIP_Visual::vbcfile, and vbcSetColor().

Referenced by nodeToLeaf(), SCIPnodeCutoff(), SCIPnodeFocus(), SCIPnodepqBound(), SCIPsolveCIP(), and SCIPtreeCutoff().

◆ SCIPvisualFoundConflict()

SCIP_EXPORT void SCIPvisualFoundConflict ( SCIP_VISUAL visual,
SCIP_STAT stat,
SCIP_NODE node 
)

changes the color of the node to the color of nodes where a conflict constraint was found

Parameters
visualvisualization information
statproblem statistics
nodenode, where the conflict was found

Definition at line 603 of file visual.c.

References NULL, SCIP_NODETYPE_PROBINGNODE, SCIP_VBCCOLOR_CONFLICT, SCIPnodeGetType(), and vbcSetColor().

Referenced by SCIPconflictFlushConss().

◆ SCIPvisualMarkedRepropagateNode()

SCIP_EXPORT void SCIPvisualMarkedRepropagateNode ( SCIP_VISUAL visual,
SCIP_STAT stat,
SCIP_NODE node 
)

changes the color of the node to the color of nodes that were marked to be repropagated

Parameters
visualvisualization information
statproblem statistics
nodenode, that was marked to be repropagated

Definition at line 621 of file visual.c.

References NULL, SCIP_NODETYPE_PROBINGNODE, SCIP_VBCCOLOR_MARKREPROP, SCIPnodeGetNumber(), SCIPnodeGetType(), and vbcSetColor().

Referenced by SCIPnodePropagateAgain().

◆ SCIPvisualRepropagatedNode()

SCIP_EXPORT void SCIPvisualRepropagatedNode ( SCIP_VISUAL visual,
SCIP_STAT stat,
SCIP_NODE node 
)

changes the color of the node to the color of repropagated nodes

Parameters
visualvisualization information
statproblem statistics
nodenode, that was repropagated

Definition at line 642 of file visual.c.

References NULL, SCIP_NODETYPE_PROBINGNODE, SCIP_VBCCOLOR_REPROP, SCIPnodeGetType(), and vbcSetColor().

Referenced by nodeRepropagate().

◆ SCIPvisualFoundSolution()

SCIP_EXPORT void SCIPvisualFoundSolution ( SCIP_VISUAL visual,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NODE node,
SCIP_Bool  bettersol,
SCIP_SOL sol 
)

changes the color of the node to the color of nodes with a primal solution

Parameters
visualvisualization information
setglobal SCIP settings
statproblem statistics
nodenode where the solution was found, or NULL
bettersolthe solution was better than the previous ones
solsolution that has been found

Definition at line 660 of file visual.c.

References SCIP_Visual::bakfile, FALSE, getBranchInfo(), SCIP_Visual::messagehdlr, SCIP_Visual::nodenum, NULL, SCIP_Node::parent, printTime(), SCIP_BOUNDTYPE_LOWER, SCIP_NODETYPE_PROBINGNODE, SCIP_Real, SCIP_VBCCOLOR_SOLUTION, SCIPgetSolOrigObj(), SCIPgetSolTransObj(), SCIPhashmapGetImageInt(), SCIPmessageFPrintInfo(), SCIPnodeGetParent(), SCIPnodeGetType(), SCIPsolGetHeur(), TRUE, SCIP_Visual::vbcfile, and vbcSetColor().

Referenced by primalAddSol().

◆ SCIPvisualLowerbound()

SCIP_EXPORT void SCIPvisualLowerbound ( SCIP_VISUAL visual,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Real  lowerbound 
)

outputs a new global lower bound to the visualization output file

Parameters
visualvisualization information
setglobal SCIP settings
statproblem statistics
lowerboundnew lower bound

Definition at line 759 of file visual.c.

References SCIP_Visual::lastlowerbound, SCIP_Visual::messagehdlr, NULL, printTime(), SCIP_OBJSENSE_MINIMIZE, SCIPgetObjsense(), SCIPmessageFPrintInfo(), SCIPretransformObj(), SCIPsetIsGT(), SCIPsetIsInfinity(), TRUE, and SCIP_Visual::vbcfile.

Referenced by SCIPnodeUpdateLowerbound().

◆ SCIPvisualUpperbound()

SCIP_EXPORT void SCIPvisualUpperbound ( SCIP_VISUAL visual,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Real  upperbound 
)

outputs a new global upper bound to the visualization output file

Parameters
visualvisualization information
setglobal SCIP settings
statproblem statistics
upperboundnew upper bound

Definition at line 796 of file visual.c.

References SCIP_Visual::messagehdlr, NULL, printTime(), SCIP_OBJSENSE_MINIMIZE, SCIPgetObjsense(), SCIPmessageFPrintInfo(), SCIPretransformObj(), TRUE, and SCIP_Visual::vbcfile.

Referenced by primalSetUpperbound().