Scippy

SCIP

Solving Constraint Integer Programs

tsp::ProbDataTSP Class Reference

Detailed Description

SCIP user problem data for TSP

Definition at line 42 of file ProbDataTSP.h.

#include <ProbDataTSP.h>

Public Member Functions

 ProbDataTSP (GRAPH *g)
 
virtual ~ProbDataTSP ()
 
virtual SCIP_RETCODE scip_copy (SCIP *scip, SCIP *sourcescip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, ObjProbData **objprobdata, SCIP_Bool global, SCIP_RESULT *result)
 
virtual SCIP_RETCODE scip_delorig (SCIP *scip)
 
virtual SCIP_RETCODE scip_deltrans (SCIP *scip)
 
virtual SCIP_RETCODE scip_trans (SCIP *scip, ObjProbData **objprobdata, SCIP_Bool *deleteobject)
 
GRAPHgetGraph ()
 
- Public Member Functions inherited from scip::ObjProbData
 ObjProbData ()
 
virtual ~ObjProbData ()
 
ObjProbDataoperator= (const ObjProbData &o)=delete
 
ObjProbDataoperator= (ObjProbData &&o)=delete
 
virtual SCIP_RETCODE scip_delorig (SCIP *scip)
 
virtual SCIP_RETCODE scip_trans (SCIP *scip, ObjProbData **objprobdata, SCIP_Bool *deleteobject)
 
virtual SCIP_RETCODE scip_deltrans (SCIP *scip)
 
virtual SCIP_RETCODE scip_initsol (SCIP *scip)
 
virtual SCIP_RETCODE scip_exitsol (SCIP *scip, SCIP_Bool restart)
 
virtual SCIP_RETCODE scip_copy (SCIP *scip, SCIP *sourcescip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, ObjProbData **objprobdata, SCIP_Bool global, SCIP_RESULT *result)
 

Constructor & Destructor Documentation

◆ ProbDataTSP()

tsp::ProbDataTSP::ProbDataTSP ( GRAPH g)
inline

default constructor

Parameters
ggraph data

Definition at line 49 of file ProbDataTSP.h.

References capture_graph().

Referenced by scip_copy(), and scip_trans().

◆ ~ProbDataTSP()

virtual tsp::ProbDataTSP::~ProbDataTSP ( )
inlinevirtual

destructor

Definition at line 58 of file ProbDataTSP.h.

References NULL, and release_graph().

Member Function Documentation

◆ scip_copy()

SCIP_RETCODE ProbDataTSP::scip_copy ( SCIP scip,
SCIP sourcescip,
SCIP_HASHMAP varmap,
SCIP_HASHMAP consmap,
ObjProbData **  objprobdata,
SCIP_Bool  global,
SCIP_RESULT result 
)
virtual

Copies user data if you want to copy it to a subscip

copies user data if you want to copy it to a subscip

Parameters
scipSCIP data structure
sourcescipsource SCIP main data structure
varmapa hashmap which stores the mapping of source variables to corresponding target variables
consmapa hashmap which stores the mapping of source contraints to corresponding target constraints
objprobdatapointer to store the copied problem data object
globalcreate a global or a local copy?
resultpointer to store the result of the call

Definition at line 124 of file ProbDataTSP.cpp.

References copy_graph(), Graph::edges, Graph::nedges, NULL, ProbDataTSP(), release_graph(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_SUCCESS, SCIPcaptureVar(), SCIPgetObjProbData(), SCIPgetVarCopy(), and GraphEdge::var.

◆ scip_delorig()

SCIP_RETCODE ProbDataTSP::scip_delorig ( SCIP scip)
virtual

destructor of user problem data to free original user data (called when original problem is freed)

Parameters
scipSCIP data structure

Reimplemented from scip::ObjProbData.

Definition at line 184 of file ProbDataTSP.cpp.

References GraphEdge::back, Graph::edges, Graph::nedges, release_graph(), SCIP_CALL, SCIP_OKAY, SCIPreleaseVar(), and GraphEdge::var.

◆ scip_deltrans()

SCIP_RETCODE ProbDataTSP::scip_deltrans ( SCIP scip)
virtual

destructor of user problem data to free transformed user data (called when transformed problem is freed)

destructor of user problem data to free original user data (called when original problem is freed)

Parameters
scipSCIP data structure

Reimplemented from scip::ObjProbData.

Definition at line 199 of file ProbDataTSP.cpp.

References GraphEdge::back, Graph::edges, Graph::nedges, release_graph(), SCIP_CALL, SCIP_OKAY, SCIPreleaseVar(), and GraphEdge::var.

◆ scip_trans()

SCIP_RETCODE ProbDataTSP::scip_trans ( SCIP scip,
ObjProbData **  objprobdata,
SCIP_Bool deleteobject 
)
virtual

creates user data of transformed problem by transforming the original user problem data (called after problem was transformed)

Parameters
scipSCIP data structure
objprobdatapointer to store the transformed problem data object
deleteobjectpointer to store whether SCIP should delete the object after solving

Definition at line 215 of file ProbDataTSP.cpp.

References copy_graph(), Graph::edges, Graph::nedges, NULL, ProbDataTSP(), release_graph(), SCIP_CALL, SCIP_OKAY, SCIPcaptureVar(), SCIPgetTransformedVar(), TRUE, and GraphEdge::var.

◆ getGraph()

GRAPH * tsp::ProbDataTSP::getGraph ( )
inline