Scippy

SCIP

Solving Constraint Integer Programs

objvardata.cpp File Reference

Detailed Description

C++ wrapper for user variable data.

Author
Tobias Achterberg

Definition in file objvardata.cpp.

#include <cassert>
#include "objvardata.h"

Go to the source code of this file.

Functions

static SCIP_DECL_VARDELORIG (varDelorigObj)
 
static SCIP_DECL_VARTRANS (varTransObj)
 
static SCIP_DECL_VARDELTRANS (varDeltransObj)
 
static SCIP_DECL_VARCOPY (varCopyObj)
 
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)
 
scip::ObjVardataSCIPgetObjVardata (SCIP *scip, SCIP_VAR *var)
 

Function Documentation

◆ SCIP_DECL_VARDELORIG()

static SCIP_DECL_VARDELORIG ( varDelorigObj  )
static

frees user data of original variable (called when the original variable is freed)

Definition at line 53 of file objvardata.cpp.

References SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_VARTRANS()

static SCIP_DECL_VARTRANS ( varTransObj  )
static

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

Definition at line 78 of file objvardata.cpp.

References SCIP_Bool, SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_VARDELTRANS()

static SCIP_DECL_VARDELTRANS ( varDeltransObj  )
static

frees user data of transformed variable (called when the transformed variable is freed)

Definition at line 102 of file objvardata.cpp.

References SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_VARCOPY()

static SCIP_DECL_VARCOPY ( varCopyObj  )
static

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

Definition at line 124 of file objvardata.cpp.

References SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SUCCESS, and TRUE.

◆ SCIPcreateObjVar()

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 
)

create and capture problem variable and associates the given variable data with the variable; if variable is of integral type, fractional bounds are automatically rounded

Parameters
scipSCIP data structure
varpointer to variable object
namename of variable, or NULL for automatic name creation
lblower bound of variable
ubupper bound of variable
objobjective function value
vartypetype of variable
initialshould var's column be present in the initial root LP?
removableis var's column removable from the LP (due to aging or cleanup)?
objvardatauser variable data object
deleteobjectshould the user variable data object be deleted when variable is freed?

Definition at line 166 of file objvardata.cpp.

References SCIP_CALL, SCIP_OKAY, and SCIPcreateVar().

Referenced by scip::ObjVardata::scip_copy().

◆ SCIPgetObjVardata()

scip::ObjVardata* SCIPgetObjVardata ( SCIP scip,
SCIP_VAR var 
)

gets user variable data object for given problem variable Warning! This method should only be called after a variable was created with SCIPcreateObjVar(). Otherwise, a segmentation fault may arise, or an undefined pointer is returned.

Parameters
scipSCIP data structure
varproblem variable

Definition at line 198 of file objvardata.cpp.

References SCIPvarGetData().

Referenced by scip::ObjVardata::scip_copy().