smartgrid.util.available_energy¶
This module defines classes to generate an amount of available energy.
Each step, the World
“produces” a certain amount of energy, which
is made available to the Agent
s. To adapt to various sizes of
environments(i.e., number of Agents), generators are given access to the
total need of all Agents in the World. This allows adapting to any number
of agents, and any AgentProfile
s.
Note that this total need can be ignored, leading to a generator which
ignores the number of Agents.
Several generators are implemented in this module, using various methods:
a random percent based on the agents’ needs, for example an amount between 80% and 120% of their total need.
a scarcity variation, similar to the 1st one but with a random between 60% and 80%.
a generous variation, similar to the 1st one but with a random between 100% and 120%.
a realistic variation, using real data.
All these methods lead to different bounds for the amount of available energy.
Knowing these bounds, and especially the upper one (we can assume 0 for
the lower bound), allows us to scale the amount of available energy to [0,1]
when computing Observation
s.
Therefore, instead of using a simple function to generate this amount, we use a class that defines 2 functions, one for generating the amount, and the other to return the bounds.
- members:
Classes
An EnergyGenerator is responsible for the production of energy each step. |
|
Similar to the |
|
|
Generate a random amount, with respect to the agents' current energy needed. |
|
A realistic generator that generates energy based on real-world data. |
Similar to the |