docs: restore macro-free worked problems on functional-api.md (E7) - #938
Merged
Conversation
The doc rewrite left only the energy double integrator worked in functional (macro-free) form; the other core gallery problems existed in @def form only. This restores them, as the E6 attic audit (F1/R2) recommended. - functional-api.md: "A worked example" -> "Worked problems", seven ### subsections in gallery order (energy, time, control-free, control-and-variable, turnpike, singular, state-constraint). Each 2-7: setup block, side-by-side @def/functional model, one solve + objective check, links to the examples/* page and the gallery. All seven solve to identical objectives in both forms. - guided-tour.jl: the functional block used u[1] / 0.5*u[1]^2 and a warning claiming callbacks are "always vector-valued", contradicting functional-api.md and the "1-D is a scalar" rule. Fixed to bare scalars; warning rewritten. - without-control.md: point at the new side-by-side control-free problem. Docs build verified clean locally: all @example blocks execute, only the six pre-existing @extref errors remain. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ocots
added a commit
that referenced
this pull request
Sep 2, 2026
The attic (24 pre-v2.1 pages) was kept only for harvesting by the rewritten site. The attic audit (campaign phase N) confirmed coverage is ~1:1 and E7 (#938) closed the one content regression it found (F1), so the directory is now dead weight. Nothing in `docs/src/` or `docs/make.jl` references it; the full docs build is unchanged (exit 0, only the six pre-existing @extref items in the tolerated warnonly classes). Also folds in audit finding F3: `solve/choosing-a-method.md` named `OptimalControl.get_strategy_registry()`, which `99-api-coverage.md` §12 says must not be documented — rephrased to "internal and not re-exported". The cahier §12 acceptance walk and F4 (the stale 193 symbol count in `99-api-coverage.md`) are deferred to a dedicated follow-up PR. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Campaign phase E7 — resolves the one content regression the E6 attic audit (
.reports/campaign/N-attics-audit.md, finding F1 / recommendation R2) found: the documentation rewrite kept only the energy double integrator worked in functional (macro-free) form, while the other core gallery problems survived in@defform only.docs/attic/manual-macro-free.mdwas their only macro-free home, and it is slated for deletion in E6.Changes
docs/src/modelling/functional-api.md— "A worked example…" becomes## Worked problemswith seven###subsections in gallery order: energy (full treatment kept), time, control-free, control-and-variable, turnpike, singular, state-constraint. Each new one: setup block → side-by-side@def/ functional model (responsive-columns-40-60, per the Phase-J decision againstcode-grouptabs) → onesolve+ objective/variablecheck → links to itsexamples/*page and the gallery.turnpikeis included beyond the audit's six for gallery parity (it post-dates the attic; it is the purest scalar-convention demo). State-constraint uses a nonlinear:pathconstraint to match its example page (the attic used a box:statebound).docs/src-literate/guided-tour.jl— its functional block usedu[1]/0.5*u[1]^2and a!!! warningclaiming callbacks are "always vector-valued", contradictingfunctional-api.md§"Shapes in callbacks" and the "1-D is a scalar" rule. Fixed to bare scalars; warning rewritten.docs/src/modelling/without-control.md— one sentence pointing at the new side-by-side control-free problem.No change to the public API,
Project.toml, ormake.jl.Verification
julia --project=. docs/make.jlbuilds clean locally:@exampleblocks execute; the printedobjective: macro = …, functional = …pairs are identical for every problem (energy 6, time 2, control-free λ≈0.496, control+variable 0.0387, turnpike 0.375, singular 1.150, state-constraint 7.692).@extrefitems (Plots.plot(::CTModels…)×4,CTBase.Strategies.parameter×2), unchanged frommainand in the toleratedwarnonlyclasses. No new unresolved@ref.This unblocks E6 (delete
docs/attic/, close the cahier). Audit items F3 (get_strategy_registrydouble mention) and F4 (193/203 symbol count) are deferred to the E6 §12 walk.🤖 Generated with Claude Code