Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Reconsider holding the objective constant outside of the solver #43

Open
4 tasks done
rdeits opened this issue Jul 31, 2018 · 4 comments
Open
4 tasks done

Reconsider holding the objective constant outside of the solver #43

rdeits opened this issue Jul 31, 2018 · 4 comments
Assignees

Comments

@rdeits
Copy link
Contributor

rdeits commented Jul 31, 2018

Currently, LQOI essentially keeps the constant part of the objective for itself, storing it in a field of the optimizer rather than actually passing it to the solver. However, there are situations (like jump-dev/Gurobi.jl#111 ) where it's useful to actually have that constant exposed to the solver.

Exposing the objective constant to the solver would require that all the wrapped solvers support that:

@rdeits
Copy link
Contributor Author

rdeits commented Jul 31, 2018

I think this could also be done in a compatible way by doing the following:

  • Create new functions in the LQOI solver interface set_constant_objective and get_constant_objective, with default definitions that just access the .objective_constant field.
  • In each solver, implement those interface functions using the internal APIs
  • Once all the solvers are updated, delete the objective_constant field from LQOI

@joaquimg
Copy link
Member

I agree it easier, it will make a lot easier sending informartion like b&b cut off to speed up prunning.
Lets do it!

@joaquimg
Copy link
Member

joaquimg commented Sep 5, 2018

we can close?

@odow
Copy link
Member

odow commented Sep 5, 2018

No. Once this LQOI is tagged, we should remove lines like

get_constant_objective(m::LinQuadOptimizer) = m.objective_constant

and remove the objective_constant field.

@odow odow self-assigned this Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants