Using a concrete model that successfully solves. Is there any way to retrieve the ACTIVE constraints?
Asked
Active
Viewed 85 times
0
-
You can inspect the slack in all constraints and infer from there. This answer shows how: https://stackoverflow.com/questions/51044262/finding-out-reason-of-pyomo-model-infeasibility/70910431#70910431 – AirSquid Jun 14 '22 at 18:07
1 Answers
0
"Active" is a bit tricky, as that is technically an internal state of the solver (that most solvers don't report). You can get a reasonable approximation of active constraints with the method:
pyomo.util.infeasible.log_close_to_bounds()
...or look at what that method is doing (it's only 40 lines of code) and implement something specific to your use case.

jsiirola
- 2,259
- 2
- 9
- 12