@@ -296,12 +296,12 @@ function _get_initial_observed(cf)
296
296
end
297
297
298
298
"""
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)
300
300
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
302
302
contains parameters and observed.
303
303
304
- See also: [`get_initial_state`](@ref).
304
+ See also: [`get_initial_state`](@ref) and [`dump_state`](@ref) .
305
305
"""
306
306
dump_initial_state (cf:: ComponentModel ; kwargs... ) = dump_initial_state (stdout , cf; kwargs... )
307
307
function dump_initial_state (io, cf:: ComponentModel ; sigdigits= 5 , p= true , obs= true )
@@ -408,7 +408,20 @@ function _printlines(io, aligned, range; newline=true)
408
408
end
409
409
end
410
410
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... )
412
425
function dump_state (io, sol, t, idx; sigdigits= 3 )
413
426
cf = extract_nw (sol)[idx]
414
427
_sym = sort (sym (cf))
0 commit comments