cosapp.utils.state_io¶
Functions
|
Export system state (inputs and outputs) into a dictionary for quick serialization, without type check. |
|
Import system state (inputs and outputs) from a dictionary generated by get_state. |
- cosapp.utils.state_io.get_state(system: System)[source]¶
Export system state (inputs and outputs) into a dictionary for quick serialization, without type check.
Returns:¶
Recursive dictionary of the kind: {
- ‘ports: {
- port_name: {
varname: value, …
}, ‘children’: {
- child_name: {
‘ports’: {…}, ‘children: {…},
},
}
- cosapp.utils.state_io.object__getstate__(self, /)¶
Helper for pickle.