Skip to content

[Feature] Real time plot of solver iterations #568

Open

Description

@jbcaillau

@PierreMartinon @ocots

À propos de plots, voir à l’occasion comment intégrer certaines fonctionnalités offertes par makie (TOP). Je pense notamment au suivi dynamique des itérations du solveur opti en direct (cf. POC SED @clebreto)

https://www.linkedin.com/posts/simondanisch_were-happy-to-release-makie-v023-this-ugcPost-7341875516704014336-tzOD?utm_medium=ios_app&rcm=ACoAAEJ6FsAB17ys09GK4Ay8ZMKcJO6th7BNLEI&utm_source=social_share_send&utm_campaign=mail

Activity

  1. added
    feature
    on Jun 21, 2025
  2. added
    good first issue
    on Jun 22, 2025
  3. ocots commented on Jul 1, 2025

    @ocots
    Member

    Many solvers now have a method to compute the iterations step by step. This would help. Do we know if Ipopt, MadNLP, Percival or other, have this step by step feature?

  4. PierreMartinon commented on Jul 1, 2025

    @PierreMartinon
    Member

    Many solvers can handle a callback function called at each iteration, we may try to use this to plot the current iterate ?

  5. ocots commented on Jul 1, 2025

    @ocots
    Member

    There is a callback for the solvers we use so this will be ok. I was wondering if there is also this possibility.

  6. jbcaillau commented on Jul 2, 2025

    @jbcaillau
    MemberAuthor

    may be to be discussed with @rveltz on how to use makie to do efficiently this kind of thing

  7. ocots commented on Nov 15, 2026

    @ocots
    Member

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

    Complement, from a discussion with ocots: beyond a plot that updates, a small app that opens during the convergence:

    • the trajectories (state, control, costate) of the current iterate, updated at each iteration;
    • a slider or buttons to go back and forward through the iterations, to see how the trajectories evolved;
    • the measures of each iteration next to them (objective, infeasibilities, norms), the same as the text display of An iteration display for optimal control, solver-agnostic CTSolvers.jl#336;
    • saving the recorded iterations, to look at them again or compare two runs.

    It relies on the same per-iteration hook as control-toolbox/CTSolvers.jl#336 (an interface of CTSolvers over the callbacks of Ipopt, MadNLP and the others) and on the map from the NLP iterate to the trajectories (CTDirect). With Makie (GLMakie for a window, WGLMakie/Bonito in a browser), the window can be fed by observables. Recording the iterates is useful on its own, without the window.

    🤖 Generated with Claude Code

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

Metadata

Metadata

Assignees

Labels

featuregood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions