Skip to content

Commit 22a6b9c

Browse files
committed
doc: clean up in the inter-links
1 parent 9ce0a56 commit 22a6b9c

File tree

7 files changed

+19
-20
lines changed

7 files changed

+19
-20
lines changed

docs/make.jl

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ links = InterLinks(
1111
"ControlSystemsBase" => "https://juliacontrol.github.io/ControlSystems.jl/stable/objects.inv",
1212
"JuMP" => "https://jump.dev/JuMP.jl/stable/objects.inv",
1313
"DifferentiationInterface" => "https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/objects.inv",
14+
"ForwardDiff" => "https://juliadiff.org/ForwardDiff.jl/stable/objects.inv",
1415
)
1516

1617
DocMeta.setdocmeta!(

docs/src/manual/nonlinmpc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ Nonlinear MPC is more computationally expensive than [`LinMPC`](@ref). Solving t
329329
should always be faster than the sampling time ``T_s = 0.1`` s for real-time operation. This
330330
requirement is sometimes hard to meet on electronics or mechanical systems because of the
331331
fast dynamics. To ease the design and comparison with [`LinMPC`](@ref), the [`linearize`](@ref)
332-
function allows automatic linearization of [`NonLinModel`](@ref) based on [`ForwardDiff.jl`](https://juliadiff.org/ForwardDiff.jl/stable/).
332+
function allows automatic linearization of [`NonLinModel`](@ref) based on [`ForwardDiff`](@extref ForwardDiff).
333333
We first linearize `model` at the point ``θ = π`` rad and ``ω = τ = 0`` (inverted position):
334334

335335
```@example man_nonlin

src/controller/nonlinmpc.jl

+8-8
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ This controller allocates memory at each time step for the optimization.
196196
- `optim=JuMP.Model(Ipopt.Optimizer)` : nonlinear optimizer used in the predictive
197197
controller, provided as a [`JuMP.Model`](@extref) object (default to [`Ipopt`](https://github.com/jump-dev/Ipopt.jl) optimizer).
198198
- `gradient=AutoForwardDiff()` : an `AbstractADType` backend for the gradient of the objective
199-
function, see [`DifferentiationInterface`](@extref DifferentiationInterface List).
199+
function, see [`DifferentiationInterface` doc](@extref DifferentiationInterface List).
200200
- `jacobian=default_jacobian(transcription)` : an `AbstractADType` backend for the Jacobian
201201
of the nonlinear constraints, see `gradient` above for the options (default in Extended Help).
202202
- additional keyword arguments are passed to [`UnscentedKalmanFilter`](@ref) constructor
@@ -247,16 +247,16 @@ NonLinMPC controller with a sample time Ts = 10.0 s, Ipopt optimizer, UnscentedK
247247
The keyword argument `nc` is the number of elements in `LHS`, and `gc!`, an alias for
248248
the `gc` argument (both `gc` and `gc!` accepts non-mutating and mutating functions).
249249
250-
By default, the optimization relies on dense [`ForwardDiff`](https://github.com/JuliaDiff/ForwardDiff.jl)
250+
By default, the optimization relies on dense [`ForwardDiff`](@extref ForwardDiff)
251251
automatic differentiation (AD) to compute the objective and constraint derivatives. One
252252
exception: if `transcription` is not a [`SingleShooting`](@ref), the `jacobian` argument
253-
defaults to this [sparse backend](@extref DifferentiationInterface Sparsity):
253+
defaults to this [sparse backend](@extref DifferentiationInterface AutoSparse-object):
254254
```julia
255-
AutoSparse(
256-
AutoForwardDiff();
257-
sparsity_detector = TracerSparsityDetector(),
258-
coloring_algorithm = GreedyColoringAlgorithm()
259-
)
255+
AutoSparse(
256+
AutoForwardDiff();
257+
sparsity_detector = TracerSparsityDetector(),
258+
coloring_algorithm = GreedyColoringAlgorithm()
259+
)
260260
```
261261
Optimizers generally benefit from exact derivatives like AD. However, the [`NonLinModel`](@ref)
262262
state-space functions must be compatible with this feature. See [`JuMP` documentation](@extref JuMP Common-mistakes-when-writing-a-user-defined-operator)

src/estimator/kalman.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -951,8 +951,8 @@ Construct an extended Kalman Filter with the [`SimModel`](@ref) `model`.
951951
Both [`LinModel`](@ref) and [`NonLinModel`](@ref) are supported. The process model and the
952952
keyword arguments are identical to [`UnscentedKalmanFilter`](@ref), except for `α`, `β` and
953953
`κ` which do not apply to the extended Kalman Filter. The Jacobians of the augmented model
954-
``\mathbf{f̂, ĥ}`` are computed with [`ForwardDiff.jl`](https://github.com/JuliaDiff/ForwardDiff.jl)
955-
automatic differentiation. This estimator allocates memory for the Jacobians.
954+
``\mathbf{f̂, ĥ}`` are computed with [`ForwardDiff`](@extref ForwardDiff) automatic
955+
differentiation. This estimator allocates memory for the Jacobians.
956956
957957
!!! warning
958958
See the Extended Help of [`linearize`](@ref) function if you get an error like:
@@ -1043,9 +1043,9 @@ augmented process model:
10431043
\end{aligned}
10441044
```
10451045
The matrix ``\mathbf{Ĥ^m}`` is the rows of ``\mathbf{Ĥ}`` that are measured outputs. The
1046-
function [`ForwardDiff.jacobian`](https://juliadiff.org/ForwardDiff.jl/stable/user/api/#ForwardDiff.jacobian)
1047-
automatically computes them. The correction and prediction step equations are provided below.
1048-
The correction step is skipped if `estim.direct == true` since it's already done by the user.
1046+
Jacobians are computed with [`ForwardDiff`](@extref ForwardDiff). The correction and
1047+
prediction step equations are provided below. The correction step is skipped if
1048+
`estim.direct == true` since it's already done by the user.
10491049
10501050
# Correction Step
10511051
```math

src/estimator/mhe/construct.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ transcription for now.
261261
nonlinear optimizer for solving (default to [`Ipopt`](https://github.com/jump-dev/Ipopt.jl),
262262
or [`OSQP`](https://osqp.org/docs/parsers/jump.html) if `model` is a [`LinModel`](@ref)).
263263
- `gradient=AutoForwardDiff()` : an `AbstractADType` backend for the gradient of the objective
264-
function if `model` is not a [`LinModel`](@ref), see [`DifferentiationInterface`][@extref DifferentiationInterface List].
264+
function if `model` is not a [`LinModel`](@ref), see [`DifferentiationInterface` doc](@extref DifferentiationInterface List).
265265
- `jacobian=AutoForwardDiff()` : an `AbstractADType` backend for the Jacobian of the
266266
constraints if `model` is not a [`LinModel`](@ref), see `gradient` above for the options.
267267
- `direct=true`: construct with a direct transmission from ``\mathbf{y^m}`` (a.k.a. current

src/model/linearization.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Linearize `model` at the operating points `x`, `u`, `d` and return the [`LinMode
7575
The arguments `x`, `u` and `d` are the linearization points for the state ``\mathbf{x}``,
7676
manipulated input ``\mathbf{u}`` and measured disturbance ``\mathbf{d}``, respectively (not
7777
necessarily an equilibrium, details in Extended Help). The Jacobians of ``\mathbf{f}`` and
78-
``\mathbf{h}`` functions are automatically computed with [`ForwardDiff.jl`](https://github.com/JuliaDiff/ForwardDiff.jl).
78+
``\mathbf{h}`` functions are automatically computed with [`ForwardDiff`](@extref ForwardDiff).
7979
8080
!!! warning
8181
See Extended Help if you get an error like:
@@ -131,7 +131,7 @@ julia> linmodel.A
131131
equations are similar if the nonlinear model has nonzero operating points.
132132
133133
Automatic differentiation (AD) allows exact Jacobians. The [`NonLinModel`](@ref) `f` and
134-
`h` functions must be compatible with this feature though. See [`JuMP` documentation][@extref JuMP Common-mistakes-when-writing-a-user-defined-operator]
134+
`h` functions must be compatible with this feature though. See [`JuMP` documentation](@extref JuMP Common-mistakes-when-writing-a-user-defined-operator)
135135
for common mistakes when writing these functions.
136136
"""
137137
function linearize(model::SimModel{NT}; kwargs...) where NT<:Real

src/model/nonlinmodel.jl

+1-3
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,10 @@ form. The optional parameter `NT` explicitly set the number type of vectors (def
9696
!!! warning
9797
The two functions must be in pure Julia to use the model in [`NonLinMPC`](@ref),
9898
[`ExtendedKalmanFilter`](@ref), [`MovingHorizonEstimator`](@ref) and [`linearize`](@ref),
99-
except if a finite difference backend is used (e.g. [`AutoFiniteDiff`][1]).
99+
except if a finite difference backend is used (e.g. [`AutoFiniteDiff`](@extref DifferentiationInterface List).
100100
101101
See also [`LinModel`](@ref).
102102
103-
[1]: https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/explanation/backends/#List
104-
105103
# Examples
106104
```jldoctest
107105
julia> f!(ẋ, x, u, _ , p) = (ẋ .= p*x .+ u; nothing);

0 commit comments

Comments
 (0)