Skip to content

refactor(ext): qualified imports in the OptimalControl and JuMP extensions (MOD4) - #471

Merged
ocots merged 1 commit into
mainfrom
refactor/qualified-imports
Nov 20, 2026
Merged

ocots merged 1 commit into
mainfrom
refactor/qualified-imports

Conversation

@ocots

@ocots ocots commented Nov 20, 2026

Copy link
Copy Markdown
Member

Refs #449 (T3). Conventions: ct-conventions v0.14.0, ct-agents v0.5.0.

Summary

  • ext/OptimalControlModels.jl, ext/JuMPModels.jl: no bare using any more (MOD4). The names the model files use everywhere come by name (OptimalControlBackend, OptimalControlScalarizedBackend, JuMPBackend, parameters_data, grid_size_data, the macro @def; MOD4 keeps names for macros and pervasive symbols), so the ~60 model files are unchanged. The accessors JuMPModels calls are qualified (CTModels.Models.state_dimension, CTModels.Components.time_grid, JuMP.objective_value, …). Unused imports removed (DocStringExtensions in OptimalControlModels, OrderedDict).
  • cart_pendulum (OptimalControl): the comment on J = mcart now says what to check and where: ∂eq/∂ddx would be -(m + mcart), to check against the source in T6/T7. The model is unchanged.

Test plan

  • Pkg.test(; test_args=["JuMP", "OptimalControl", "OptimalControlScalarized", "comparison"]), every problem: 1290 passed.
  • CI.

🤖 Generated with Claude Code

…sions (MOD4, T3 of #449)

The names the model files use everywhere are imported by name (backends, parameters_data,
grid_size_data, @def); the accessors of JuMPModels are qualified. The cart_pendulum comment
on J points to the check of the formulations (T6/T7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ocots ocots added the run ci github-runner Trigger the CI workflow on GitHub-hosted runners label Nov 20, 2026
@ocots
ocots merged commit 1369a29 into main Nov 20, 2026
20 checks passed
@ocots
ocots deleted the refactor/qualified-imports branch November 20, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run ci github-runner Trigger the CI workflow on GitHub-hosted runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant