We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0cf44a commit cea83b3Copy full SHA for cea83b3
test/model_parsing.jl
@@ -4,7 +4,7 @@ using ModelingToolkit: get_gui_metadata,
4
VariableDescription, RegularConnector
5
using URIs: URI
6
using Distributions
7
-using Unitful
+using DynamicQuantities, OrdinaryDiffEq
8
9
ENV["MTK_ICONS_DIR"] = "$(@__DIR__)/icons"
10
@@ -143,6 +143,10 @@ C_val = 20
143
R_val = 20
144
res__R = 100
145
@mtkbuild rc = RC(; C_val, R_val, resistor.R = res__R)
146
+prob = ODEProblem(rc, [], (0, 1e9))
147
+sol = solve(prob, Rodas5P())
148
+defs = ModelingToolkit.defaults(rc)
149
+@test sol[rc.capacitor.v, end] ≈ defs[rc.constant.k]
150
resistor = getproperty(rc, :resistor; namespace = false)
151
@test getname(rc.resistor) === getname(resistor)
152
@test getname(rc.resistor.R) === getname(resistor.R)
0 commit comments