objprobdata.h
Go to the documentation of this file.
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
37 * This class defines the interface for user problem data implemented in C++. This class can be accessed at any time
38 * using the methods SCIPgetObjProbData(). Therefore, it can be used to store data which has to be accessible within
56 /** destructor of user problem data to free original user data (called when original problem is freed)
58 * If the "deleteobject" flag in the SCIPcreateObjProb() method was set to TRUE, this method is not needed,
59 * because all the work to delete the user problem data can be done in the destructor of the user problem
60 * data object. If the "deleteobject" flag was set to FALSE, and the user problem data object stays alive
61 * after the SCIP problem is freed, this method should delete all the problem specific data that is no
75 * 1. Return the pointer to the original problem data object (this) as pointer to the transformed problem data
76 * object. The user may modify some internal attributes, but he has to make sure, that these modifications are
77 * reversed in the scip_deltrans() method, such that the original problem data is restored. In this case,
78 * he should set *deleteobject to FALSE, because the problem data must not be destructed by SCIP after the
80 * 2. Call the copy constructor of the problem data object and return the created copy as transformed problem
81 * data object. In this case, he probably wants to set *deleteobject to TRUE, thus letting SCIP call the
87 SCIP_Bool* deleteobject /**< pointer to store whether SCIP should delete the object after solving */
94 * SCIP must not destruct the transformed problem data object, because the original problem data must stay alive
102 /** destructor of user problem data to free transformed user data (called when transformed problem is freed)
104 * If the "*deleteobject" flag in the scip_trans() method was set to TRUE, this method is not needed,
105 * because all the work to delete the user problem data can be done in the destructor of the user problem
106 * data object. If the "*deleteobject" flag was set to FALSE, and the user problem data object stays alive
107 * after the SCIP problem is freed, this method should delete all the problem specific data that is no
117 /** solving process initialization method of transformed data (called before the branch and bound process begins)
119 * This method is called before the branch and bound process begins and can be used to initialize user problem
120 * data that depends for example on the number of active problem variables, because these are now fixed.
129 /** solving process deinitialization method of transformed data (called before the branch and bound data is freed)
131 * This method is called before the branch and bound data is freed and should be used to free all data that
132 * was allocated in the solving process initialization method. The user has to make sure, that all LP rows associated
145 * This method should copy the problem data of the source SCIP and create a target problem data for (target)
146 * SCIP. Implementing this callback is optional. If the copying process was successful the target SCIP gets this
147 * problem data assigned. In case the result pointer is set to SCIP_DIDNOTRUN the target SCIP will have no problem data
150 * The variable map and the constraint map can be used via the function SCIPgetVarCopy() and SCIPgetConsCopy(),
151 * respectively, to get for certain variables and constraints of the source SCIP the counter parts in the target
152 * SCIP. You should be very carefully in using these two methods since they could lead to an infinite loop due to
162 SCIP_HASHMAP* varmap, /**< a hashmap which stores the mapping of source variables to corresponding
164 SCIP_HASHMAP* consmap, /**< a hashmap which stores the mapping of source contraints to corresponding
181 /** creates empty problem, initializes all solving data structures, and sets the user problem data to point to the
209 SCIP_Bool deleteobject /**< should the user problem data object be deleted when problem is freed? */
213 * Warning! This method should only be called after a problem was created with SCIPcreateObjProb().
Definition: type_result.h:33
Definition: struct_scip.h:58
virtual SCIP_RETCODE scip_trans(SCIP *scip, ObjProbData **objprobdata, SCIP_Bool *deleteobject)
Definition: objprobdata.h:84
virtual SCIP_RETCODE scip_deltrans(SCIP *scip)
Definition: objprobdata.h:110
virtual SCIP_RETCODE scip_delorig(SCIP *scip)
Definition: objprobdata.h:64
definition of base class for all clonable classes
virtual SCIP_RETCODE scip_initsol(SCIP *scip)
Definition: objprobdata.h:122
Definition: struct_misc.h:121
Definition: type_retcode.h:33
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:159
SCIP_RETCODE SCIPcreateObjProb(SCIP *scip, const char *name, scip::ObjProbData *objprobdata, SCIP_Bool deleteobject)
Definition: objprobdata.cpp:193
virtual SCIP_RETCODE scip_exitsol(SCIP *scip, SCIP_Bool restart)
Definition: objprobdata.h:135
Definition: objbenders.h:33
SCIP callable library.