objvardata.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 variable data implemented in C++. Each variable can be equipped with a 38 * variable data class. This data can be accessed via the function SCIPgetObjVardata() at any time after it is created 56 /** destructor of user variable data to free original user data (called when original variable is freed) 58 * If the "deleteobject" flag in the SCIPcreateObjVar() method was set to TRUE, this method is not needed, 59 * because all the work to delete the user variable data can be done in the destructor of the user variable 60 * data object. If the "deleteobject" flag was set to FALSE, and the user variable data object stays alive 61 * after the SCIP variable is freed, this method should delete all the variable specific data that is no 76 * 1. Return the pointer to the original variable data object (this) as pointer to the transformed variable data 77 * object. The user may modify some internal attributes, but he has to make sure, that these modifications are 78 * reversed in the scip_deltrans() method, such that the original variable data is restored. In this case, 79 * he should set *deleteobject to FALSE, because the variable data must not be destructed by SCIP after the 81 * 2. Call the copy constructor of the variable data object and return the created copy as transformed variable 82 * data object. In this case, he probably wants to set *deleteobject to TRUE, thus letting SCIP call the 89 SCIP_Bool* deleteobject /**< pointer to store whether SCIP should delete the object after solving */ 96 * SCIP must not destruct the transformed variable data object, because the original variable data must stay alive 104 /** destructor of user variable data to free transformed user data (called when transformed variable is freed) 106 * If the "*deleteobject" flag in the scip_trans() method was set to TRUE, this method is not needed, 107 * because all the work to delete the user variable data can be done in the destructor of the user variable 108 * data object. If the "*deleteobject" flag was set to FALSE, and the user variable data object stays alive 109 * after the SCIP variable is freed, this method should delete all the variable specific data that is no 122 * This method should copy the variable data of the source SCIP and create a target variable data for target 123 * variable. This callback is optional. If the copying process was successful, the target variable gets this variable 124 * data assigned. In case the result pointer is set to SCIP_DIDNOTRUN, the target variable will have no variable data at 127 * The variable map and the constraint map can be used via the function SCIPgetVarCopy() and SCIPgetConsCopy(), 128 * respectively, to get for certain variables and constraints of the source SCIP the counter parts in the target 129 * SCIP. You should be very carefully in using these two methods since they could lead to infinite loop. 139 SCIP_HASHMAP* varmap, /**< a hashmap which stores the mapping of source variables to corresponding 141 SCIP_HASHMAP* consmap, /**< a hashmap which stores the mapping of source contraints to corresponding 143 SCIP_VAR* targetvar, /**< variable of the (targert) SCIP (targetvar is the copy of sourcevar) */ 158 /** create and capture problem variable and associates the given variable data with the variable; 173 SCIP_Bool deleteobject /**< should the user variable data object be deleted when variable is freed? */ 177 * Warning! This method should only be called after a variable was created with SCIPcreateObjVar().
virtual SCIP_RETCODE scip_deltrans(SCIP *scip, SCIP_VAR *var) Definition: objvardata.h:112 Definition: type_result.h:33 Definition: struct_scip.h:53 Definition: struct_var.h:196 definition of base class for all clonable classes Definition: struct_misc.h:101 scip::ObjVardata * SCIPgetObjVardata(SCIP *scip, SCIP_VAR *var) Definition: objvardata.cpp:198 Definition: type_retcode.h:33 virtual SCIP_RETCODE scip_delorig(SCIP *scip, SCIP_VAR *var) Definition: objvardata.h:64 virtual SCIP_RETCODE scip_trans(SCIP *scip, SCIP_VAR *var, ObjVardata **objvardata, SCIP_Bool *deleteobject) Definition: objvardata.h:85 SCIP_RETCODE SCIPcreateObjVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, scip::ObjVardata *objvardata, SCIP_Bool deleteobject) Definition: objvardata.cpp:166 Definition: objbranchrule.h:33 virtual SCIP_RETCODE scip_copy(SCIP *scip, SCIP *sourcescip, SCIP_VAR *sourcevar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_VAR *targetvar, ObjVardata **objvardata, SCIP_RESULT *result) Definition: objvardata.h:135 SCIP callable library. |