We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This exampel works on ModelingToolkit v9.46.1 but fails on latest
using ModelingToolkit using ModelingToolkitStandardLibrary: Blocks, Mechanical.Rotational @mtkmodel ControlledMSD begin @parameters begin J = 1.0 c = 100 d = 0.1 end @components begin inertia1 = Rotational.Inertia(; J, phi=0, w=0) inertia2 = Rotational.Inertia(; J, phi=0, w=0) spring = Rotational.Spring(; c) damper = Rotational.Damper(; d) input = Rotational.Torque() end @equations begin connect(input.flange, inertia1.flange_a) connect(inertia1.flange_b, spring.flange_a, damper.flange_a) connect(spring.flange_b, damper.flange_b, inertia2.flange_a) end end @named model = ControlledMSD() model = complete(model) inputs = [model.input.tau.u] outputs = [model.inertia1.phi] (f_oop, f_ip), x_sym, p_sym, io_sys = ModelingToolkit.generate_control_function(model, inputs, split=false) y_fun = ModelingToolkit.build_explicit_observed_function(io_sys, outputs) _, p = ModelingToolkit.get_u0_p(io_sys, [model.input.tau.u => 0], []) y_fun(zeros(4), p, t)
The text was updated successfully, but these errors were encountered:
complete
split = false
AayushSabharwal
Successfully merging a pull request may close this issue.
This exampel works on ModelingToolkit v9.46.1 but fails on latest
The text was updated successfully, but these errors were encountered: