Skip to content

Commit

Permalink
Error when no solver provided (#423)
Browse files Browse the repository at this point in the history
* Rm unused Params

* error when no solver provided
  • Loading branch information
guimarqu authored Dec 18, 2020
1 parent 460739a commit e1570a2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ function optimize!(prob::MathProg.Problem, annotations::Annotations, params::Par
return optstate
end

"""
Solve a reformulation
"""
function optimize!(
reform::MathProg.Reformulation, algorithm::Algorithm.AbstractOptimizationAlgorithm,
initial_primal_bound, initial_dual_bound
Expand Down Expand Up @@ -123,3 +120,16 @@ function optimize!(

return outstate
end

"""
Fallback if no solver provided by the user.
"""
function optimize!(
::MathProg.Reformulation, ::Nothing,
::Real, ::Real
)
error("""
No solver to optimize the reformulation. You should provide a solver through Coluna parameters.
Please, check the starting guide of Coluna.
""")
end

0 comments on commit e1570a2

Please sign in to comment.