@@ -42,9 +42,7 @@ using OrdinaryDiffEq: ReturnCode.Success
4242 systems = [mass1, mass2, T_sensor1, T_sensor2, th_conductor])
4343 sys = mtkcompile(h2)
4444
45- u0 = [mass1. T => 1.0
46- mass2. T => 10.0 ]
47- prob = ODEProblem(sys, u0, (0 , 3.0 ))
45+ prob = ODEProblem(sys, [], (0 , 3.0 ))
4846 sol = solve(prob, Tsit5())
4947
5048 @test SciMLBase. successful_retcode(sol)
7674 th_resistor, flow_src, th_ground, th_conductor])
7775 sys = mtkcompile(h2)
7876
79- u0 = [mass1. T => 10.0 ]
77+ u0 = [mass1. T => 10.0 , th_conductor . dT => nothing , th_conductor . Q_flow => nothing , th_resistor . Q_flow => nothing , th_resistor . dT => nothing ]
8078 prob = ODEProblem(sys, u0, (0 , 3.0 ))
8179 sol = solve(prob, Tsit5())
8280
144142 collector, th_resistor, mass])
145143 sys = mtkcompile(coll)
146144
147- prob = ODEProblem(sys, [], (0 , 3.0 ))
145+ prob = ODEProblem(sys, [mass . T => nothing , th_resistor . Q_flow => nothing , th_resistor . dT => nothing ], (0 , 3.0 ))
148146 sol = solve(prob, Rodas4())
149147
150148 @test SciMLBase. successful_retcode(sol)
169167 end
170168
171169 @info " Building a FixedHeatFlow with alpha=0.0"
172- @mtkcompile test_model = TestModel()
173- prob = ODEProblem(test_model, Pair[ ], (0 , 10.0 ))
170+ @mtkcompile test_model = TestModel() allow_parameter = false
171+ prob = ODEProblem(test_model, [test_model . wall . Q_flow => nothing , test_model . wall . dT => nothing ], (0 , 10.0 ); guesses = [test_model . heatflow . port . T => 1.0 ] )
174172 sol = solve(prob)
175173
176174 heat_flow = sol[test_model. heatflow. port. Q_flow]
0 commit comments