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

Add some more tests and fix a rare case at failed optimization of unbounded model #241

Merged
merged 2 commits into from Mar 24, 2022
Merged

Conversation

sebheger
Copy link
Collaborator

No description provided.

@h-g-s
Copy link
Contributor

h-g-s commented Jan 29, 2022

Thanks for your contribution Sebastian !
One comment, for validating the obtained results it is safer to use tolerances, e.g., replace the
assert m.objective_value == value
by something like
assert abs(m.objective_value - value) <= TOL
where TOL is a small (but not too small) constant, like 1e-4
For small (specially pure integer model) the solution may match exactly, but this is not guaranteed as linear programming based solvers are approximate by nature. These tolerances should be considered while checking the variable values also, like x.x.

@sebheger
Copy link
Collaborator Author

@h-g-s Yes, thanks for your feedback. I did some rework to use tolerances also for the simple tests. Better save than sorry.

Sebastian Heger added 2 commits January 31, 2022 22:53
Fixed rare case when gurobi returns unbounded model with a worthless solution
@sebheger sebheger added this to the Release 1.14.0 milestone Mar 23, 2022
@sebheger sebheger merged commit 030d976 into coin-or:master Mar 24, 2022
@sebheger sebheger deleted the add_some_more_tests branch March 28, 2022 19:29
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