Skip to content

Prototype: one transcription for ADNLP and Exa (trace-based Exa, out-of-place ADNLP) #674

Open

Description

@ocots

Written by Claude (Claude Code) at the request of ocots.

Part of #673 (modeler-agnostic transcription). Extends item 1 of §5 of the roadmap (discussion #609): it is the first deliverable, and its result fixes the forms of CTModels (control-toolbox/CTModels.jl#516) and the NLP API of CTSolvers (control-toolbox/CTSolvers.jl#319).

Goal

Check, on small problems and before writing any API, that one transcription written with generic Julia functions can feed both ADNLP and Exa efficiently.

What to check

  1. Tracing for Exa: call generic dynamics and cost functions on ExaModels nodes inside generators, for the double integrator then Goddard, with Euler and trapeze. Expected: the same NLP as the one generated by CTParser (dimensions, constraint and objective values, solution).
  2. Forms that trace: an out-of-place function returning a tuple or an SVector; an in-place f! called with a Vector{Any} buffer; the @views r[:] .= e generated by CTParser's :fun backend (broadcast on nodes).
  3. Linear algebra on nodes (x' * Q * x), with and without CTParserExaModels.
  4. Time t0 + j*dt when tf is a variable; constants captured in a closure, on GPU.
  5. ADNLP with the out-of-place form: build time, evaluation time and allocations at N = 1000 for midpoint and trapeze, against the current in-place code of CTDirect.

Output

A short report (in .reports/ and summarized here) that fixes:

  • the forms CTModels must store, and the calling convention CTDirect sees;
  • the shape of a constraint family for the NLP API;
  • what does not trace, and the error to throw.

Links

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions