Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lot-sizing example #599

Open
kothariharshit opened this issue Jun 7, 2022 · 1 comment
Open

Lot-sizing example #599

kothariharshit opened this issue Jun 7, 2022 · 1 comment

Comments

@kothariharshit
Copy link

kothariharshit commented Jun 7, 2022

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!

@Joao-Dionisio
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants