Various Exercises

Exercise 2: Collaboration of managers

The goal of this exercise is to enhance the management of energy by configuring each managers depending on the cost of energy per hours. This requires the collaboration of managers and can be done two ways:

  • hierarchically: you will use a central manager responsible for configuring the other managers and synchronizing their goals.
  • distributively: the managers will exchange some information to adapt their behaviors.

Hierarchical approach

Question 1 – Cost of energy: Build an external service “EnergyCost” that provides the cost of energy in euros for 1 Watts/hours. Try to use realistic values: generally the cost of energy depends on the moment of the day and the period of year.

Question 2 – Amount of available energy: Based on the cost of energy, build an an autonomic manager (let’s call it the general/top/platform manager) that will be able to estimate the cost of the current consumption of energy.

Then the manager should configure the different sub-managers (light/hvac/simulation/alarm managers) so that the global consumption does not exceed a given amount of energy (in watts / hour). This requires determining the amount of energy granted to each subsystem.

The balance between subsystem (temperature vs light) has to be found and could be, for instance, based on priority. The administrator should be able to configure which subsystem has priority in case the amount of overall energy set does not allow to meet the objectives of the subsystems (e.g., in terms of temperature or illumination).In a more advanced implementation, the priority between subsystems should evolve depending on the condition of use and the period of day/year (e.g., day/night or summer/winter).

The manager must provide command line interface or GUI to configure the energy preferences. The preferences should be expressed in term of high-level goals (e.g., HIGH, MEDIUM, LOW) instead of precise value. These values should depend on the moment of the year/day and the cost of energy.

Question 3 – Targeted price: Change your implementation to:

  • provide a prediction of the energy consumption (and cost) based on the previous use (day/month).
  • allow the configuration of a targeted price for a given period. The cost of consumed energy should not exceed (or should be closed to) the targeted value. Depending on the period (day/month), you will probably have to use prediction to be able to configure the targeted energy of each applications.

Distributed approach

Based on what you have developed, try to propose a different architecture where the top-manager is no more necessary and where the different managers are able to take the cost of energy into accounts. This may involve collaboration between managers to determine which subsystem takes precedence over another.