How to formulate the nested summation constraint with couple of linear constraints?
Dear All
I want to calculate the sum S(t,p) such that couple of linear inequalities. The summation is iterate over three variables I, j, and k.
Whereas t and p are the inputs and fixed. And Delta(p,k) is a piece-wise function which gives 0 if p == k other-wise 1.
Such that couple of linear inequalities constraints which filter out the i, j, k variables.
I think the constraint can be expressed as follows
s(t,p) = for i in range(l-1)
for j in range (m-1)
for k in range (n-1)
couple of linear constraints
if (p == k):
Delta(p,k) = Delta(p,k)
else
Delta(p,k) = Delta(p,k) +1
How can I formulate this constraint in Gurobi python?
Thanks
Umair
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Follow up on my question.
Can I formulate the above-mentioned constraint as an In-Out function which takes t and p as input arguments, and return the value of Delta(p , k ) ?
Please let me know if you require some more information about my problem.
Thanks
0
Post is closed for comments.
Comments
2 comments