You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to solve an optimization problem using mixed integer linear programming on DOCPLEX CP on Python. For example,
Objective Function:
x1 + x2 + x3 = x4 + x5 + x6
where x1, x2, x3, x4. x5 and x6 are decision variables.
How can I add an if condition constraint, such as:
x2 + x4 >= 0 if x6 - x1 >= 0
and
x2 + x4 < 0 if x6 - x1 < 0
here the sum of x2 and x1 are constrained based on the difference between x6 and x1.
The text was updated successfully, but these errors were encountered:
Alizak97
changed the title
How can I write an IF condition for my decision variable for Mixed Integer Linear Programming (MILP) using PuLP GLPK on Python?
How can I write an IF condition for my decision variable for Mixed Integer Linear Programming (MILP) using DOCPLEX CP on Python?
Nov 13, 2019
I am trying to solve an optimization problem using mixed integer linear programming on DOCPLEX CP on Python. For example,
Objective Function:
x1 + x2 + x3 = x4 + x5 + x6
where x1, x2, x3, x4. x5 and x6 are decision variables.
How can I add an if condition constraint, such as:
x2 + x4 >= 0 if x6 - x1 >= 0
and
x2 + x4 < 0 if x6 - x1 < 0
here the sum of x2 and x1 are constrained based on the difference between x6 and x1.
The text was updated successfully, but these errors were encountered: