From e1570a285c9939bc923246d78f20cd1548660f1c Mon Sep 17 00:00:00 2001 From: Guillaume Marques Date: Fri, 18 Dec 2020 21:27:12 +0100 Subject: [PATCH] Error when no solver provided (#423) * Rm unused Params * error when no solver provided --- src/optimize.jl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/optimize.jl b/src/optimize.jl index 1a466d736..55d07ddff 100644 --- a/src/optimize.jl +++ b/src/optimize.jl @@ -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 @@ -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 \ No newline at end of file