automata4cps.cps.CPS

class automata4cps.cps.CPS(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

A collection of components

Type:

OrderedDict

parent_system

Parent CPS that this (sub) system belongs to

Type:

CPS

__init__(id, components)
Parameters:
  • id (str) – ID of the system

  • components (iterable) – Child components of the system

Methods

__init__(id, components)

get_all_components([exclude])

Returns a list of all child components (not only direct) except those with ids possibly provided in exclude.

get_choice_state(comp)

get_component(name)

get_components([exclude])

Returns a list of all direct child components except those with ids possibly provided in exclude.

get_execution_data([flat])

set_child_component(id, com)

Set component with the id.

stop_condition(t)

Simulation stop condition which can be overridden by the subclasses.

Attributes

overall_system

state