Problem in using Pulp

amitsoni.1984 at gmail.com amitsoni.1984 at gmail.com
Thu Dec 21 22:53:29 EST 2006


Hi,
I am trying to run the following example which uses PULP for linear
optimization. But I am getting this error in the last line: "EOL while
scanning single quoted string".

Can anyone help me with this?
thanks
Amit

----------------------------------Code----------------------------
from pulp import *

prob = LpProblem("linear", LpMinimize)

# Variables
x = LpVariable("x", 0, 4)
y = LpVariable("y", -1, 1)
z = LpVariable("z", 0)

# Objective
prob += x + 4*y + 9*z

# Constraints
prob += x+y <= 5
prob += x+z >= 10
prob += -y+z == 7

GLPK("C:\Documents and
Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\").solve(prob)




More information about the Python-list mailing list