smartgrid.observation¶
This package handles the Observations, which are information that the agent knows about its environment. Observations are used by agents to assume in which state they are, and, based on this, to decide which action should be taken.
In this Smart Grid environment, an Observation is a dataclass of several measures that are split into:
local observations that are individual for each agent ;
global observations that are common to all agents.
For example, the hour or equity of comforts are the same for all agents, and can be shared: thus, they are deemed global observations.
On the other hand, the current amount of energy available in one’s personal battery, or one’s current payoff, are individual measures: two agents may very well have different observations for these measures. In addition, these observations are local, which means that other agents cannot access them. An agent only receives its own local observations, plus the global observations that are shared by everyone.
The rationale behind this separation is that agents represent prosumers. If this simulator was deployed in the real world, they would assist human users by taking actions automatically for them, similarly to a domotic, or home automation, system. There is therefore a privacy concern: we would certainly not want our neighbour’s agent to know our individual observations, such as our payoff.
The ObservationManager
is responsible for computing both the
LocalObservation
from a single Agent
, and the
GlobalObservation
from the World
.
They are then merged into Observation
, which is sent to the
agents.
Note
Observation
contains both local and global values:
they are all merged into a single dataclass.
Algorithms that require a distinction should therefore get the original
global and local observation dataclasses through the
Observation.get_global_observation()
and
Observation.get_local_observation()
methods instead.
- members:
Modules
Base classes to simplify definition of Observations. |
|
Global observations of the World, shared by all Agents in the smart grid. |
|
Observations that are local (individual) to a single Agent. |
|
The ObservationManager is responsible for computing observations. |