-
Notifications
You must be signed in to change notification settings - Fork 4
update to MTKv10 #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update to MTKv10 #76
Conversation
|
A docs example fails with the error below, it appears to be related to symbolic arrays? julia> prob = ODEProblem(structural_simplify(closed_loop), [F.xd => 0], (0.0, 8.0))
ERROR: ArgumentError: (Cgs₊A(Cgs₊v(t)))[1, 2] is present in the system but (Cgs₊A(Cgs₊v(t)))[1, 2] is not an unknown.
Stacktrace:
[1] TearingState(sys::System; quick_cancel::Bool, check::Bool, sort_eqs::Bool)
@ ModelingToolkit ~/.julia/packages/ModelingToolkit/v0QS9/src/systems/systemstructure.jl:376
[2] __mtkcompile(sys::System; simplify::Bool, inputs::Vector{…}, outputs::Vector{…}, disturbance_inputs::Vector{…}, sort_eqs::Bool, kwargs::@Kwargs{…})
@ ModelingToolkit ~/.julia/packages/ModelingToolkit/v0QS9/src/systems/systems.jl:79
[3] __mtkcompile
@ ~/.julia/packages/ModelingToolkit/v0QS9/src/systems/systems.jl:62 [inlined]
[4] mtkcompile(sys::System; additional_passes::Vector{…}, simplify::Bool, split::Bool, allow_symbolic::Bool, allow_parameter::Bool, conservative::Bool, fully_determined::Bool, inputs::Vector{…}, outputs::Vector{…}, disturbance_inputs::Vector{…}, kwargs::@Kwargs{})
@ ModelingToolkit ~/.julia/packages/ModelingToolkit/v0QS9/src/systems/systems.jl:37
[5] mtkcompile
@ ~/.julia/packages/ModelingToolkit/v0QS9/src/systems/systems.jl:30 [inlined]
[6] structural_simplify(sys::System; kwargs::@Kwargs{})
@ ModelingToolkit ./deprecated.jl:105
[7] structural_simplify(sys::System)
@ ModelingToolkit ./deprecated.jl:103
[8] top-level scope
@ REPL[29]:1
Some type information was truncated. Use `show(err)` to see complete types.The unknowns do appear to contain this strange variable though |
|
Is that meant to be a variable of the system? |
|
Yes, they are defined like this
|
|
It's a namespacing bug. The unknown is |
|
On MTK master, initialization now fails in the julia> controllersy, ssy, ops3, resolved_ops3 = trajectory_ss(closed_loop, closed_loop.r, closed_loop.u, sol; t=timepoints, verbose=true, loop_openings=[closed_loop.y]);
┌ Warning: Initialization system is overdetermined. 1 equations for 0 unknowns. Initialization will default to using least squares. `SCCNonlinearProblem` can only be used for initialization of fully determined systems and hence will not be used here. To suppress this warning pass warn_initialize_determined = false. To make this warning into an error, pass fully_determined = true
└ @ ModelingToolkit ~/.julia/dev/ModelingToolkit/src/problems/initializationproblem.jl:106
ERROR: Initialization algorithm SciMLBase.OverrideInit failed with ...
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] (::ModelingToolkit.LinearizationFunction{…})(u::Vector{…}, p::MTKParameters{…}, t::Float64)
@ ModelingToolkit ~/.julia/dev/ModelingToolkit/src/linearization.jl:305
[3] solve(prob::LinearizationProblem{ModelingToolkit.LinearizationFunction{…}, Float64}; allow_input_derivatives::Bool)
@ ModelingToolkit ~/.julia/dev/ModelingToolkit/src/linearization.jl:442From Aayush:
|
does not work, since the original inputs have the wrong namespace
=> nothingoverrides defaults SciML/ModelingToolkit.jl#3714