Skip to content

Commit 699fa62

Browse files
committed
Hint to inspection functions when only parts of a system is shown
1 parent c626dfa commit 699fa62

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)
@@ -1923,10 +1923,10 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem; bold = t
19231923
nini = has_initialization_eqs(sys) ? length(initialization_equations(sys)) : 0
19241924
ntot = neqs + nobs + next + nini
19251925
ntot > 0 && printstyled(io, "\nEquations ($ntot):"; bold)
1926-
neqs > 0 && printstyled(io, "\n $neqs solvable")
1927-
nobs > 0 && printstyled(io, "\n $nobs observed")
1928-
next > 0 && printstyled(io, "\n $next extra")
1929-
nini > 0 && printstyled(io, "\n $nini initialization")
1926+
neqs > 0 && printstyled(io, "\n $neqs solvable … see equations(sys) for all")
1927+
nobs > 0 && printstyled(io, "\n $nobs observed … see observed(sys) for all")
1928+
next > 0 && printstyled(io, "\n $next extra") # TODO: what are these equations?
1929+
nini > 0 && printstyled(io, "\n $nini initialization … see initialization_equations(sys) for all")
19301930
#Base.print_matrix(io, eqs) # usually too long and not useful to print all equations
19311931
end
19321932

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

19651965
return nothing

0 commit comments

Comments
 (0)