Skip to content

Can create NonlinearProblem with missing variables #3461

@TorkelE

Description

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

@parameters p d
@variables X(t)
eqs = [0 ~ p - d*X]
@mtkbuild sys = NonlinearSystem(eqs)

u0 = []
ps = [p => 1.0, d => 1.0] # Value for `d` is missing

prob = NonlinearProblem(sys, u0, ps) # This passes without problem.
prob[X] # Is 1.0

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