symaware.base.data package

Submodules

symaware.base.data.data_structures module

class symaware.base.data.data_structures.AwarenessVector(ID, current_state, intent={}, risk={}, uncertainty={})[source]

Bases: object

Class used to store state,id,intent,discrete modes of an agent and its neighbours.

Note

An agent has basically an opinion on its awareness vector and its neighbours state

Parameters:
  • ID (int) – id of the agent

  • current_state (ndarray) – current continuous state of the agent expressed as a numpy array

  • intent (TimeSeries, default: {}) – intent vector. Should be updated by the controller

  • risk (TimeSeries, default: {}) – risk evaluation vector. Should be updated by the risk estimator

  • uncertainty (TimeSeries, default: {}) – uncertainty evaluation vector. Should be updated by the uncertainty estimator

property ID: int
copy()[source]
Return type:

AwarenessVector

property intent: TimeSeries
property risk: TimeSeries
property state: ndarray
property state_dim: int
property uncertainty: TimeSeries
class symaware.base.data.data_structures.InfoMessage(sender_id, receiver_id, awareness_database, knowledge_database)[source]

Bases: Message

Simple class to store messages between agents that share their awareness vector.

Parameters:
  • sender_id (int) – id of the sender agent

  • receiver_id (int) – id of the receiver agent

  • awareness_vector – awareness_vector communicated by the sender to the receiver

awareness_database: dict[int, AwarenessVector]
knowledge_database: dict[int, TypeVar(T, bound= KnowledgeDatabase)]
class symaware.base.data.data_structures.KnowledgeDatabase[source]

Bases: TypedDict

Simple dictionary to store knowledge about the system. It is highly recommended to use TypedDict to enforce the structure of the knowledge database.

class symaware.base.data.data_structures.Message(sender_id, receiver_id)[source]

Bases: object

Simple class to store messages between agents.

Parameters:
  • sender_id (int) – id of the sender agent

  • receiver_id (int) – id of the receiver agent

receiver_id: int
sender_id: int
class symaware.base.data.data_structures.Observation(observed_object_id)[source]

Bases: object

help class for an observation

Parameters:

observed_object_id (int) – id of the agent that is the subject of the observation

observed_object_id: int
class symaware.base.data.data_structures.StateObservation(observed_object_id, state)[source]

Bases: Observation

help class for an observation

Parameters:
  • observed_object_id (int) – id of the agent that is the subject of the observation

  • state (ndarray) – state of the observed agent

state: ndarray
class symaware.base.data.data_structures.TimeSeries(iterable=None)[source]

Bases: dict

Simple call to store timed numpy array. It is a dictionary that you can look up for the current time and get the corresponding numpy array.

Note

Consistency of the array is not check for now

Parameters:

iterable (dict | None, default: None) – dictionary used to initialize the instance

symaware.base.data.types module

class symaware.base.data.types.SymawareConfig[source]

Bases: TypedDict

agent: tuple[Agent] | list[Agent]
awareness_vector: tuple[MultiAgentAwarenessVector] | list[MultiAgentAwarenessVector]
communication_receiver: tuple[CommunicationReceiver] | list[CommunicationReceiver]
communication_sender: tuple[CommunicationSender] | list[CommunicationSender]
controller: tuple[Controller] | list[Controller]
environment: Environment
knowledge_database: tuple[MultiAgentKnowledgeDatabase] | list[MultiAgentKnowledgeDatabase]
perception_system: tuple[PerceptionSystem] | list[PerceptionSystem]
risk_estimator: tuple[RiskEstimator] | list[RiskEstimator]
uncertainty_estimator: tuple[UncertaintyEstimator] | list[UncertaintyEstimator]

Module contents