Request for help on a Resource Allocation Problem
回答済みHi,
I am doing a resource allocation optimization, which is formulated as a mixed integer linear programming aided with Gurobi Python.
In testing, the solver can successfully find optimal solutions for many service requests but reports failure for several requests. I print the IIS constraints and find they should not occur. I print out all parameter values still finding no clues.
Interestingly, when changing the sense of a critical constraint from equal (as follows) to greater and equal, the solver gives results (of course, not optimal due to different constraints).
model.addConstrs(
(sum(delta_vnrp.sum(v, n, ResourceTypes.CPU, p) for p in P for n in N_rp[ResourceTypes.CPU,p])
+sum(delta_vnrp.sum(v, n, ResourceTypes.Memory, p) for p in P for n in N_rp[ResourceTypes.Memory,p])
== D_rv[ResourceTypes.Memory,v] for v in V),
"Total_Memory_Demand_Saitisf"
)
-
Hi Charles,
"I print the IIS constraints and find they should not occur. "
What do you mean by "should not occur"? Do you see constraints in the IIS that should not have been part of the model at all (which indicates an issue with your code), or do you have the impression that the combination of constraints as found, cannot result in infeasibility?
You may want to refer to this article for additional ideas for debugging infeasibility.
Kind regards,
Ronald0 -
Dear Ronald,
Thank you for your provided reference!
Sorry for my unclear expression. I see constraints in the IIS that should not have been part of the model at all. I would find out solution based on your reference.
Thank you!
Charles
0 -
Hi,
You're welcome! If you're not doing it already, consider naming each constraint uniquely when creating it. You could write the full model (instead of just the IIS) to an LP file using model.write("test.lp") and manually inspect it. For small datasets, this often helps me understand if the generated model matches my expectations.
Good luck!
Kind regards,
Ronald0
サインインしてコメントを残してください。
コメント
3件のコメント