pulp.constants
This file contains the constant definitions for PuLP Note that hopefully these will be changed into something more pythonic
- exception pulp.constants.PulpError
Bases:
Exception
Pulp Exception Class
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- pulp.constants.LpContinuous
LpContinuous= “Continuous”
- LpInteger = "Integer"
LpInteger= “Integer”
- LpBinary = "Binary"
LpBinary= “Binary”
- pulp.constants.LpStatus
Return status from solver:
LpStatus key
string value
numerical value
“Optimal”
1
“Not Solved”
0
“Infeasible”
-1
“Unbounded”
-2
“Undefined”
-3
- pulp.constants.LpStatusOptimal
LpStatusOptimal = 1
- pulp.constants.LpStatusNotSolved
LpStatusNotSolved = 0
- pulp.constants.LpStatusInfeasible
LpStatusInfeasible = -1
- pulp.constants.LpStatusUnbounded
LpStatusUnbounded = -2
- pulp.constants.LpStatusUndefined
LpStatusUndefined = -3
- pulp.constants.LpSolution
Return solution status from solver:
LpStatus key
string value
numerical value
LpSolutionOptimal
“Optimal Solution Found”
1
LpSolutionNoSolutionFound
“No Solution Found”
0
LpSolutionStatusInfeasible
“No Solution Exists”
-1
LpSolutionStatusUnbounded
“Solution is Unbounded”
-2
LpSolutionIntegerFeasible
“Solution Found”
2
- pulp.constants.LpSenses
Dictionary of values for sense
:
LpSenses = {
LpMaximize
:”Maximize”,LpMinimize
:”Minimize”}
- pulp.constants.LpMinimize
LpMinimize = 1
- pulp.constants.LpMaximize
LpMaximize = -1
- pulp.constants.LpConstraintEQ
LpConstraintEQ = 0
- pulp.constants.LpConstraintLE
LpConstraintLE = -1
- pulp.constants.LpConstraintGE
LpConstraintGE = 1
- pulp.constants.LpConstraintSenses
LpConstraint key
symbolic value
numerical value
“==”
0
“<=”
-1
“>=”
1