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

Request regarding index #325

Open
nipnipj opened this issue Jan 3, 2021 · 2 comments
Open

Request regarding index #325

nipnipj opened this issue Jan 3, 2021 · 2 comments

Comments

@nipnipj
Copy link

nipnipj commented Jan 3, 2021

Hello!

I'm new to ompr. The following suggestion might be already implemented.
I think it would be better if once the indexes for a variable were stablished with add_variable they do need to be written again in other functions like set_objetive or add_constraint. This would make easier to handle Multi-dimensional Index sets.

@dirkschumacher
Copy link
Owner

Thanks for the suggestion. Can you elaborate a bit what you mean?

@sbmack
Copy link

sbmack commented Jan 10, 2022

Hello!

I'm new to ompr. The following suggestion might be already implemented. I think it would be better if once the indexes for a variable were stablished with add_variable they do need to be written again in other functions like set_objetive or add_constraint. This would make easier to handle Multi-dimensional Index sets.

The added feature couldn't hurt. But many (most?) formulations have constraints that use only a subset of variables based on categories. E.g. in a product mix problem where only some products use only some specific raw material. So the index subsets of the constraints would only include the products that use the specific material. So in those cases the subsets of the indexes would still have to be explicitly articulated for those constraints. Of course a formulation could be completely dense using zero values for some coefficients, but that is not generally advised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants