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.isiterable(obj)
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

LpStatusOptimal

“Optimal”

1

LpStatusNotSolved

“Not Solved”

0

LpStatusInfeasible

“Infeasible”

-1

LpStatusUnbounded

“Unbounded”

-2

LpStatusUndefined

“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

LpConstraintEQ

“==”

0

LpConstraintLE

“<=”

-1

LpConstraintGE

“>=”

1