Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmigot committed Dec 21, 2023
1 parent 3a75ca1 commit 49c5c7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/sparsepattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Our test problem is an academic investment control problem:
```math
\begin{aligned}
\min_{u,x} \quad & \int_0^1 (u(t) - 1) x(t) \\
& \dot{x}(t) = gamma * (u(t) * x(t)).
& \dot{x}(t) = \gamma u(t) x(t).
\end{aligned}
```

Expand Down Expand Up @@ -54,8 +54,8 @@ function ADNLPModels.compute_jacobian_sparsity(c!, cx, x0; n = n, N = N)
# S = Symbolics.jacobian_sparsity(c!, cx, x0)
# return S
return hcat(
spdiagm(0 => ones(Bool, N), 1 => ones(Bool, N - 1)),
spdiagm(0 => ones(Bool, N), 1 => ones(Bool, N - 1)),
spdiagm(0 => ones(Bool, N - 1), 1 => ones(Bool, N - 1)),
spdiagm(0 => ones(Bool, N - 1), 1 => ones(Bool, N - 1)),
)[1:(N - 1),:]
end
Expand Down

0 comments on commit 49c5c7e

Please sign in to comment.