Skip to content

Commit 668bffa

Browse files
committed
Show separate Observed: category instead of mashing it in Equations:
1 parent f575351 commit 668bffa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/systems/abstractsystem.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,12 +1927,10 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem; hint = t
19271927
if eqs isa AbstractArray && eltype(eqs) <: Equation
19281928
neqs = count(eq -> !(eq.lhs isa Connection), eqs)
19291929
next = n_expanded_connection_equations(sys)
1930-
nobs = has_observed(sys) ? length(observed(sys)) : 0
1931-
ntot = neqs + next + nobs
1930+
ntot = neqs + next
19321931
ntot > 0 && printstyled(io, "\nEquations ($ntot):"; bold)
19331932
neqs > 0 && print(io, "\n $neqs standard", hint ? ": see equations(sys)" : "")
19341933
next > 0 && print(io, "\n $next connecting", hint ? ": see equations(expand_connections(sys))" : "")
1935-
nobs > 0 && print(io, "\n $nobs observed", hint ? ": see observed(sys)" : "")
19361934
#Base.print_matrix(io, eqs) # usually too long and not useful to print all equations
19371935
end
19381936

@@ -1969,6 +1967,11 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem; hint = t
19691967
limited && printstyled(io, "\n") # too many variables to print
19701968
end
19711969

1970+
# Print observed
1971+
nobs = has_observed(sys) ? length(observed(sys)) : 0
1972+
nobs > 0 && printstyled(io, "\nObserved ($nobs):"; bold)
1973+
nobs > 0 && hint && print(io, " see observed(sys)")
1974+
19721975
return nothing
19731976
end
19741977

0 commit comments

Comments
 (0)