diff --git a/src/Nonlinear/model.jl b/src/Nonlinear/model.jl index b570a0dcc3..8577de2f34 100644 --- a/src/Nonlinear/model.jl +++ b/src/Nonlinear/model.jl @@ -77,6 +77,16 @@ function set_objective(model::Model, ::Nothing) return end +""" + model(backend::AbstractAutomaticDifferentiation) + +Return a new nonlinear model appropriate for the given AD `backend`. + +The default returns `Model()`. Custom AD backends can override this +to return their own model type. +""" +model(::AbstractAutomaticDifferentiation) = Model() + """ add_expression(model::Model, expr)::ExpressionIndex