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

fix uservars in minizinc #496

Merged
merged 1 commit into from
Jul 12, 2024
Merged

fix uservars in minizinc #496

merged 1 commit into from
Jul 12, 2024

Conversation

Wout4
Copy link
Collaborator

@Wout4 Wout4 commented Jul 10, 2024

All solvervars were being used as uservars in minizinc, from a time before we needed decompositions for minizinc.

@Wout4 Wout4 requested a review from IgnaceBleukx July 10, 2024 13:28
@Wout4
Copy link
Collaborator Author

Wout4 commented Jul 10, 2024

Not sure if we need to uncomment the get_variables in objective() (line 401)
If there can be vars in the objective that are not in the constraints we need to?

Copy link
Collaborator

@IgnaceBleukx IgnaceBleukx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, we indeed need to keep the line adding unknown variables in occuring in the objective

@Wout4
Copy link
Collaborator Author

Wout4 commented Jul 10, 2024

keep it? it's not there at the moment i think

@Wout4
Copy link
Collaborator Author

Wout4 commented Jul 12, 2024

Seems like putting variable in the objective that is not in the constraints doesn't work anyway

m = Model(x1 == 6)
m.minimize(x2)
m.solve('minizinc')

x2 will be None after solve even if we add it to the uservars.
Merging this

@Wout4 Wout4 merged commit 396e611 into master Jul 12, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants