@@ -296,12 +296,12 @@ function _get_initial_observed(cf)
296296end
297297
298298"""
299- dump_initial_state(cf::ComponentModel; sigdigits=5, p=true, obs=true)
299+ dump_initial_state([IO=stdout], cf::ComponentModel; sigdigits=5, p=true, obs=true)
300300
301- Prints the initial state of the component model `cf` to the console . Optionally
301+ Prints the initial state of the component model `cf` to `IO` (defaults to stdout) . Optionally
302302contains parameters and observed.
303303
304- See also: [`get_initial_state`](@ref).
304+ See also: [`get_initial_state`](@ref) and [`dump_state`](@ref) .
305305"""
306306dump_initial_state (cf:: ComponentModel ; kwargs... ) = dump_initial_state (stdout , cf; kwargs... )
307307function dump_initial_state (io, cf:: ComponentModel ; sigdigits= 5 , p= true , obs= true )
@@ -408,7 +408,20 @@ function _printlines(io, aligned, range; newline=true)
408408 end
409409end
410410
411- dump_state (sol, idx, t; kwargs... ) = dump_state (stdout , sol, idx, t; kwargs... )
411+ """
412+ dump_state([IO=stdout], sol, t, idx; sigdigits=5)
413+
414+ Takes a Network solution `sol` and prints the state at `t` as well as the initial
415+ state of the specified component model to `IO` (defaults to `stdout`).
416+
417+ `idx` musst a valid component index, i.e. `VIndex` or `EIndex` without symbol specification.
418+
419+ dump_state(sol, 1.0, VIndex(4))
420+ dump_state(sol, 1.0, EIndex(2))
421+
422+ See also: [`dump_initial_state`](@ref).
423+ """
424+ dump_state (sol, t, idx; kwargs... ) = dump_state (stdout , sol, t, idx; kwargs... )
412425function dump_state (io, sol, t, idx; sigdigits= 3 )
413426 cf = extract_nw (sol)[idx]
414427 _sym = sort (sym (cf))
0 commit comments