Nested quicksum function?
AnsweredDear Python/Gurobi Professionals:
I tried to figure out the quicksum function?
Are the two cosed below equal? Are the generateingthe same output? Thank you, Robert
COST = quicksum ( PW[K] * quicksum( FCH[J] * (Delta[J,K]) for J in set_J ) for K in set_K)
COST = quicksum ( PW[K] * FCH[J] * (Delta[J,K]) for J in set_J for K in set_K)
0
-
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?. -
Hi Robert,
Yes, those two expressions are equivalent (though the terms may be ordered differently within the LinExpr objects).
Eli
0 -
Dear Eli,
Thank you for your reply.
Best
Han
0
Post is closed for comments.
Comments
3 comments