Skip to content

Commit a951bae

Browse files
committed
Update overview.md
1 parent bde1682 commit a951bae

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/src/submodules/Nonlinear/overview.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,16 @@ However, we cannot call gradient terms such as
302302
not have the capability to differentiate a nonlinear expression.
303303

304304
Instead of passing [`Nonlinear.Evaluator`](@ref) directly to solvers,
305-
MathOptInterface instead passes an [`NLPBlockData`](@ref), which wraps an
306-
[`Nonlinear.Evaluator`](@ref) and includes other information such as constraint
307-
bounds and whether the evaluator has a nonlinear objective. Create an
308-
[`NLPBlockData`](@ref) as follows:
305+
solvers query the [`NLPBlock`](@ref) attribute, which returns an
306+
[`NLPBlockData`](@ref). This object wraps an [`Nonlinear.Evaluator`](@ref) and
307+
includes other information such as constraint bounds and whether the evaluator
308+
has a nonlinear objective. Create and set [`NLPBlockData`](@ref) as follows:
309309
```jldoctest nonlinear_developer
310-
julia> MOI.NLPBlockData(evaluator);
310+
julia> block = MOI.NLPBlockData(evaluator);
311+
312+
julia> model = MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}());
313+
314+
julia> MOI.set(model, MOI.NLPBlock(), block);
311315
```
312316

313317
## Expression-graph representation

0 commit comments

Comments
 (0)