@@ -1910,15 +1910,16 @@ function Base.show(
1910
1910
1911
1911
# Print name and description
1912
1912
desc = description (sys)
1913
- printstyled (io, " Model " , nameof (sys), " :" ; bold)
1913
+ name = nameof (sys)
1914
+ printstyled (io, " Model " , name, " :" ; bold)
1914
1915
! isempty (desc) && print (io, " " , desc)
1915
1916
1916
1917
# Print subsystems
1917
1918
subs = get_systems (sys)
1918
1919
nsubs = length (subs)
1919
1920
nrows = min (nsubs, limit ? rows : nsubs)
1920
1921
nrows > 0 && printstyled (io, " \n Subsystems ($(nsubs) ):" ; bold)
1921
- nrows > 0 && hint && print (io, " see hierarchy(sys )" )
1922
+ nrows > 0 && hint && print (io, " see hierarchy($name )" )
1922
1923
for i in 1 : nrows
1923
1924
sub = subs[i]
1924
1925
name = String (nameof (sub))
@@ -1942,9 +1943,9 @@ function Base.show(
1942
1943
next = n_expanded_connection_equations (sys)
1943
1944
ntot = neqs + next
1944
1945
ntot > 0 && printstyled (io, " \n Equations ($ntot ):" ; bold)
1945
- neqs > 0 && print (io, " \n $neqs standard" , hint ? " : see equations(sys )" : " " )
1946
+ neqs > 0 && print (io, " \n $neqs standard" , hint ? " : see equations($name )" : " " )
1946
1947
next > 0 && print (io, " \n $next connecting" ,
1947
- hint ? " : see equations(expand_connections(sys ))" : " " )
1948
+ hint ? " : see equations(expand_connections($name ))" : " " )
1948
1949
# Base.print_matrix(io, eqs) # usually too long and not useful to print all equations
1949
1950
end
1950
1951
@@ -1955,7 +1956,7 @@ function Base.show(
1955
1956
nvars == 0 && continue # skip
1956
1957
header = titlecase (String (nameof (varfunc))) # e.g. "Unknowns"
1957
1958
printstyled (io, " \n $header ($nvars ):" ; bold)
1958
- hint && print (io, " see $(nameof (varfunc)) (sys )" )
1959
+ hint && print (io, " see $(nameof (varfunc)) ($name )" )
1959
1960
nrows = min (nvars, limit ? rows : nvars)
1960
1961
defs = has_defaults (sys) ? defaults (sys) : nothing
1961
1962
for i in 1 : nrows
@@ -1984,7 +1985,7 @@ function Base.show(
1984
1985
# Print observed
1985
1986
nobs = has_observed (sys) ? length (observed (sys)) : 0
1986
1987
nobs > 0 && printstyled (io, " \n Observed ($nobs ):" ; bold)
1987
- nobs > 0 && hint && print (io, " see observed(sys )" )
1988
+ nobs > 0 && hint && print (io, " see observed($name )" )
1988
1989
1989
1990
return nothing
1990
1991
end
0 commit comments