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
319
319
320
320
function Base. show (io:: IO , sys:: AbstractSystem )
321
321
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)
325
327
326
- rows = first (displaysize (io)) ÷ 3
328
+ rows = first (displaysize (io)) ÷ 5
327
329
limit = get (io, :limit , false )
328
330
329
331
vars = states (sys); nvars = length (vars)
Original file line number Diff line number Diff line change @@ -41,6 +41,22 @@ eqs = [
41
41
lorenz1 = ODESystem (eqs,t,name= :lorenz1 )
42
42
43
43
lorenz1_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
+ × × ⋅ ⋅ ⋅"""
44
60
reduced_eqs = [
45
61
D (x) ~ σ* (y - x)
46
62
D (y) ~ β + x* (ρ - z) - y
You can’t perform that action at this time.
0 commit comments