Skip to content
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

Torque can no longer be instantiated #198

Open
baggepinnen opened this issue Jul 20, 2023 · 1 comment
Open

Torque can no longer be instantiated #198

baggepinnen opened this issue Jul 20, 2023 · 1 comment

Comments

@baggepinnen
Copy link
Contributor

On the new version 2, I can no longer instantiate a Torque component

julia> using ModelingToolkitStandardLibrary.Mechanical.Rotational

julia> @named torque = Torque()
ERROR: TypeError: non-boolean (Nothing) used in boolean context
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/ModelingToolkitStandardLibrary/iihAd/src/Mechanical/Rotational/utils.jl:142 [inlined]
 [2] (::ModelingToolkitStandardLibrary.Mechanical.Rotational.var"#14#15"{Nothing})()
   @ ModelingToolkitStandardLibrary.Mechanical.Rotational ~/.julia/packages/ModelingToolkit/GFEA2/src/systems/abstractsystem.jl:1172
 [3] PartialElementaryOneFlangeAndSupport2(; name::Symbol, use_support::Nothing)
   @ ModelingToolkitStandardLibrary.Mechanical.Rotational ~/.julia/packages/ModelingToolkit/GFEA2/src/systems/abstractsystem.jl:1172
 [4] (::ModelingToolkitStandardLibrary.Mechanical.Rotational.var"#46#48")(; name::Symbol, use_support::Nothing, partial_element__use_support::Nothing)
   @ ModelingToolkitStandardLibrary.Mechanical.Rotational ~/.julia/packages/ModelingToolkit/GFEA2/src/systems/model_parsing.jl:216
 [5] (::ModelingToolkit.Model{ModelingToolkitStandardLibrary.Mechanical.Rotational.var"#46#48", Dict{Symbol, Any}})(; kw::Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:name,), Tuple{Symbol}}})
   @ ModelingToolkit ~/.julia/packages/ModelingToolkit/GFEA2/src/systems/model_parsing.jl:5
 [6] top-level scope
   @ ~/.julia/packages/ModelingToolkit/GFEA2/src/systems/abstractsystem.jl:1006
@ChrisRackauckas
Copy link
Member

@ven-k @YingboMa this is the problematic case I mentioned yesterday. If the boolean isn't handled in the DSL should it just split into two components?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants