PySCIPOpt icon indicating copy to clipboard operation
PySCIPOpt copied to clipboard

Lot-sizing example

Open kothariharshit opened this issue 3 years ago • 1 comments

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!

kothariharshit avatar Jun 07 '22 19:06 kothariharshit

Hello, @kothariharshit, sorry for the very large delay!

  1. I think they should be the same, yes, thanks for bringing it up!

  2. I think it's a bug, yes. In the provided example, that method is never called.

  3. 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 (with model.addConsLocal())

As for the mistakes in the file, it will not be a priority, but I'll try to fix these mistakes.

Joao-Dionisio avatar Jul 14 '23 09:07 Joao-Dionisio