|
64 | 64 |
|
65 | 65 | # Tests problem indexing and updating.
|
66 | 66 | let
|
| 67 | + @test_broken false # A few cases fails for JumpProblem: https://github.com/SciML/ModelingToolkit.jl/issues/2838 |
67 | 68 | @test_broken false # A few cases fails for SteadyStateProblem: https://github.com/SciML/SciMLBase.jl/issues/660
|
68 | 69 | @test_broken false # Most cases broken for Ensemble problems: https://github.com/SciML/SciMLBase.jl/issues/661
|
69 |
| - for prob in deepcopy(problems[1:end-1]) |
| 70 | + for prob in deepcopy([oprob, sprob, dprob, nprob]) |
70 | 71 | # Get u values (including observables).
|
71 | 72 | @test prob[X] == prob[model.X] == prob[:X] == 4
|
72 | 73 | @test prob[XY] == prob[model.XY] == prob[:XY] == 9
|
73 | 74 | @test prob[[XY,Y]] == prob[[model.XY,model.Y]] == prob[[:XY,:Y]] == [9, 5]
|
74 |
| - @test_broken prob[(XY,Y)] == prob[(model.XY,model.Y)] == prob[(:XY,:Y)] == (9, 5) |
| 75 | + @test prob[(XY,Y)] == prob[(model.XY,model.Y)] == prob[(:XY,:Y)] == (9, 5) |
75 | 76 | @test getu(prob, X)(prob) == getu(prob, model.X)(prob) == getu(prob, :X)(prob) == 4
|
76 | 77 | @test getu(prob, XY)(prob) == getu(prob, model.XY)(prob) == getu(prob, :XY)(prob) == 9
|
77 | 78 | @test getu(prob, [XY,Y])(prob) == getu(prob, [model.XY,model.Y])(prob) == getu(prob, [:XY,:Y])(prob) == [9, 5]
|
|
117 | 118 |
|
118 | 119 | # Test remake function.
|
119 | 120 | let
|
| 121 | + @test_broken false # Cannot check result for JumpProblem: https://github.com/SciML/ModelingToolkit.jl/issues/2838 |
| 122 | + @test_broken false # Cannot deepcopy SteadyStateProblem :https://github.com/SciML/ModelingToolkit.jl/issues/2837 |
120 | 123 | @test_broken false # Currently cannot be run for Ensemble problems: https://github.com/SciML/SciMLBase.jl/issues/661 (as indexing cannot be used to check values).
|
121 |
| - for prob in deepcopy(problems) |
| 124 | + for prob in deepcopy([oprob, sprob, dprob, nprob]) |
122 | 125 | # Remake for all u0s.
|
123 | 126 | rp = remake(prob; u0 = [X => 1, Y => 2])
|
124 | 127 | @test rp[[X, Y]] == [1, 2]
|
|
155 | 158 |
|
156 | 159 | # Test integrator indexing.
|
157 | 160 | let
|
158 |
| - @test_broken false # NOTE: Multiple problems for `nint` (https://github.com/SciML/SciMLBase.jl/issues/662). |
159 |
| - @test_broken false # NOTE: Multiple problems for `jint` (https://github.com/SciML/SciMLBase.jl/issues/654). |
160 | 161 | @test_broken false # NOTE: Cannot even create a `ssint` (https://github.com/SciML/SciMLBase.jl/issues/660).
|
161 |
| - for int in deepcopy([oint, sint]) |
| 162 | + for int in deepcopy([oint, sint, jint, nint]) |
162 | 163 | # Get u values.
|
163 | 164 | @test int[X] == int[model.X] == int[:X] == 4
|
164 | 165 | @test int[XY] == int[model.XY] == int[:XY] == 9
|
@@ -258,13 +259,12 @@ let
|
258 | 259 |
|
259 | 260 | # Handles nonlinear and steady state solutions differently.
|
260 | 261 | let
|
261 |
| - @test_broken false # Currently a problem for nonlinear solutions and steady state solutions (https://github.com/SciML/SciMLBase.jl/issues/720). |
262 |
| - for sol in deepcopy([]) |
| 262 | + for sol in deepcopy([nsol, sssol]) |
263 | 263 | # Get u values.
|
264 | 264 | @test sol[X] == sol[model.X] == sol[:X]
|
265 | 265 | @test sol[XY] == sol[model.XY][1] == sol[:XY]
|
266 | 266 | @test sol[[XY,Y]] == sol[[model.XY,model.Y]] == sol[[:XY,:Y]]
|
267 |
| - @test_broken sol[(XY,Y)] == sol[(model.XY,model.Y)] == sol[(:XY,:Y)] |
| 267 | + @test sol[(XY,Y)] == sol[(model.XY,model.Y)] == sol[(:XY,:Y)] |
268 | 268 | @test getu(sol, X)(sol) == getu(sol, model.X)(sol)[1] == getu(sol, :X)(sol)
|
269 | 269 | @test getu(sol, XY)(sol) == getu(sol, model.XY)(sol)[1] == getu(sol, :XY)(sol)
|
270 | 270 | @test getu(sol, [XY,Y])(sol) == getu(sol, [model.XY,model.Y])(sol) == getu(sol, [:XY,:Y])(sol)
|
|
283 | 283 |
|
284 | 284 | # Tests plotting.
|
285 | 285 | let
|
286 |
| - @test_broken false # Currently broken for `ssol` (https://github.com/SciML/SciMLBase.jl/issues/580) |
287 |
| - for sol in deepcopy([osol, jsol]) |
| 286 | + for sol in deepcopy([osol, jsol, ssol]) |
288 | 287 | # Single variable.
|
289 | 288 | @test length(plot(sol; idxs = X).series_list) == 1
|
290 | 289 | @test length(plot(sol; idxs = XY).series_list) == 1
|
|
389 | 388 | reset_aggregated_jumps!(jint)
|
390 | 389 | @test jint.cb.condition.ma_jumps.scaled_rates[1] == 6.0
|
391 | 390 | end
|
392 |
| - |
0 commit comments