File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed
Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ The following attributes are available:
7878 * [ ` ObjectiveFunction ` ] ( @ref )
7979 * [ ` ObjectiveFunctionType ` ] ( @ref )
8080 * [ ` ObjectiveSense ` ] ( @ref )
81+
8182## AbstractOptimizer API
8283
8384The following attributes are available:
@@ -104,3 +105,4 @@ The following attributes are available:
104105 * [ ` TimeLimitSec ` ] ( @ref )
105106 * [ ` ObjectiveLimit ` ] ( @ref )
106107 * [ ` SolutionLimit ` ] ( @ref )
108+ * [ ` AutomaticDifferentiationBackend ` ] ( @ref )
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ NumberOfThreads
8686RawSolver
8787AbsoluteGapTolerance
8888RelativeGapTolerance
89+ AutomaticDifferentiationBackend
8990```
9091
9192List of attributes useful for optimizers
Original file line number Diff line number Diff line change @@ -2119,6 +2119,20 @@ struct ListOfSupportedNonlinearOperators <: AbstractOptimizerAttribute end
21192119 OTHER_ERROR,
21202120)
21212121
2122+ """
2123+ AutomaticDifferentiationBackend() <: AbstractOptimizerAttribute
2124+
2125+ An [`AbstractOptimizerAttribute`](@ref) for setting the automatic differentiation
2126+ backend used by the solver.
2127+
2128+ The value must be a subtype of [`Nonlinear.AbstractAutomaticDifferentiation`](@ref).
2129+ """
2130+ struct AutomaticDifferentiationBackend <: AbstractOptimizerAttribute end
2131+
2132+ function attribute_value_type (:: AutomaticDifferentiationBackend )
2133+ return Nonlinear. AbstractAutomaticDifferentiation
2134+ end
2135+
21222136"""
21232137 TerminationStatus()
21242138
Original file line number Diff line number Diff line change @@ -310,6 +310,12 @@ function test_scalar_nonlinear_function_set_objective()
310310 return
311311end
312312
313+ function test_attributes_AutomaticDifferentiationBackend ()
314+ @test MOI. attribute_value_type (MOI. AutomaticDifferentiationBackend ()) ==
315+ MOI. Nonlinear. AbstractAutomaticDifferentiation
316+ return
317+ end
318+
313319function runtests ()
314320 for name in names (@__MODULE__ ; all = true )
315321 if startswith (" $name " , " test_" )
You can’t perform that action at this time.
0 commit comments