You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) does not support box constraints. Either remove the `lb` or `ub` bounds passed to `OptimizationProblem` or use a different algorithm."))
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) requires box constraints. Either pass `lb` and `ub` bounds to `OptimizationProblem` or use a different algorithm."))
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) does not support constraints. Either remove the `cons` function passed to `OptimizationFunction` or use a different algorithm."))
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) does not support callbacks, remove the `callback` keyword argument from the `solve` call."))
49
-
SciMLBase.requiresgradient(alg) &&
128
+
requiresgradient(alg) &&
50
129
!(prob.f isa SciMLBase.AbstractOptimizationFunction) &&
51
130
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) requires gradients, hence use `OptimizationFunction` to generate them with an automatic differentiation backend e.g. `OptimizationFunction(f, AutoForwardDiff())` or pass it in with `grad` kwarg."))
52
-
SciMLBase.requireshessian(alg) &&
131
+
requireshessian(alg) &&
53
132
!(prob.f isa SciMLBase.AbstractOptimizationFunction) &&
54
133
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) requires hessians, hence use `OptimizationFunction` to generate them with an automatic differentiation backend e.g. `OptimizationFunction(f, AutoFiniteDiff(); kwargs...)` or pass them in with `hess` kwarg."))
55
-
SciMLBase.requiresconsjac(alg) &&
134
+
requiresconsjac(alg) &&
56
135
!(prob.f isa SciMLBase.AbstractOptimizationFunction) &&
57
136
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) requires constraint jacobians, hence use `OptimizationFunction` to generate them with an automatic differentiation backend e.g. `OptimizationFunction(f, AutoFiniteDiff(); kwargs...)` or pass them in with `cons` kwarg."))
58
-
SciMLBase.requiresconshess(alg) &&
137
+
requiresconshess(alg) &&
59
138
!(prob.f isa SciMLBase.AbstractOptimizationFunction) &&
60
139
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) requires constraint hessians, hence use `OptimizationFunction` to generate them with an automatic differentiation backend e.g. `OptimizationFunction(f, AutoFiniteDiff(), AutoFiniteDiff(hess=true); kwargs...)` or pass them in with `cons` kwarg."))
61
140
return
62
141
end
63
142
64
-
# Base solver dispatch functions (these will be extended by specific solver packages)
65
-
supports_opt_cache_interface(alg) =false
143
+
const OPTIMIZER_MISSING_ERROR_MESSAGE ="""
144
+
Optimization algorithm not found. Either the chosen algorithm is not a valid solver
145
+
choice for the `OptimizationProblem`, or the Optimization solver library is not loaded.
146
+
Make sure that you have loaded an appropriate Optimization.jl solver library, for example,
147
+
`solve(prob,Optim.BFGS())` requires `using OptimizationOptimJL` and
0 commit comments