Scippy

    SCIP

    Solving Constraint Integer Programs

    Detailed Description

    type definitions for problem variables

    Author
    Tobias Achterberg

    This file defines the interface for user variable data implemented in C. Each variable can be equipped with a variable data struct. This data can be accessed via the function SCIPgetVardata() at any time after it is created and before it is deleted.

    Definition in file type_var.h.

    #include "scip/def.h"

    Go to the source code of this file.

    Macros

    #define SCIP_DEPRECATED_VARTYPE_IMPLINT   ((SCIP_VARTYPE) 2)
     
    #define SCIP_VARTYPE_BINARY_CHAR   'B'
     
    #define SCIP_VARTYPE_INTEGER_CHAR   'I'
     
    #define SCIP_VARTYPE_CONTINUOUS_CHAR   'C'
     
    #define SCIP_DEPRECATED_VARTYPE_IMPLINT_CHAR   'M'
     
    #define NLOCKTYPES   2
     
    #define SCIP_DECL_VARDELORIG(x)   SCIP_RETCODE x (SCIP* scip, SCIP_VAR* var, SCIP_VARDATA** vardata)
     
    #define SCIP_DECL_VARTRANS(x)   SCIP_RETCODE x (SCIP* scip, SCIP_VAR* sourcevar, SCIP_VARDATA* sourcedata, SCIP_VAR* targetvar, SCIP_VARDATA** targetdata)
     
    #define SCIP_DECL_VARDELTRANS(x)   SCIP_RETCODE x (SCIP* scip, SCIP_VAR* var, SCIP_VARDATA** vardata)
     
    #define SCIP_DECL_VARCOPY(x)
     

    Typedefs

    typedef enum SCIP_Varstatus SCIP_VARSTATUS
     
    typedef enum SCIP_Vartype SCIP_VARTYPE
     
    typedef enum SCIP_ImplintType SCIP_IMPLINTTYPE
     
    typedef enum SCIP_DomchgType SCIP_DOMCHGTYPE
     
    typedef enum SCIP_BoundchgType SCIP_BOUNDCHGTYPE
     
    typedef enum SCIP_LockType SCIP_LOCKTYPE
     
    typedef struct SCIP_DomChgBound SCIP_DOMCHGBOUND
     
    typedef struct SCIP_DomChgBoth SCIP_DOMCHGBOTH
     
    typedef struct SCIP_DomChgDyn SCIP_DOMCHGDYN
     
    typedef union SCIP_DomChg SCIP_DOMCHG
     
    typedef struct SCIP_BoundChg SCIP_BOUNDCHG
     
    typedef struct SCIP_BdChgIdx SCIP_BDCHGIDX
     
    typedef struct SCIP_BdChgInfo SCIP_BDCHGINFO
     
    typedef struct SCIP_BranchingData SCIP_BRANCHINGDATA
     
    typedef struct SCIP_InferenceData SCIP_INFERENCEDATA
     
    typedef struct SCIP_HoleChg SCIP_HOLECHG
     
    typedef struct SCIP_Hole SCIP_HOLE
     
    typedef struct SCIP_Holelist SCIP_HOLELIST
     
    typedef struct SCIP_Dom SCIP_DOM
     
    typedef struct SCIP_Original SCIP_ORIGINAL
     
    typedef struct SCIP_Loose SCIP_LOOSE
     
    typedef struct SCIP_Aggregate SCIP_AGGREGATE
     
    typedef struct SCIP_AggregateExact SCIP_AGGREGATEEXACT
     
    typedef struct SCIP_Multaggr SCIP_MULTAGGR
     
    typedef struct SCIP_MultaggrExact SCIP_MULTAGGREXACT
     
    typedef struct SCIP_Negate SCIP_NEGATE
     
    typedef struct SCIP_Var SCIP_VAR
     
    typedef struct SCIP_VarData SCIP_VARDATA
     
    typedef struct SCIP_VarDataExact SCIP_VARDATAEXACT
     
    typedef struct SCIP_DomExact SCIP_DOMEXACT
     

    Enumerations

    enum  SCIP_Varstatus {
      SCIP_VARSTATUS_ORIGINAL = 0 ,
      SCIP_VARSTATUS_LOOSE = 1 ,
      SCIP_VARSTATUS_COLUMN = 2 ,
      SCIP_VARSTATUS_FIXED = 3 ,
      SCIP_VARSTATUS_AGGREGATED = 4 ,
      SCIP_VARSTATUS_MULTAGGR = 5 ,
      SCIP_VARSTATUS_NEGATED = 6
    }
     
    enum  SCIP_Vartype {
      SCIP_VARTYPE_BINARY = 0 ,
      SCIP_VARTYPE_INTEGER = 1 ,
      SCIP_VARTYPE_IMPLINT = 2 ,
      SCIP_VARTYPE_CONTINUOUS = 3
    }
     
    enum  SCIP_ImplintType {
      SCIP_IMPLINTTYPE_NONE = 0 ,
      SCIP_IMPLINTTYPE_WEAK = 1 ,
      SCIP_IMPLINTTYPE_STRONG = 2
    }
     
    enum  SCIP_DomchgType {
      SCIP_DOMCHGTYPE_DYNAMIC = 0 ,
      SCIP_DOMCHGTYPE_BOTH = 1 ,
      SCIP_DOMCHGTYPE_BOUND = 2
    }
     
    enum  SCIP_BoundchgType {
      SCIP_BOUNDCHGTYPE_BRANCHING = 0 ,
      SCIP_BOUNDCHGTYPE_CONSINFER = 1 ,
      SCIP_BOUNDCHGTYPE_PROPINFER = 2
    }
     
    enum  SCIP_LockType {
      SCIP_LOCKTYPE_MODEL = 0 ,
      SCIP_LOCKTYPE_CONFLICT = 1
    }
     

    Macro Definition Documentation

    ◆ SCIP_DEPRECATED_VARTYPE_IMPLINT

    #define SCIP_DEPRECATED_VARTYPE_IMPLINT   ((SCIP_VARTYPE) 2)

    alternative to SCIP_VARTYPE_IMPLINT that comes without SCIP_DEPRECATED attribute

    Deprecated:
    still, the use of an implicit integral variable type is deprecated

    Definition at line 79 of file type_var.h.

    ◆ SCIP_VARTYPE_BINARY_CHAR

    #define SCIP_VARTYPE_BINARY_CHAR   'B'

    Definition at line 82 of file type_var.h.

    ◆ SCIP_VARTYPE_INTEGER_CHAR

    #define SCIP_VARTYPE_INTEGER_CHAR   'I'

    Definition at line 83 of file type_var.h.

    ◆ SCIP_VARTYPE_CONTINUOUS_CHAR

    #define SCIP_VARTYPE_CONTINUOUS_CHAR   'C'

    Definition at line 84 of file type_var.h.

    ◆ SCIP_DEPRECATED_VARTYPE_IMPLINT_CHAR

    #define SCIP_DEPRECATED_VARTYPE_IMPLINT_CHAR   'M'

    Definition at line 85 of file type_var.h.

    ◆ NLOCKTYPES

    #define NLOCKTYPES   2

    types of variable locks number of lock types

    Definition at line 138 of file type_var.h.

    ◆ SCIP_DECL_VARDELORIG

    #define SCIP_DECL_VARDELORIG (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_VAR* var, SCIP_VARDATA** vardata)

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

    This method should free the user data of the original variable.

    input:

    • scip : SCIP main data structure
    • var : original variable the data to free is belonging to
    • vardata : pointer to the user variable data to free

    Definition at line 180 of file type_var.h.

    ◆ SCIP_DECL_VARTRANS

    #define SCIP_DECL_VARTRANS (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_VAR* sourcevar, SCIP_VARDATA* sourcedata, SCIP_VAR* targetvar, SCIP_VARDATA** targetdata)

    creates transformed variable for original user variable

    Because the original variable and the user data of the original variable should not be modified during the solving process, a transformed variable is created as a copy of the original variable. If the user variable data is never modified during the solving process anyways, it is enough to simply copy the user data's pointer. This is the default implementation, which is used when NULL is given as the VARTRANS method. If the user data may be modified during the solving process (e.g. during preprocessing), the VARTRANS method must be given and has to copy the user variable data to a different memory location.

    input:

    • scip : SCIP main data structure
    • sourcevar : original variable
    • sourcedata : source variable data to transform
    • targetvar : transformed variable
    • targetdata : pointer to store created transformed variable data

    Definition at line 200 of file type_var.h.

    ◆ SCIP_DECL_VARDELTRANS

    #define SCIP_DECL_VARDELTRANS (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_VAR* var, SCIP_VARDATA** vardata)

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

    This method has to be implemented, if the VARTRANS method is not a simple pointer copy operation like in the default VARTRANS implementation. It should free the user data of the transformed variable, that was created in the VARTRANS method.

    input:

    • scip : SCIP main data structure
    • var : transformed variable the data to free is belonging to
    • vardata : pointer to the user variable data to free

    Definition at line 213 of file type_var.h.

    ◆ SCIP_DECL_VARCOPY

    #define SCIP_DECL_VARCOPY (   x)
    Value:
    SCIP_RETCODE x (SCIP* scip, SCIP* sourcescip, SCIP_VAR* sourcevar, SCIP_VARDATA* sourcedata, \
    SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, SCIP_VAR* targetvar, SCIP_VARDATA** targetdata, SCIP_RESULT* result)
    SCIP_VAR ** x
    Definition: circlepacking.c:63
    enum SCIP_Result SCIP_RESULT
    Definition: type_result.h:61
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    struct SCIP_VarData SCIP_VARDATA
    Definition: type_var.h:167

    copies variable data of source SCIP variable for the target SCIP variable

    This method should copy the variable data of the source SCIP and create a target variable data for target variable. This callback is optional. If the copying process was successful, the target variable gets this variable data assigned. In case the result pointer is set to SCIP_DIDNOTRUN, the target variable will have no variable data at all.

    The variable map and the constraint map can be used via the function SCIPgetVarCopy() and SCIPgetConsCopy(), respectively, to get for certain variables and constraints of the source SCIP the counter parts in the target SCIP. You should be very careful in using these two methods since they could lead to infinite loop.

    input:

    • scip : target SCIP data structure
    • sourcescip : source SCIP main data structure
    • sourcevar : variable of the source SCIP
    • sourcedata : variable data of the source variable which should get copied
    • varmap, : a hashmap which stores the mapping of source variables to corresponding target variables
    • consmap, : a hashmap which stores the mapping of source constraints to corresponding target constraints
    • targetvar : variable of the (target) SCIP (targetvar is the copy of sourcevar)
    • targetdata : pointer to store created copy of the variable data for the (target) SCIP

    output:

    • result : pointer to store the result of the call

    possible return values for *result:

    • SCIP_DIDNOTRUN : the copying process was not performed
    • SCIP_SUCCESS : the copying process was successfully performed

    Definition at line 243 of file type_var.h.

    Typedef Documentation

    ◆ SCIP_VARSTATUS

    Definition at line 59 of file type_var.h.

    ◆ SCIP_VARTYPE

    typedef enum SCIP_Vartype SCIP_VARTYPE

    Definition at line 73 of file type_var.h.

    ◆ SCIP_IMPLINTTYPE

    Definition at line 117 of file type_var.h.

    ◆ SCIP_DOMCHGTYPE

    Definition at line 126 of file type_var.h.

    ◆ SCIP_BOUNDCHGTYPE

    Definition at line 135 of file type_var.h.

    ◆ SCIP_LOCKTYPE

    Definition at line 144 of file type_var.h.

    ◆ SCIP_DOMCHGBOUND

    static domain change data for bound changes

    Definition at line 146 of file type_var.h.

    ◆ SCIP_DOMCHGBOTH

    static domain change data for bound and hole changes

    Definition at line 147 of file type_var.h.

    ◆ SCIP_DOMCHGDYN

    dynamic domain change data for bound and hole changes

    Definition at line 148 of file type_var.h.

    ◆ SCIP_DOMCHG

    typedef union SCIP_DomChg SCIP_DOMCHG

    changes in domains of variables

    Definition at line 149 of file type_var.h.

    ◆ SCIP_BOUNDCHG

    typedef struct SCIP_BoundChg SCIP_BOUNDCHG

    changes in bounds of variables

    Definition at line 150 of file type_var.h.

    ◆ SCIP_BDCHGIDX

    typedef struct SCIP_BdChgIdx SCIP_BDCHGIDX

    bound change index in path from root to current node

    Definition at line 151 of file type_var.h.

    ◆ SCIP_BDCHGINFO

    bound change information to track bound changes from root to current node

    Definition at line 152 of file type_var.h.

    ◆ SCIP_BRANCHINGDATA

    typedef struct SCIP_BranchingData SCIP_BRANCHINGDATA

    data for branching decision bound changes

    Definition at line 153 of file type_var.h.

    ◆ SCIP_INFERENCEDATA

    typedef struct SCIP_InferenceData SCIP_INFERENCEDATA

    data for inferred bound changes

    Definition at line 154 of file type_var.h.

    ◆ SCIP_HOLECHG

    typedef struct SCIP_HoleChg SCIP_HOLECHG

    changes in holelist of variables

    Definition at line 155 of file type_var.h.

    ◆ SCIP_HOLE

    typedef struct SCIP_Hole SCIP_HOLE

    hole in a domain of an integer variable

    Definition at line 156 of file type_var.h.

    ◆ SCIP_HOLELIST

    typedef struct SCIP_Holelist SCIP_HOLELIST

    list of holes in a domain of an integer variable

    Definition at line 157 of file type_var.h.

    ◆ SCIP_DOM

    typedef struct SCIP_Dom SCIP_DOM

    datastructures for storing domains of variables

    Definition at line 158 of file type_var.h.

    ◆ SCIP_ORIGINAL

    typedef struct SCIP_Original SCIP_ORIGINAL

    original variable information

    Definition at line 159 of file type_var.h.

    ◆ SCIP_LOOSE

    typedef struct SCIP_Loose SCIP_LOOSE

    loose variable information

    Definition at line 160 of file type_var.h.

    ◆ SCIP_AGGREGATE

    aggregation information

    Definition at line 161 of file type_var.h.

    ◆ SCIP_AGGREGATEEXACT

    exact aggregation information

    Definition at line 162 of file type_var.h.

    ◆ SCIP_MULTAGGR

    typedef struct SCIP_Multaggr SCIP_MULTAGGR

    multiple aggregation information

    Definition at line 163 of file type_var.h.

    ◆ SCIP_MULTAGGREXACT

    exact multiple aggregation information

    Definition at line 164 of file type_var.h.

    ◆ SCIP_NEGATE

    typedef struct SCIP_Negate SCIP_NEGATE

    negation information

    Definition at line 165 of file type_var.h.

    ◆ SCIP_VAR

    typedef struct SCIP_Var SCIP_VAR

    variable of the problem

    Definition at line 166 of file type_var.h.

    ◆ SCIP_VARDATA

    typedef struct SCIP_VarData SCIP_VARDATA

    user variable data

    Definition at line 167 of file type_var.h.

    ◆ SCIP_VARDATAEXACT

    exact data (obj, bounds, ...)

    Definition at line 168 of file type_var.h.

    ◆ SCIP_DOMEXACT

    typedef struct SCIP_DomExact SCIP_DOMEXACT

    exact domain (using rationals)

    Definition at line 169 of file type_var.h.

    Enumeration Type Documentation

    ◆ SCIP_Varstatus

    status of problem variables

    Enumerator
    SCIP_VARSTATUS_ORIGINAL 

    variable belongs to original problem

    SCIP_VARSTATUS_LOOSE 

    variable is a loose variable of the transformed problem

    SCIP_VARSTATUS_COLUMN 

    variable is a column of the transformed problem

    SCIP_VARSTATUS_FIXED 

    variable is fixed to specific value in the transformed problem

    SCIP_VARSTATUS_AGGREGATED 

    variable is aggregated to x = a*y + c in the transformed problem

    SCIP_VARSTATUS_MULTAGGR 

    variable is aggregated to x = a_1*y_1 + ... + a_k*y_k + c

    SCIP_VARSTATUS_NEGATED 

    variable is the negation of an original or transformed variable

    Definition at line 49 of file type_var.h.

    ◆ SCIP_Vartype

    variable type

    Enumerator
    SCIP_VARTYPE_BINARY 

    binary variable: \( x \in \{0,1\} \)

    SCIP_VARTYPE_INTEGER 

    integer variable: \( x \in \{lb, \dots, ub\} \)

    SCIP_VARTYPE_IMPLINT 
    Deprecated:
    use SCIPcreateVarImpl() or SCIPvarChgImplType() to control implied integrality
    SCIP_VARTYPE_CONTINUOUS 

    continuous variable: \( lb \leq x \leq ub \)

    Definition at line 62 of file type_var.h.

    ◆ SCIP_ImplintType

    implied integral type

    Enumerator
    SCIP_IMPLINTTYPE_NONE 

    The variable is not implied integral by other variables

    SCIP_IMPLINTTYPE_WEAK 

    The constraint handlers enforce that if the problem is relaxed to have integrality constraints for the non-implied integral variables only, there exists an optimal solution where all weakly and strongly implied integral variables have integer solution values. For infeasible problems, when relaxing integrality of all implied integer variables, the problem remains infeasible. For unbounded problems, when enforcing integrality of all implied integer variables, the problem remains unbounded.

    Note
    This notion of implied integrality is fragile and may break if extra constraints are added.

    Example: The variable z is a weakly implied integral if it only occurs in the constraint 4x + 3y + z <= 10, where x and y are integer and z has objective 0.

    SCIP_IMPLINTTYPE_STRONG 

    The constraint handlers enforce that if the problem is relaxed to have integrality constraints for the non-implied integral variables only, in every feasible solution all strongly implied integral variables have integer solution values.

    Note
    This notion of implied integrality remains intact under the addition of additional constraints to the problem.

    Example: The variable z is strongly implied integral if we have the constraint: 4x + 3y + z = 10, where x and y are integer variables.

    Definition at line 88 of file type_var.h.

    ◆ SCIP_DomchgType

    domain change data type

    Enumerator
    SCIP_DOMCHGTYPE_DYNAMIC 

    dynamic bound changes with size information of arrays

    SCIP_DOMCHGTYPE_BOTH 

    static domain changes: number of entries equals size of arrays

    SCIP_DOMCHGTYPE_BOUND 

    static domain changes without any hole changes

    Definition at line 120 of file type_var.h.

    ◆ SCIP_BoundchgType

    bound change type

    Enumerator
    SCIP_BOUNDCHGTYPE_BRANCHING 

    bound change was due to a branching decision

    SCIP_BOUNDCHGTYPE_CONSINFER 

    bound change was due to an inference of a constraint (domain propagation)

    SCIP_BOUNDCHGTYPE_PROPINFER 

    bound change was due to an inference of a domain propagator

    Definition at line 129 of file type_var.h.

    ◆ SCIP_LockType

    Enumerator
    SCIP_LOCKTYPE_MODEL 

    variable locks for model and check constraints

    SCIP_LOCKTYPE_CONFLICT 

    variable locks for conflict constraints

    Definition at line 139 of file type_var.h.