Skip to content

Update to ModelingToolkit v11 requires code migration #105

@ChrisRackauckas-Claude

Description

@ChrisRackauckas-Claude

Summary

PR #100 attempts to add ModelingToolkit v11 compat for NeuralLyapunovProblemLibrary, but this requires several breaking changes to be addressed.

Problem

ModelingToolkit v11 introduces breaking API changes:

  1. Incompatible Symbolics versions:

    • MTK 9.x requires Symbolics 6.x
    • MTK 11.x requires Symbolics 7.x
    • These cannot coexist - we must choose one
  2. structural_simplify API changes:

    • Old (MTK 9): structural_simplify(sys, (inputs, outputs); split=..., simplify=...) returns a tuple
    • New (MTK 11): mtkcompile(sys; inputs=..., outputs=...) returns a single System
  3. Other API changes per the MTK v10 migration guide:

    • ODESystem → unified System type
    • Callback semantics changed
    • getproperty/setproperty! for system fields removed

Files Affected

The following test files use the old structural_simplify API with tuple unpacking:

  • test/pendulum_test.jl (lines 35-41, 59)
  • test/double_pendulum_test.jl (lines 90, 115, 181, 214)
  • test/planar_quadrotor_test.jl (lines 26, 57, 123, 159)
  • test/quadrotor_test.jl (lines 35, 65, 156, 194)

Recommended Next Steps

  1. Drop MTK 9 support - Update compat to ModelingToolkit = "11" only
  2. Update Symbolics compat - Change to Symbolics = "7"
  3. Migrate all test files to use the new mtkcompile API
  4. Update main NeuralLyapunov package if it also needs MTK 11 support

Alternative

If MTK 9 support is still needed, we may need to wait until:

  • Upstream provides a compatibility layer
  • Or create conditional code paths for both versions (complex)

cc @ChrisRackauckas

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions