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

Solver disregards previous set objectives #11

Open
yaccos opened this issue Apr 6, 2022 · 0 comments
Open

Solver disregards previous set objectives #11

yaccos opened this issue Apr 6, 2022 · 0 comments

Comments

@yaccos
Copy link

yaccos commented Apr 6, 2022

I have discovered a bug with the Gurobi solver interface. GurobiSolver.solve() calls GurobiSolver.set_objective() internally (

self.set_objective(linear, quadratic, minimize)
), but doing so will wipe out previous set objectives (
obj_expr = quicksum(quad_obj + lin_obj)
) to the solver even if objectives to GurobiSolver.Solve() are unspecified. In effect, calling set_objective() before a call to solve() has no effect even when the model is updating after setting the objective.

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

1 participant