Skip to content

breaking change in behavior of complete in non-breaking release #3397

@isaacsas

Description

@isaacsas

Calling complete(sys) now changes the underlying parameters of a system, interjecting lots of Initial(unknown)s into the parameter list. This seems breaking, as anything that previously worked with completed systems, like various Catalyst functionality, suddenly has lots of non-parameter parameters to deal with when calling get_ps(sys).

Older MTK v9s (like 9.59):

using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D

@parameters k1 
@variables X1(t) 
eqs = [
    D(X1) ~ k1 * X1
]
@mtkbuild osys = ODESystem(eqs, t, [X1], [k1])

such that

julia> ModelingToolkit.get_ps(osys)
1-element Vector{Any}:
 k1

Newer MTK v9s:

julia> ModelingToolkit.get_ps(osys)
2-element Vector{Any}:
 k1
 Initial(X1(t))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions