PySCIPOpt
PySCIPOpt copied to clipboard
Lot-sizing example
I wanted to understand how to implement a constraint handler and had some questions regarding that -
- In this example lotsizing_lazy.py, do we expect the objective function values of sils and sils_cut to be the same? They turn out to be different on running the code.
- In the same example, on line 49, the sol argument is not passed to addcut. Is that a bug?
- Suppose we want to add cuts from within a constraint handler, is this more like a branch and cut approach (meaning that the cut is only added to the local node and not to the entire problem)?
Thank you!
Hello, @kothariharshit, sorry for the very large delay!
-
I think they should be the same, yes, thanks for bringing it up!
-
I think it's a bug, yes. In the provided example, that method is never called.
-
From my knowledge, I think you can choose what you want to do. You can add global constraints (with the regular
model.addCons()), but you can also add local constraints (withmodel.addConsLocal())
As for the mistakes in the file, it will not be a priority, but I'll try to fix these mistakes.