Skip to content

Commit 0027b25

Browse files
committed
Hint to inspection functions when only parts of a system is shown
1 parent c5427d9 commit 0027b25

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/systems/abstractsystem.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem; bold = t
19121912
end
19131913
end
19141914
limited = nrows < nsubs
1915-
limited && print(io, "\n") # too many variables to print
1915+
limited && print(io, "\n\n see ModelingToolkit.get_systems(sys) for all") # too many variables to print # TODO: should export e.g. systems(sys) for consistency
19161916

19171917
# Print equations
19181918
eqs = equations(sys)
@@ -1922,10 +1922,10 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem; bold = t
19221922
nini = has_initialization_eqs(sys) ? length(initialization_equations(sys)) : 0
19231923
ntot = neqs + nobs + next + nini
19241924
ntot > 0 && printstyled(io, "\nEquations ($ntot):"; bold)
1925-
neqs > 0 && printstyled(io, "\n $neqs solvable")
1926-
nobs > 0 && printstyled(io, "\n $nobs observed")
1927-
next > 0 && printstyled(io, "\n $next extra")
1928-
nini > 0 && printstyled(io, "\n $nini initialization")
1925+
neqs > 0 && printstyled(io, "\n $neqs solvable … see equations(sys) for all")
1926+
nobs > 0 && printstyled(io, "\n $nobs observed … see observed(sys) for all")
1927+
next > 0 && printstyled(io, "\n $next extra") # TODO: what are these equations?
1928+
nini > 0 && printstyled(io, "\n $nini initialization … see initialization_equations(sys) for all")
19291929
#Base.print_matrix(io, eqs) # usually too long and seldom useful to print
19301930

19311931
# Print variables
@@ -1957,7 +1957,7 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem; bold = t
19571957
end
19581958
end
19591959
limited = nrows < nvars
1960-
limited && print(io, "\n") # too many variables to print
1960+
limited && printstyled(io, "\n\n see $(nameof(varfunc))(sys) for all") # too many variables to print
19611961
end
19621962

19631963
return nothing

0 commit comments

Comments
 (0)