Skip to content

Adapt to CTModels v0.7.x#539

Merged
PierreMartinon merged 55 commits intodevelopfrom
breaking/ctmodels-0.7
Feb 11, 2026
Merged

Adapt to CTModels v0.7.x#539
PierreMartinon merged 55 commits intodevelopfrom
breaking/ctmodels-0.7

Conversation

@ocots
Copy link
Copy Markdown
Member

@ocots ocots commented Jan 19, 2026

Summary

This PR adapts CTDirect to work with CTModels v0.7.x. / CTSolvers v0.2.x
Since the changes to CTDirect are quite significant, this will be v1.0.0-beta

Related to:

Changes

Code Adaptation

  • Adapted code to work with CTModels v0.7.x / CTSolvers v0.2.x API

Project.toml

  • Version bump: 0.17.5-beta1.0.0-beta
  • CTModels compat widened: "0.6""0.6, 0.7"

Testing

  • Ipopt solver
  • MadNLP solver
  • ADNLP modeler
  • ExaModels modeler (CPU)
  • GPU case: ExaModels + MadNLPGPU
  • discretization options: schemes, time grid (size, non uniform)
  • basic solver options: tol, maxiter
  • basic initial guess options: constant, functional, interpolations
  • advanced initial guess: warm start and continuation, init macro
  • advanced options: manual sparsity patterns for ADNLP

Migration Context

This is Phase 3 of the CTModels breaking change migration:

  1. ✅ Phase 1: CTFlows widening (compatible)
  2. ✅ Phase 2: CTModels v0.7.0-beta release
  3. �� Phase 3: CTDirect adaptation (this PR)
  4. ⏳ Phase 3.5: CTSolvers beta release
  5. ⏳ Phase 4: OptimalControl adaptation
  6. ⏳ Phase 5: Stabilization

Checklist

  • All checks passing, including GPU and doc
  • Project.toml: version 1.0.0-beta
    compat CTBase 0.18, CTModels 0.8, CTParser 0.8, CTSolvers 0.2
  • Ready for registration in ct-registry

Next Steps

After merging:

  1. Register CTDirect v1.0.0-beta in ct-registry
  2. Create tag v1.0.0-beta
  3. Verify breakage tests on CTModels.jl#248
  4. Proceed to Phase 3.5 (CTSolvers)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 19, 2026

Breakage test results
Date: 2026-02-10 18:12:05

Name Latest Stable
OptimalControl compat: v0.17.5-beta compat: v0.17.5-beta

ocots and others added 5 commits January 19, 2026 10:17
- Remove extension files (ADNLP, Exa, Ipopt, Knitro, MadNLP)
- Add new discretization API and core types
- Implement collocation method in separate module
- Update main module structure and solve interface
- Modify Project.toml dependencies
@PierreMartinon
Copy link
Copy Markdown
Member

PierreMartinon commented Jan 20, 2026

Notes:

  • due to the major changes in CTDirect, this will be the start of 1.x versions
  • the SolverInfos function is NLP solver dependent and should be moved to CTModels extensions. It is needed in CTDirect when building the solution. For now I have in CTDirect the basic version that works for Ipopt. The former version for MadNLP can be found in https://github.com/control-toolbox/CTDirect.jl/blob/main/ext/CTDirectExtMadNLP.jl

@ocots
Copy link
Copy Markdown
Member Author

ocots commented Jan 22, 2026

@PierreMartinon I have created a new beta version of CTModels with SolverInfos renamed to CTModels.extract_solver_infos, cf.

https://github.com/control-toolbox/CTModels.jl/blob/b8338cc5212270f4dbc0fa28540622495d690a5c/src/nlp/extract_solver_infos.jl#L47-L57

and

https://github.com/control-toolbox/CTModels.jl/blob/b8338cc5212270f4dbc0fa28540622495d690a5c/ext/CTModelsMadNLP.jl#L49-L68

@PierreMartinon
Copy link
Copy Markdown
Member

@PierreMartinon I have created a new beta version of CTModels with SolverInfos renamed to CTModels.extract_solver_infos, cf.

control-toolbox/CTModels.jl@b8338cc/src/nlp/extract_solver_infos.jl#L47-L57

and

control-toolbox/CTModels.jl@b8338cc/ext/CTModelsMadNLP.jl#L49-L68

Hi Olivier,
Thanks, can you remove the nlp solver passed as second argument ?
Cf version in the current breaking branch

function SolverInfos(nlp_solution::SolverCore.AbstractExecutionStats)

@ocots ocots changed the base branch from main to develop February 10, 2026 16:19
@ocots
Copy link
Copy Markdown
Member Author

ocots commented Feb 10, 2026

@PierreMartinon J'ai crée une branche develop pour que tu ne pollues pas ta branche main et pour que cette dernière reste toujours fonctionnelle et associée à une release sur le registre général.

Du coup j'ai remplacé pour cette PR, la destination, de main à develop.

De plus, je vais te changer un truc pour faire fonctionner la documentation aussi au niveau de la CI.

@jbcaillau
Copy link
Copy Markdown
Member

@PierreMartinon 🔥 pour la beta.

NB. @ocots a détecté un pb de gestion des compats dans le registre local pour le versioning x.y.z-beta.t (voir GunnarFarneback/LocalRegistry.jl#100) du coup, on se limite à faire du x.y.z-beta (puis du x.y.z+1-beta, etc. jusqu'à x.y.z qui est considérée plus fraîche, comme attendu). les beta sont uniquement sur le reg. local (intersection vide avec général) pas de souci pour faire ensuite une release avec z non séquentiels sur le général, genre 1.2.3 -> 1.2.7 (avec 1.2.4-beta, 1.2.5-beta et 1.2.6-beta uniquement sur le reg. local)

@PierreMartinon PierreMartinon merged commit 3ba8e3a into develop Feb 11, 2026
11 checks passed
@PierreMartinon PierreMartinon deleted the breaking/ctmodels-0.7 branch February 11, 2026 13:22
@ocots ocots mentioned this pull request Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run GPU Trigger GPU Github action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants