File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -319,11 +319,13 @@ end
319319
320320function Base. show (io:: IO , sys:: AbstractSystem )
321321 eqs = equations (sys)
322- Base. printstyled (io, " Equations ($(length (eqs)) ):\n " ; bold= true )
323- Base. print_matrix (io, eqs)
324- println (io)
322+ Base. printstyled (io, " Model $(nameof (sys)) with $(length (eqs)) equations\n " ; bold= true )
323+ # The reduced equations are usually very long. It's not that useful to print
324+ # them.
325+ # Base.print_matrix(io, eqs)
326+ # println(io)
325327
326- rows = first (displaysize (io)) ÷ 3
328+ rows = first (displaysize (io)) ÷ 5
327329 limit = get (io, :limit , false )
328330
329331 vars = states (sys); nvars = length (vars)
Original file line number Diff line number Diff line change @@ -41,6 +41,22 @@ eqs = [
4141lorenz1 = ODESystem (eqs,t,name= :lorenz1 )
4242
4343lorenz1_aliased = alias_elimination (lorenz1)
44+ io = IOBuffer (); show (io, lorenz1_aliased); str = String (take! (io))
45+ @test str == """
46+ Model lorenz1 with 4 equations
47+ States (3):
48+ x(t)
49+ y(t)
50+ z(t)
51+ Parameters (3):
52+ σ
53+ ρ
54+ β
55+ Incidence matrix:
56+ × × × ⋅ ⋅
57+ × × ⋅ × ×
58+ × × ⋅ ⋅ ×
59+ × × ⋅ ⋅ ⋅"""
4460reduced_eqs = [
4561 D (x) ~ σ* (y - x)
4662 D (y) ~ β + x* (ρ - z) - y
You can’t perform that action at this time.
0 commit comments