Skip to content

Sub-optimal display of vector parameters from systems #3518

Open
@TorkelE

Description

@TorkelE

When doing e.g. parameters(sys), vector-parameters are displayed without [1:n] (which is the case when they normally are displayed). This feels a bit sub-optimal, as it is useful to know that there are actually multiple parameters in there (and sometimes how many).

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

@parameters p[1:2]
@variables (X(t)[1:2])
eqs = [
    D(X[1]) ~ p[1] - X[1]
    D(X[2]) ~ p[2] - X[2]
]
@mtkbuild osys = ODESystem(eqs, t)

# Display p, different for the two cases.
parameters(osys) # [p]
p # p[1:2]

Metadata

Metadata

Assignees

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