File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 683
683
@test length (equations (structural_simplify (sys))) == 2
684
684
end
685
685
686
- let
686
+ let
687
687
eq_to_lhs (eq) = eq. lhs - eq. rhs ~ 0
688
688
eqs_to_lhs (eqs) = eq_to_lhs .(eqs)
689
689
708
708
D2 (u[2 ]) ~ u[1 ] * (rho - u[3 ]) - u[2 ],
709
709
D2 (u[3 ]) ~ u[1 ] * u[2 ] - beta * u[3 ]]
710
710
eqs3 = eqs_to_lhs (eqs3)
711
-
711
+
712
712
eqs4 = [
713
713
D2 (y2) ~ x2 * (rho - z2) - y2,
714
714
D2 (x2) ~ sigma * (y2 - x2),
724
724
@test ModelingToolkit. isisomorphic (sys1, sys2)
725
725
@test ! ModelingToolkit. isisomorphic (sys1, sys3)
726
726
@test ModelingToolkit. isisomorphic (sys1, ssys3) # I don't call structural_simplify in isisomorphic
727
- @test ! ModelingToolkit. isisomorphic (sys1, sys4)
727
+ @test ! ModelingToolkit. isisomorphic (sys1, sys4)
728
728
729
729
# 1281
730
730
iv2 = only (independent_variables (sys2))
731
731
@test isequal (only (independent_variables (convert_system (ODESystem, sys1, iv2))), iv2)
732
- end
732
+ end
733
+
734
+ let
735
+ @variables t
736
+ vars = @variables sP (t) spP (t) spm (t) sph (t)
737
+ pars = @parameters a b
738
+ eqs = [
739
+ sP ~ 1
740
+ spP ~ sP
741
+ spm ~ a
742
+ sph ~ b
743
+ spm ~ 0
744
+ ]
745
+ @named sys = ODESystem (eqs, t, vars, pars)
746
+ @test_throws ModelingToolkit. ExtraEquationsSystemException structural_simplify (sys)
747
+ end
You can’t perform that action at this time.
0 commit comments