Skip to content

Trivial nonlinear system not simplifying to zero #4322

@ChrisRackauckas

Description

@ChrisRackauckas

MWE:

using ModelingToolkit, OrdinaryDiffEq
using ModelingToolkit: t_nounits as t
@variables x(t) y(t)
eqs = [
    0 ~ x - y
    0 ~ 2y - x
]

@named sys = System(eqs, t)
sys = mtkcompile(sys)

equations(sys)
# 1-element Vector{Equation}:
# 0 ~ x(t) - y(t)

prob = ODEProblem(sys, Pair[], (0, 10.0))
sol = solve(prob, Tsit5()) # ERROR: This solver is not able to use mass matrices. For compatible solvers see https://docs.sciml.ai/DiffEqDocs/stable/solvers/dae_solve/

Metadata

Metadata

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