Skip to content

VType

Bases: Enum

An Enum that can be used to specify the variable type.

Examples:

>>> m = pf.Model()
>>> m.X = pf.Variable(vtype=VType.BINARY)

The enum's string values can also be used directly although this is prone to typos:

>>> m.Y = pf.Variable(vtype="binary")

Attributes:

Name Type Description
BINARY

Variables that must be either 0 or 1.

CONTINUOUS

Variables that can be any real value.

INTEGER

Variables that must be integer values.

BINARY = 'binary'

Variables that must be either 0 or 1.

CONTINUOUS = 'continuous'

Variables that can be any real value.

INTEGER = 'integer'

Variables that must be integer values.