automata4cps.cps.CPS¶
- class automata4cps.cps.CPS(sys_id, components)¶
CPS class represents a cyber-physical system. It is used to model the hierarchy in the system as each CPS can contain a mixture of other CPS and CPS components. The leaves of the hierarchy are only CPS component objects which define their dynamics and communication with other components.
- id¶
Identifier of the object.
- Type:
str
- com¶
Property. A collection of components.
- Type:
OrderedDict
- __init__(sys_id, components)¶
Initializes CPS with the given attributes.
- Parameters:
sys_id (str) – ID of the system.
components (iterable) – Child components of the system.
Methods
__init__
(sys_id, components)Initializes CPS with the given attributes.
get_all_components
([exclude])Returns a list of all child components (not only direct) except those with ids possibly provided in exclude.
get_component
(name)get_component_by_full_id
(full_id)get_components
([exclude])Returns a list of all direct child components except those with ids possibly provided in exclude.
get_execution_data
([flat])items
()reinitialize
([t, state])The function re-initializes the CPS components of this CPS with the given state values.
set_child_component
(id, com)Set component with the id.
simulate
(finish_time[, verbose, save_choices])Simulates behaviour of the system until the finish_time is reached.
Attributes
overall_system
Gets the parent system by accessing _parent_system private attribute.
state