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