objprobdata.h
Go to the documentation of this file.
30/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
46 * This class defines the interface for user problem data implemented in C++. This class can be accessed at any time
47 * using the methods SCIPgetObjProbData(). Therefore, it can be used to store data which has to be accessible within
71 /** destructor of user problem data to free original user data (called when original problem is freed)
73 * If the "deleteobject" flag in the SCIPcreateObjProb() method was set to TRUE, this method is not needed,
74 * because all the work to delete the user problem data can be done in the destructor of the user problem
75 * data object. If the "deleteobject" flag was set to FALSE, and the user problem data object stays alive
76 * after the SCIP problem is freed, this method should delete all the problem specific data that is no
90 * 1. Return the pointer to the original problem data object (this) as pointer to the transformed problem data
91 * object. The user may modify some internal attributes, but he has to make sure, that these modifications are
92 * reversed in the scip_deltrans() method, such that the original problem data is restored. In this case,
93 * he should set *deleteobject to FALSE, because the problem data must not be destructed by SCIP after the
95 * 2. Call the copy constructor of the problem data object and return the created copy as transformed problem
96 * data object. In this case, he probably wants to set *deleteobject to TRUE, thus letting SCIP call the
102 SCIP_Bool* deleteobject /**< pointer to store whether SCIP should delete the object after solving */
109 * SCIP must not destruct the transformed problem data object, because the original problem data must stay alive
117 /** destructor of user problem data to free transformed user data (called when transformed problem is freed)
119 * If the "*deleteobject" flag in the scip_trans() method was set to TRUE, this method is not needed,
120 * because all the work to delete the user problem data can be done in the destructor of the user problem
121 * data object. If the "*deleteobject" flag was set to FALSE, and the user problem data object stays alive
122 * after the SCIP problem is freed, this method should delete all the problem specific data that is no
132 /** solving process initialization method of transformed data (called before the branch and bound process begins)
134 * This method is called before the branch and bound process begins and can be used to initialize user problem
135 * data that depends for example on the number of active problem variables, because these are now fixed.
144 /** solving process deinitialization method of transformed data (called before the branch and bound data is freed)
146 * This method is called before the branch and bound data is freed and should be used to free all data that
147 * was allocated in the solving process initialization method. The user has to make sure, that all LP rows associated
160 * This method should copy the problem data of the source SCIP and create a target problem data for (target)
161 * SCIP. Implementing this callback is optional. If the copying process was successful the target SCIP gets this
162 * problem data assigned. In case the result pointer is set to SCIP_DIDNOTRUN the target SCIP will have no problem data
165 * The variable map and the constraint map can be used via the function SCIPgetVarCopy() and SCIPgetConsCopy(),
166 * respectively, to get for certain variables and constraints of the source SCIP the counter parts in the target
167 * SCIP. You should be very carefully in using these two methods since they could lead to an infinite loop due to
177 SCIP_HASHMAP* varmap, /**< a hashmap which stores the mapping of source variables to corresponding
179 SCIP_HASHMAP* consmap, /**< a hashmap which stores the mapping of source contraints to corresponding
196/** creates empty problem, initializes all solving data structures, and sets the user problem data to point to the
224 SCIP_Bool deleteobject /**< should the user problem data object be deleted when problem is freed? */
228 * Warning! This method should only be called after a problem was created with SCIPcreateObjProb().
ObjProbData & operator=(ObjProbData &&o)=delete
ObjProbData & operator=(const ObjProbData &o)=delete
virtual SCIP_RETCODE scip_delorig(SCIP *scip)
Definition: objprobdata.h:79
virtual SCIP_RETCODE scip_exitsol(SCIP *scip, SCIP_Bool restart)
Definition: objprobdata.h:150
virtual SCIP_RETCODE scip_copy(SCIP *scip, SCIP *sourcescip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, ObjProbData **objprobdata, SCIP_Bool global, SCIP_RESULT *result)
Definition: objprobdata.h:174
virtual SCIP_RETCODE scip_trans(SCIP *scip, ObjProbData **objprobdata, SCIP_Bool *deleteobject)
Definition: objprobdata.h:99
virtual SCIP_RETCODE scip_initsol(SCIP *scip)
Definition: objprobdata.h:137
virtual SCIP_RETCODE scip_deltrans(SCIP *scip)
Definition: objprobdata.h:125
Definition: objbenders.h:44
definition of base class for all clonable classes
SCIP_RETCODE SCIPcreateObjProb(SCIP *scip, const char *name, scip::ObjProbData *objprobdata, SCIP_Bool deleteobject)
Definition: objprobdata.cpp:202
SCIP callable library.
Definition: struct_misc.h:138
Definition: struct_scip.h:70