smartgrid.agents.profile.comfort

Comfort functions determine the comfort of an agent from its consumption and need.

Each step of the simulation, an Agent has a need in terms of energy to consume. When taking an Action, Agents decide how much to consume (from the smart grid and their personal battery), to satisfy their need. The degree to which this need is satisfied is called the comfort.

We recall that Agents’ comforts are used in the GlobalObservation as part of the equity measure, and in some reward functions (see smartgrid.rewards for details). Intuitively, agents should have a similar comfort to increase the equity.

To increase variety in the society, we propose that different comfort functions may be used by different Agents. This allows controlling the effective comfort of an Agent, based on its consumption and need.

For example, a simple function may return a comfort that linearly increase with the ratio consumption / need. Another function could have a different slope, returning a very low comfort most of the time: for the same ratio of consumption w.r.t. need, the 2nd function will return a lower comfort than the 1st. Assuming that a reward function relying on equity is used, Agents will try to achieve similar comforts. This means that an Agent using the 2nd function would need a higher consumption to obtain the same comfort as an Agent using the 1st function.

Thus, comfort functions can be used to differentiate Agents, and define some sort of “priority” among them. Important buildings, such as Schools or Hospitals, can use a comfort function that return lower comforts to ensure their priority on energy consumption. Comfort functions may also differentiate Agents of the same type, e.g., different Households where the inhabitants have different consumption habits, preferences, etc.

We implement several comfort functions in this module; the simulator can be extended to use other functions very easily, by implementing a new function and providing it to the AgentProfile. The only requirement is the signature: comfort functions take as input the consumption and the need, and return the comfort (all floats). However, please note that, whereas consumption and need are unbounded (i.e., they can be any possible value in the real space), the comfort must be in [0,1].

Note

The following comfort functions are implemented using Generalized logistic curves (similar to sigmoids), as they elegantly solve this requirement. In particular, they ensure that, even when consumption > need, the resulting comfort will be capped at 1. They are also highly parameterizable. Yet, other comfort functions can use a different formula: this is not a requirement.

See the following image for a graphical representation of the resulting comfort w.r.t. the consumption and need, for each of the implemented functions.

(Source code, png, hires.png, pdf)

../_images/smartgrid-agents-profile-comfort-1.png
members:

Functions

flexible_comfort_profile(consumption, need)

Flexible comfort function: easy to satisfy.

neutral_comfort_profile(consumption, need)

Neutral comfort function.

richard_curve(x[, a, k, b, v, q, c, m])

Richard's Curve or Generalised logistic function.

strict_comfort_profile(consumption, need)

Strict comfort function: difficult to satisfy.