|
246 | 246 | # Checks for both differential and algebraic equations.
|
247 | 247 | # Checks for problems, integrators, and solutions yielded by hybrid systems.
|
248 | 248 | # Checks that metadata, types, and default values are carried through correctly.
|
249 |
| -let |
| 249 | +@test_broken let # SDEs are currently broken with structural simplify. |
250 | 250 | # Creates the model
|
251 | 251 | @parameters a1 [description="Parameter a1"] a2::Rational{Int64} a3=0.3 a4::Rational{Int64}=4//10 [description="Parameter a4"]
|
252 | 252 | @parameters b1 [description="Parameter b1"] b2::Int64 b3 = 3 b4::Int64=4 [description="Parameter b4"]
|
|
407 | 407 |
|
408 | 408 | # Checks that a hybrid SDE + algebraic equations works.
|
409 | 409 | # Checks that structural_simplify is required to simulate hybrid SDE + algebraic equations.
|
410 |
| -let |
| 410 | +@test_broken let # SDEs are currently broken with structural simplify. |
411 | 411 | # Creates hybrid reactions system.
|
412 | 412 | @parameters p d k1 k2
|
413 | 413 | @species X(t)
|
|
535 | 535 |
|
536 | 536 | # Checks that the simulations are identical.
|
537 | 537 | # Some internal details will be different, however, the solutions should be identical.
|
538 |
| - osol_messy[[:S, :I, :R, :M, :H]] ≈ osol_ordered[[:S, :I, :R, :M, :H]] |
| 538 | + @test osol_messy[[:S, :I, :R, :M, :H]] ≈ osol_ordered[[:S, :I, :R, :M, :H]] |
539 | 539 | end
|
540 | 540 |
|
541 | 541 |
|
|
677 | 677 | issetequal(unknowns(rs_2)[2:3], [rs_2.V, rs_2.N])
|
678 | 678 | end
|
679 | 679 |
|
| 680 | +# Checks that variables that can be inferred from differential equations, but are also declared |
| 681 | +# manually, have their additional inputs properly registered. |
| 682 | +let |
| 683 | + rs = @reaction_network begin |
| 684 | + @variables V(t)=2.0 [description = "A variable"] |
| 685 | + @equations D(V) ~ -1 |
| 686 | + end |
| 687 | + @test getdefault(rs.V) == 2.0 |
| 688 | + @test getdescription(rs.V) == "A variable" |
| 689 | +end |
| 690 | + |
680 | 691 | # Checks that equations can be formatted in various ways. Tries e.g. isolating a single number on
|
681 | 692 | # either side of the equality.
|
682 | 693 | # Checks that various weird function can be used within equations.
|
|
815 | 826 | end
|
816 | 827 |
|
817 | 828 | # Misformatted expression for a differential.
|
818 |
| - @reaction_network begin |
| 829 | + @test_throws Exception @eval @reaction_network begin |
819 | 830 | @variables D
|
820 | 831 | @differentials d ~ D
|
821 | 832 | end
|
|
0 commit comments