abdelkimo / python-zibopt

Automatically exported from code.google.com/p/python-zibopt
0 stars 0 forks source link

add a more convenient interface for constraintw #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Constraints should be usable in a method more like PuLP-OR:

solver += -4 * x + y

Where x and y are variables.

Original issue reported on code.google.com by ryanjoneil on 2 Nov 2009 at 1:19

GoogleCodeExporter commented 8 years ago
# Adding constraints:
solver += x + y <= 2
solver += 3*x - 4*y >= 1
for a, b, c in foo:
    solver += x/a + b*y == c

# Solving with an objective:
solver.minimize(objective=c*x + y/d)

# Remove constraints:
solver -= constraint
solver -= x + y <= 2

Original comment by ryanjoneil on 2 Nov 2009 at 3:26

GoogleCodeExporter commented 8 years ago
If possible, maybe we can do this too: 

solver += 1 <= 3x + y <= 2

Original comment by ryanjoneil on 13 Nov 2009 at 10:30

GoogleCodeExporter commented 8 years ago

Original comment by ryan%che...@gtempaccount.com on 4 Jan 2010 at 2:55