I am using solverstudio (pulp and cbc). How to make the solver report out the conflict constraints? Thank you.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If your problem is infeasible, then technically ALL of your constraints are in conflict. However, for whatever intermediate solution was found before the solver returned Infeasible, you can try this to see which constraints were violated:
for c in lp.constraints.itervalues():
if not c.valid(0):
print c.name, c.value()