docplex.mp.vartype module¶
-
class
docplex.mp.vartype.BinaryVarType[source]¶ Bases:
docplex.mp.vartype.VarTypeThis class models the binary variable type and is not meant to be instantiated. Each model contains one instance of this type.
-
class
docplex.mp.vartype.ContinuousVarType[source]¶ Bases:
docplex.mp.vartype.VarTypeThis class models the continuous variable type and is not meant to be instantiated. Each model contains one instance of this type.
-
class
docplex.mp.vartype.IntegerVarType[source]¶ Bases:
docplex.mp.vartype.VarTypeThis class models the integer variable type and is not meant to be instantiated. Each models contains one instance of this type.
-
class
docplex.mp.vartype.SemiContinuousVarType[source]¶ Bases:
docplex.mp.vartype.VarTypeThis class models the semi-continuous variable type and is not meant to be instantiated.
-
default_lb¶ This property returns the default lower bound for the type.
-
-
class
docplex.mp.vartype.SemiIntegerVarType[source]¶ Bases:
docplex.mp.vartype.VarTypeThis class models the semi-integer variable type and is not meant to be instantiated.
-
default_lb¶ This property returns the default lower bound for the type.
-
-
class
docplex.mp.vartype.VarType[source]¶ Bases:
objectThis abstract class is the parent class for all types of decision variables.
This class must never be instantiated. Specialized sub-classes are defined for each type of decision variable.
-
cplex_typecode¶ This property returns the CPLEX type code for this type. Possible values are:
- ‘B’ for binary type
- ‘I’ for integer type
- ‘C’ for continuous type
- ‘S’ for semicontinuous type
- ‘N’ for semiinteger type
Returns: a one-letter string.
-
default_lb¶ This property returns the default lower bound for the type.
-
default_ub¶ This property returns the default upper bound for the type.
-
is_discrete()[source]¶ Checks if this is a discrete type.
Returns: True if the type is a discrete type. Return type: Boolean
-
short_name¶ This property returns a short name string for the type.
-