control-toolbox / control-toolbox/CTDirect.jl
Re-enable the moonlander / quadrotor :manual ADNLP tests (blocked on ADNLPModels#383)
- Dominant language
- Julia
- Stars
- 12
- Forks
- 5
- Avg merge
- 2h 44m
- Merged PRs (30d)
- 1
Description
## Summary
`test/ci/test_all_ocp.jl` had its `:moonlander` and `:quadrotor` testsets **disabled**
in #622 (commit on branch `v1.1.1`). Re-enable them once the upstream cause is fixed.
## Why they were disabled
Both testsets ran `test_problem(moonlander(); adnlp_backend=:manual)` (the `:quadrotor`
one via a long-standing copy-paste slip — it never actually tested `quadrotor()`).
`moonlander` is a free-final-time OCP with a rotation-matrix dynamics: `cos(θ)` / `sin(θ)`
with `θ = x₅` an **unbounded** state. The `:manual` (and `:optimized`) ADNLP backend build
a `SparseReverseADHessian`, which records its ReverseDiff tape on an **uninitialised**
`Vector{ForwardDiff.Dual}` and executes the model function on that memory. CTDirect's NLP
variable bounds are `-Inf .* ones(nvar)`; once freed, that storage is recycled into the
uninitialised tape input, so `θ` is seeded with `-Inf` and `cos(-Inf)` throws
`DomainError: sincos(x) is only defined for finite x` **before any solve**.
Deterministic on the Julia 1.12 CI runners, flaky on 1.10 — it depends only on which
dependency versions each CI run resolves (surfaced by the CTParser 0.9 / CTModels 0.18
bump in #622, not caused by it).
Upstream issue + minimal reproducer: JuliaSmoothOptimizers/ADNLPModels.jl#383
## To do when re-enabling
- [ ] Restore the `:moonlander` testset (`test/ci/test_all_ocp.jl`).
- [ ] Wire the `:quadrotor` testset to actually run `quadrotor()` (not `moonlander()`),
ideally with `adnlp_backend=:default` (forward-mode Hessian, unaffected).
- [ ] Requires ADNLPModels ≥ the release that fixes #383 (bump the `[compat]` lower bound).
Contributor guide
Assessment
This issue has not been assessed yet.