Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Nonlinear/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ function set_objective(model::Model, ::Nothing)
return
end

"""
nonlinear_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.
"""
nonlinear_model(::AbstractAutomaticDifferentiation) = Model()

"""
add_expression(model::Model, expr)::ExpressionIndex

Expand Down
Loading