Skip to content

Conversation

@ocots
Copy link
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
  • 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 tests passing
  • Project.toml updated (version + compat)
  • 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
Contributor

github-actions bot commented Jan 19, 2026

Breakage test results
Date: 2026-01-28 14:42:38

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
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
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
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants