=Paper= {{Paper |id=Vol-1382/paper2 |storemode=property |title=An Application of Learning Agents to Smart Energy Domains |pdfUrl=https://ceur-ws.org/Vol-1382/paper2.pdf |volume=Vol-1382 |dblpUrl=https://dblp.org/rec/conf/woa/AmatoSV15 }} ==An Application of Learning Agents to Smart Energy Domains== https://ceur-ws.org/Vol-1382/paper2.pdf
    Proc. of the 16th Workshop “From Object to Agents” (WOA15)                                                June 17-19, Naples, Italy


   An application of learning agents to smart energy
                        domains
                                  Alba Amato, Marco Scialdone, Salvatore Venticinque
                                    Department of Industrial and Information Engineering
                                         Second University of Naples - Aversa, Italy
                             Email: {alba.amato,marco.scialdone,salvatore.venticinque}@unina2.it



   Abstract—The main requirement for building an Internet of
Things is the definition of smart objects in which it needs
to put intelligence. The pervasive deployment of smart objects
will add value to applications by capabilities of communication,
negotiation, learning and distributed reasoning. In this paper
we investigate how the paradigm shift from objects to agents
is the driver for developing these capabilities by a case study
in the context of Smart Energy application domain. In fact the
paradigm shift we are seeing in these years is to consider the
electricity network like an Internet of Energy, where each and
every electrical device and generator will be connected in a
network and able to communicate data and receive and react in
real time to events and stimuli that arrive from other devices
or from the grid: a scattered network of sensors, actuators,
communication nodes, systems control and monitoring. Here we
present the learning-based approach for power management in
smart grids providing an agent-oriented modeling of the energy
market. The main issue we focus on is a reasonable compromise
between the resolution of the consuming profile representation                     Fig. 1. Internet of Energy Overview
and the performance and real time requirements of the system.
   Index Terms—Intelligent Agents; Smart Grid; Learning
                                                                   by capabilities of communication, negotiation, learning and
                    I. INTRODUCTION                                distributed reasoning.
   The Internet of Things (IoT) aims at controlling the phys-         The rapidly growing trend of introducing computing capa-
ical world from a distance but it requires integration and         bilities into everyday objects and places allow us to investigate
collaboration of different technologies in wireless and wired      how the paradigm shifts from objects to agents is the driver
networks, heterogeneous device platforms and application-          for exploiting these capabilities by a case study in the context
specific software. The IoT refers to a globally connected,         of Smart Energy application domain.
highly dynamic and interactive network of physical and virtual        We are seeing in these years a new generation of electricity
devices [1].                                                       network, which behaves like an Internet of Energy, where each
   Similarly Object-oriented programming (OOP), is a pro-          and every electrical device and generator will be connected in
gramming paradigm based on the concept of objects, which           a network and able to communicate data and receive and react
abstracts entities in terms of status and provided services by     in real time to events and stimuli that arrive from other devices
attributes and methods. By a bottom up approach abstract           or from the grid: a scattered network of sensors, actuators,
entities (objects) are identified as parts of the system. Their    communication nodes, systems control and monitoring. In fact
properties and the interrelationships between computer pro-        the power grid today is no longer designed as a simple network
grams are designed by making them out of objects that interact     that delivers energy according to one direction: from few large
with one another.                                                  power generation to many small consumption points at the end
   Despite of these similarities OOP just breaks software and      users.
information into functional units. This programming paradigm          In particular we address the problem of exploiting the
does not deal with providing smartness to objects for enabling     increasing availability of distributed renewable energy sources
intelligent interaction models [2]. The building block of the      such as photo-voltaic (PV) panels to improve the energy
IoT is the smart object and the novelty is the pervasive           efficiency in a neighborhood.
deployment of such embedded systems connected to the                  In fact, the increasing decentralized production of green
Internet, interacting with one another. In fact smart objects      energy by photo-voltaic panels has changed the classical
are mostly fully functional on their own, but value is added       model of power supply from the grid to the households.




                                                                   11
Proc. of the 16th Workshop “From Object to Agents” (WOA15)                                                   June 17-19, Naples, Italy

Nowadays each house becomes a micro-grid connected to                     a linear combination or regression procedure that can
the network where energy producers and consumer exchange                  include several similar loads.
energy between themselves and with the grid as shown in                • Regression methods. Regression is the one of most widely
Figure 1.                                                                 used statistical techniques. For electric load forecasting
   As we all know, the electricity demand varies during the               regression methods are usually used to model the rela-
day and over the seasons. The electrical current is designed              tionship of load consumption and other factors such as
to withstand the maximum level of demand, and then in the                 weather, day type, and customer class.
absence of constant peaks turns out to be over-sized and               • Time series. Time series methods are based on the as-
underutilized.                                                            sumption that the data have an internal structure, such as
   The main challenge here is to provide intelligence to                  autocorrelation, trend, or seasonal variation. Time series
consuming and producing devices like photo-voltaic panels,                forecasting methods detect and explore such a structure.
energy storages, appliances, sensors and actuators to let them      In this paper we use a similar-load approach for short-term
collaborate in order to agree on the best schedule of energy        learning.
consumptions according to monitoring information and pre-              Our contribution, and in particular the CoSSMic project
dictions.                                                           [8], is going beyond the state of art by using a distributed
   The object oriented paradigm appears to be very useful to        negotiation among users’ devices on real power grids, that to
represent and manage this type of problem but it is not enough      the authors’ knowledge has not been implemented before. The
because we need to provide the devices with all advanced            framework will be validated on real infrastructures by trials
capabilities to collaborate as intelligent actors of the IoT.       that involve inhabitants of two different European countries
   Intelligent agents will act on behalf of devices learning        (Germany and Italy). Both software and hardware will be
energy requirements and predicting energy availability. The         integrated and customized ad hoc to be compliant with existing
energy profiles will be then used to negotiate energy exchanges     installations. In [9] we presented a Multi Agent System (MAS)
according to which the best global schedule, within a neigh-        for the deployment of producer and consumer agents that will
borhood, will be built.                                             participate in the energy distribution. We defined a virtual
   In this paper we present the learning-based approach for the     Market that supports the energy negotiation based on XMPP1
distributed energy market. The main issue we focus on is a          protocol. Agents can make calls for proposals, accept offers
reasonable compromise between the resolution of the profile         and negotiate with other agents. Additional details about how
representation and the performance and real time requirements       network of agents have been exploited in other applications
of the system. We discuss some experimental results obtained        domains are described in [10].
running a prototype implementation.                                    Load forecasting has always been important for planning
                                                                    and operational decision conducted by utility companies[7],
                   II. RELATED WORK                                 with the deregulation of the energy industries, it will be even
                                                                    more important. However it is critical to predict the evolution
   Several studies have been conducted regarding the ap-
                                                                    of the load demand because it depends on human activity and
plication of multi-agent system in the energy management
                                                                    changes over time with cycles that are daily, weekly, seasonal.
and negotiation. Paper [3] describes an application of MAS
                                                                       We focus here on a learning approach for short-term load
for management of distributed energy resources. Through
                                                                    forecasting to estimate load flows and to make decisions about
a software simulation authors demonstrate that is possible
                                                                    task scheduling. The learning approach means each consuming
to apply a distributed coordination approach to coordinate
                                                                    device behave like an adaptive, intelligent agent, gradually
distributed energy systems. In [4] and [5] a MAS, developed
                                                                    adapting to its environment, and gaining more confidence in its
in JADE, is presented for generation scheduling of a micro-
                                                                    predictions. This has the advantage that great part of the smart-
grid. The architecture provides several types of agents. For
                                                                    grid configuration is leveraged by agents. The big disadvantage
example there is the controller agent that is associated to each
                                                                    is that the agent has to learn from scratch, which means it
device that produces energy such as photo-voltaic panel or
                                                                    might take a some time before the agent can make accurate
wind turbine; load controller agent represents corresponding
                                                                    decisions.
controllable load in the system. Other several studies have been
conducted regarding modeling of the loads. Paper [6] presents                         III. T HE C O SSM IC P ROJECT
a new methodology for modeling common electrical loads.
                                                                      CoSSMic (Collaborating Smart Solar-powered Micro-grids.
Authors derive their methodology empirically by collecting
                                                                    FP7-SMART CITIES, 2013) is an ICT European project
data from a large variety of loads and showing the significant
                                                                    that aims at fostering a higher rate of self-consumption of
commonalities between them. A large variety of statistical and
                                                                    decentralised renewable energy production by innovative au-
artificial intelligence techniques have been developed for short-
                                                                    tonomic systems for the management and control of power
term load forecasting [7]. Some typical approaches are:
                                                                    micro-grids on users’ behalf. This will allow households to
  •   Similar-load approach. This approach is based on search-      optimise consumption and power sales to the network by
      ing historical data about loads to identify similar char-
      acteristics to predict the next load. The forecast can be       1 Extensible Messaging and Presence Protocol




                                                               12
    Proc. of the 16th Workshop “From Object to Agents” (WOA15)                                               June 17-19, Naples, Italy

a collaborative strategy within a neighborhood. In fact the
increasing of the decentralized production of green energy is
affecting the current energy management scheme both at the
grid and at the user level. The amount of electricity used and
the energy produced by photovoltaic systems varies over the
course of the day, from season to season and depending on
the weather conditions. On the other hand the users may not
have the opportunity to turn on their appliances when the PV is
producing because they do not know when or because they are
outside or simply because they do not need those appliances
at that time. For this reason there is not an alignment during
the time between production and consumption. At the user
level this limits both the optimal utilization of green energy
and affects the budget spent.
   The CoSSMic project proposes an intelligent scheduling                      Fig. 2. CoSSMic Platform - Components View
of user’s consumptions within a micro-grid. A micro-grid is
typically confined to a smart home or an office building, and
embeds local generation and storage of solar power, and a           schedule of local devices. In fact the allocation of energy to
number of power consuming devices. The main goal is to              devices is modeled as task schedule with energy and time
enable the collaboration among households so that the energy        constraints.
produced by the PVs is consumed by any available consumer              The algorithm to find the best scheduling of the consum-
in the neighborhood. An autonomic system will able to shift         ing appliances is designed and implemented as a distributed
the loads in each neighborhood, according to users’ constraints     negotiation among software agents.
and preferences, in order to find an optimal match between             Agents are classified according to two categories:
consumption and production during the day, so that the use             • Consumers: they buy energy for consuming devices. E.g.
of renewable energy is maximized. Appliances (refrigerators,              they will run in houses to manage objects that absorb
washing machine, drier and dishwasher, water heaters, air con-            energy: electric car, computers, ovens, washing machines,
ditioners) equipped with intelligent controllers are represented          etc.
by software agents negotiating energy exchanges according              • Producers: they can sell energy. In this category there
to availability, demand, user’s preferences and constraints.              are, for example, power generators, solar panels, wind
The energy negotiation between agents will be based on                    turbines.
rewards for local producers. To obtain the maximization of          Those devices, which are able both to produce and consume
self consumption, a predictive approach can be considered,          energy such as energy storages or electric cars, will be rep-
but we need to predict PV production based on the weather           resented by a couple of agents belonging to the two different
forecast and the parameters of the plant. Moreover the power        classes defined above.
consumed by each device must be known in advance or                    For the energy negotiation there is not a concrete market-
learned from monitoring information. Also the behaviour of          place, but a virtual market is implemented by a negotiation
consuming devices can change each day according to a number         protocol that uses P2P overlay of agents.
of parameters (e.g. the external temperature for the refrigerator      The user will define preferences and constraints about the
or the air conditioner, the user’s needs for the electric cars or   utilization of his appliances. This policy will be used by
for the oven), which are often unpredictable.                       the smart devices to find the best plan that maximize the
                                                                    energy self-consumption of the neighborhood. Besides the
       IV. OVERVIEW OF THE C O SSM IC SOLUTION                      user’s constraint and preferences each agent should know the
   Figure 2 shows the main components of our architecture           energy/power profile of its device.
playing the CoSSMic scenario. A detailed description is pro-           A requirement for producer agents is the knowledge of the
vided in [9].                                                       energy availability in the future. The prediction about how
   The Graphical User Interface (GUI) supports interactive          much energy will be produced by PV panels is computed using
control and configuration of the system. It allows to plan the      weather forecast, properties of the PV plants and historical
usage of appliances defining constraints and preferences. It        series.
also provides to the user real time monitoring information,            A requirement for the consumer agents is the knowledge
statistics on historical data and predictions.                      of the consuming profile of the managed device. Of course
   Mediator Services are used for storing and management            such a profile will depend on different parameters. In the case
of smart grid information. Mediator services are accessed by        of a washing machine the energy consumed could depend
device drivers to store measures and by agents to collect           on the operation mode, on the amount of clothes, but in the
information about energy production and consumption of the          case of an air conditioner or of a freezer the temperature is a
household. The same services are used to save data about the        relevant feature to take into account. In this case monitoring




                                                                    13
Proc. of the 16th Workshop “From Object to Agents” (WOA15)                                                    June 17-19, Naples, Italy

information will be used to learn the energy profile while the
CoSSMic platform is running.
   Devices in the home can send information about electricity
consumption through wireless interfaces (for example UHF
or Zigbee). Mobile devices (e.g. electric cars), instead, send
information through the CoSSMic Cloud. In both cases the
information, through the Mediator, reach the agent platform.
The mediator integrates also a number of device drivers, which
allow to send real time commands to electric devices in the
smart house. For example, through device drivers the mediator
APIs allow to switch on or switch off devices, when it does
not violates any constraints, in order to save energy.
                   V. P ROFILE L EARNING
  In the following subsection we focus on consuming devices.
The prediction of energy production from PV panels will use
a different approach and is out of the scope.                            Fig. 3. Cumulative energy of different runs of a washing machine

A. Energy profiles
   In CoSSMic optimization of task scheduling use device
profiles. Profiles include some meta-data and time series, i.e.
series of time value pairs, which describe the cumulative
energy consumed or produced when the device is running.
Each device may have more profiles. In fact, as we said before
dishwashers and washing machines typically have different
operation modes, and in that case there will need one device
profile for each mode.
   Static or synthetic profile can be used just for the first run.
However profiles may change run by run, therefore dynamic
profiling is needed. In CoSSMic a learning approach is used
to improve dynamically the device profile in real time. For
instance, the consumption profile of a heater depends on
the ambient temperature. Initial measurements for a certain
ambient temperature can be used for the first run. However
                                                                         Fig. 4. 3th degree polynomial representation of monitored profile
using monitoring information within the current environment
and for the current operation mode will be exploited to update
the profile dynamically and to improve the prediction for the        is below a threshold (e.g. 0.01 kW). In fact in this case
next schedule.                                                       we suppose that the washing machine is off and the run is
B. Learning model                                                    terminated. A new energy increment above the threshold will
   Before the start of the trials and until the software is not      correspond to the starting time of the next run.
available, we used monitoring information to test learning              In a second steps we clustered the different runs according
algorithm and to evaluate the proposed approach.                     to their duration and the amount of consumed energy to
   In particular during the trial the user will program the device   identify different operation modes. In Figure 3 the cumulative
by the CoSSMic interface and making the system aware about           energy consumption of different runs of a washing machine
the starting time and the operation mode on the next run. In         are shown. The time series run9 and run13 correspond to the
the following example we used raw energy time-series, which          same operation mode.
have been collected using a PG&E Landys+Gyr smart meter.                The problem is the best approximation of the profile using
   The problem here is that time-series include different work-      two or more time-series by a compact representation that does
ing modes which are different for profile and duration and it        not affect performance and real time requirements.
is necessary to identify the different runs. Another problem            In Figure 4 the blue points and the red crosses are the
is that the samples come at a different rate, according to the       samples from run9 and run13. The black line represent the
energy consumed. To identify different runs of a time series         polynomial 3rd degree polynomial curve that fits the points
of a washing machine, we split the energy time-series using a        with a minimal square root error. This representation will
supervised approach.                                                 introduce of course a residual error, but it is monotone and
   Different runs are recognized by looking at sequence of           needs only 5 float parameters to be represented (4 coefficients,
values whose variation for a certain period (e.g. 10 minutes)        duration and residual error), independently from the amount




                                                                14
    Proc. of the 16th Workshop “From Object to Agents” (WOA15)                                                   June 17-19, Naples, Italy




           Fig. 5. B-spline representation of monitored profile



raw samples.                                                                             Fig. 6. Negotiation Protocol

   In order to improve the resolution of our representation we
also considered the utilization of a b-spline. The b-spline is a         In Figure 6 a sequence diagram about the agents it is shown.
piecewise polynomial function of degree k. Polynomial curves          A consumer that wants to schedule his consuming tasks will
meet and are continuous in a number of control points. We can         execute the following steps:
control the resolution increasing the number of control points.          • Connects and login to the XMPP server to join the
   In Figure 5 the black line is a b-spline representation of               neighbourhood.
degree k=3 of the best fitting of run9 and run13. In this case           • Estimates its own need of energy.
5 control points have been fixed at regular time intervals and           • Brokers the producer that can offer the required energy
the number of float parameters to be transmitted is 27.                  • Send a proposal (SLA template)
                                                                         On the other hand, the producer will:
           VI. SLA BASED E NERGY NEGOTIATION
                                                                         • Connect and login to the XMPP server
   The main objective of a negotiation is to reach an agreement          • Wait for incoming proposals
between a vendor and a customer. A Service Level Agreement               • Evaluate the proposal accepting or not
(SLA) defines an agreement between a provider and a client               • Send the related response
in the context of a particular service provision and can be              Consumers will adopt a ranking mechanism to broker the
between two (one-to-one) or more (one-to-many or many-to-             producer to be contacted. Every consumer associates a rank
many) parties.                                                        to each producer, that is an integer that indicates the quality
   In our scenario an energy consumer and an energy producer          of the producer. Each time the producer accepts the proposal,
agree to shift the energy workloads of a device to optimise the       this number is incremented by 1. The consumer will continue
mapping between production and consumption, but within a              to call the producer which has the highest ranking.
time period defined by the earliest start time and the latest start      Each producer will try to allocate the consuming workload
time defined by the user. For this reason the emergent behavior       according to the model presented in the previous section
of whole multi agents system will implement a distributed             choosing the start time for the incoming task that satisfies
scheduler that allocates consuming and producing tasks for            the user requirements, but minimizing the use of energy from
each device within the neighbourhood.                                 grid compared to its own production profile.
   The negotiation protocol will be implemented by an overlay            The negotiation protocol is started by a consumer agent each
of agents which exchange FIPA2 messages using XMPP as                 time a new execution is planned for the handled device sending
transport layer. The XMPP server is used for authentication           a proposal. The message body of a proposal is a machine
and to support communication across firewalls. Moreover               readable SLA template.
many concepts of the XMPP protocol has been re-used (friend-             Templates used by agents for negotiation define the energy
ship, presence, multi-user chat, etc..). Alternative server-less      requirements, by the profile discussed above, including user’s
solution will be investigated in future works.                        preferences and constraints (e.g. start date, termination date,
                                                                      cost, etc.). The SLA will complement the energy requirements
  2 Foundation Intelligent Physical Agents                            with the negotiation parties and actual start time.




                                                                      15
Proc. of the 16th Workshop “From Object to Agents” (WOA15)                                                  June 17-19, Naples, Italy

   A producer can eventually withdraw an SLA if its prediction
of production change and the negotiation will be restarted by
the consumer.
   Of course the algorithm may be affected by the problem
of local minima that may bring to a not optimal employment
of available energy. The final formulation of the optimization
algorithm is not available yet, but it is related to a distributed
approach where each agent as limited knowledge of the sys-
tem. We will accept a sub-optimal solution that can be obtained
with limited processing and communication resources.

                     VII. E XPERIMENTS                               Fig. 7. Performance comparison among SPADE with embedded XMPP server
                                                                     and SPADE and JADE with OpenFire and with Tigase
   After a scouting of available technologies we evaluate
performances of SPADE and JADE agent platforms working
with different XMPP implementations.                                 although the difference with JADE on OpenFire and SPADE
   SPADE [11] is an open source agent platform written in            with its embedded server is really minimal.
Python. SPADE provides a library (SPADE Agent Library)                  Thanks to this experiment we can affirm that using empty
that is a module for the Python programming language for             messages the agent platform does not affect performance
building agents. The library contains a collection of classes,       whereas the time depends on server performance.
functions and tools for creating agents that can work with the          In the second experiment we replaced the producer agents
SPADE Agent Platform.                                                that accepted each requests without any computation overhead
   JADE is an agent platform fully implemented in Java lan-          with a new agent that makes 1.000 floating point operations
guage. It simplifies the implementation of multi-agent systems       to simulate the optimization algorithm. We have one producer
through a middle-ware that complies with the FIPA specifica-         that always accepts requests and 50 consumers.
tions. It also provides a set of graphical tools that supports the
debugging and deployment phases [12]. For communication,
SPADE is based on the XMPP technology. XMPP [13] is
an open, XML-inspired protocol for near-real-time, extensible
instant messaging (IM) and presence information. It has also
been used for publish-subscribe systems, signaling for VoIP,
video, file transfer, gaming, Internet of Things applications. An
XMPP server provides various types of services: user account
registration, authentication, channel encryption, prevention of
address spoofing, message relaying, etc. Nothing prevents to
deploy across the network servers that can route and relay
messages for workload balancing purpose. SPADE and JADE
is fully compliant with FIPA specifications. SPADE use XMPP
natively as transport protocol. We developed a plugin for JADE
to support XMPP as transport protocol for agent’s FIPA-ACL           Fig. 8. Comparison between SPADE and JADE with and without operations
messages .                                                           before response
   We experimented three different XMPP server technolo-
gies:Tigase, OpenFire and the light implementation provided             From figure 8 we noticed that in JADE the time to complete
by SPADE itself. Tigase [14] is an open source project               the experiment is greater than SPADE. Moreover, we can
providing XMPP server implementation in Java. OpenFire [15]          note that in SPADE the mean time to close a transaction
is an instant messaging and groupchat server that uses XMPP          increases slightly, but in JADE it grows faster. The reason
server written in Java and licensed under the Apache License.        is that Python outperforms Java. As the project trials will
   The testbed is one host equipped with a 2.67 GHz i5               use Raspberry Pi to host our software, our choice is SPADE.
processor, 4 GB of memory amount and Windows 7 operating             Because of the limited amount of resources required by its
system. Here we evaluate the performance running a single            XMPP server we have also decided to host on the Raspberry
consumer and a single producer that always accepts negoti-           Pi the SPADE XMPP server. Server to server connection will
ation requests. Message exchanged have an empty payload              be used for the communication between agents executing in
because the purpose is to evaluate the technology.                   different households.
   In Figure 7 the chart shows the average time to close                In the last experiment we used two RaspberryPi as testbed. It
a transaction. It is clear that with one consumer and one            hosts 10 consumers and 1 producer to simulate an household
producer, SPADE on OpenFire exhibits the best performance            with 10 passive devices and 1 solar panel. Each device is




                                                                16
     Proc. of the 16th Workshop “From Object to Agents” (WOA15)                                                                June 17-19, Naples, Italy

represented by one SPADE agent. Here we evaluate how the                     milliseconds in the case of 10 consumers and 1 producer for
resolution of the profile will affect the performance.                       each Raspberry, using a delay between requests and adopting
   Consumer agents chose randomly the producer to be con-                    a ranking protocol for brokering.
tacted only the first time whereas for the next time each
agent, using a learning mechanism, will contact the most
reliable producer. In the experiments to implement the learning
capacity we use a ranking mechanism. Each agent creates a
vector with all active producers and a ranking is associated to
each producer. The ranking is an integer initialized to zero
incremented by one each time the corresponding producer
accepts the proposal. The consumer will contact the producer
that has the maximum ranking and it will continue to contact
the same producer until a proposal is refused.
   In order to simulate a real scenario we introduce a delay
between a request and the subsequent that follows a Poisson
distribution with an interarrival of 500 ms.
   The request message from consumer is divided in two
sections: in the first one there are metadata information, in
the second one there is the energy profile.
   In listing 1 there is a message example where the meaning                              Fig. 9. Number of Requests in each time interval
of the fields is:
   • deviceID: an ID the identify univocally a device in the                    The chart in Figure 9 represents the number of simultaneous
      household;                                                             requests per producer within intervals of 10 seconds. The
   • EST: Earliest Start Time, the minimum time when the                     producers manage an average of 11 requests each 10 seconds,
      device can be started. The time is expressed using the                 more than 1 every second.
      Unix Epoch Time;                                                          It can be seen that when a producer finished the energy, all
   • LST: Latest Start Time, the maximum time when the                       the consumers move ask to the other producer. We concluded
      device can be started. The time is expressed using the                 that number of requests that the system greater that the arrival
      Unix epoch time;                                                       rate in the real case.
   • execution type: the type of execution of that particular
      device;                                                                                          VIII. C ONCLUSION
   • mode: the mode of operation of that particular device;                     This paper focused the exploitation of software agents as
   • taskID: the ID of task;                                                 the building blocks of IoT, whose main challenge is the
   • dataload: three real coefficients and a value that indicated            to design and development of application by the interaction
      the duration.                                                          of pervasive smart objects. We presented the approach and
                                                                             activities of the European Project CoSSMic that investigates
                    Listing 1. Request Message Example                       the optimization of the decentralized energy production from
{ ” metaload ” :
                                                                             photo-voltaic panels. We introduced the concept and the high
  [
      { ” d e v i c e I D ” : ” 61 ” } ,                                     level architectural. We focused on the design of smart devices
      { ”EST” : ” 62340 ” } ,                                                that collaborate to find the best schedule of consumptions
      {” execution type ” : ” s i n g l e r u n ” } ,                        by a distributed negotiation. In particular a preliminary in-
      { ”LST” : ” 80340 ” } ,                                                vestigation about the learning model to predict the energy
      { ” mode ” : ” D e l i c a t e s ” } ,
                                                                             profiles of consuming devices and performance evaluation of
      { ” t a s k I D ” : ” 29 ” } ] ,
  ” dataload ” :                                                             the negotiation prototype have been presented.
  [ ” 0 . 1 2 2 3 ” , ” 0 . 2 3 4 2 ” , ” 0 . 4 3 5 1 ” , ” 1426607214 ” ]
}                                                                                                     ACKNOWLEDGMENTS

   The real parameters represent the coefficients of a 3th                      This work has been supported by CoSSMic (Collaborating
degree polynomial curve. For lake of space we do not show                    Smart Solar powered Micro grids - FP7 SMARTCITIES 2013
the results when the raw profile is sent, but we can see that                - Project ID: 608806).
such solution is not feasible with the available resource. The
response message contains the Actual Start Time (AST) for                                                  R EFERENCES
the current run, i.e. the time when the producer can provide                  [1] L. Atzori, A. Iera, and G. Morabito, “The internet of things: A survey,”
energy.                                                                           Comput. Netw., vol. 54, no. 15, pp. 2787–2805, Oct. 2010.
                                                                              [2] L. Benedicenti, “Rethinking smart objects: building artificial intelligence
   We observed that the mean time to obtain the response                          with objects.” ACM SIGSOFT Software Engineering Notes, vol. 25,
is of about 5.3 seconds with a standard deviation of 676                          no. 3, p. 59, 2000.




                                                                             17
Proc. of the 16th Workshop “From Object to Agents” (WOA15)                        June 17-19, Naples, Italy

 [3] M. S. Narkhede, S. Chatterji, and S. Ghosh, “Multi-agent systems (mas)
     controlled smart grid a review,” IJCA Proceedings on International
     Conference on Recent Trends in Engineering and Technology 2013, vol.
     ICRTET, no. 4, pp. 12–17, May 2013.
 [4] T. Logenthiran, D. Srinivasan, A. Khambadkone, and H. Aung, “Multi-
     agent system (mas) for short-term generation scheduling of a microgrid,”
     in Sustainable Energy Technologies (ICSET), 2010 IEEE International
     Conference on, Dec 2010, pp. 1–6.
 [5] D. Srinivasan, T. Logenthiran, A. Khambadkone, and H. Aung, “Scalable
     multi-agent system (mas) for operation of a microgrid in islanded mode,”
     in Power Electronics, Drives and Energy Systems (PEDES) 2010 Power
     India, 2010 Joint International Conference on, Dec 2010, pp. 1–6.
 [6] S. K. Barker, S. Kalra, D. E. Irwin, and P. J. Shenoy, “Empirical
     characterization and modeling of electrical loads in smart homes,” in
     International Green Computing Conference, IGCC 2013, Arlington, VA,
     USA, June 27-29, 2013, Proceedings, 2013, pp. 1–10.
 [7] E. Feinberg and D. Genethliou, “Load forecasting,” in Applied Mathe-
     matics for Restructured Electric Power Systems, ser. Power Electronics
     and Power Systems, J. Chow, F. Wu, and J. Momoh, Eds. Springer
     US, 2005, pp. 269–285.
 [8] A. Amato, R. Aversa, B. Di Martino, M. Scialdone, S. Venticinque,
     S. Hallsteinsen, and G. Horn, “Software agents for collaborating smart
     solar-powered micro-grids,” in Smart Organizations and Smart Artifacts,
     ser. Lecture Notes in Information Systems and Organisation, L. Capo-
     rarello, B. Di Martino, and M. Martinez, Eds. Springer International
     Publishing, 2014, vol. 7, pp. 125–133.
 [9] A. Amato, B. Di Martino, M. Scialdone, S. Venticinque, S. O. Hallstein-
     sen, and S. Jiang, “A distributed system for smart energy negotiation,” in
     Internet and Distributed Computing Systems - 7th International Confer-
     ence, IDCS 2014, Calabria, Italy, September 22-24, 2014. Proceedings,
     2014, pp. 422–434.
[10] A. Amato, B. Di Martino, and S. Venticinque, “Semantically augmented
     exploitation of pervasive environments by intelligent agents,” in ISPA.
     IEEE, 2012, pp. 807–814.
[11] M. E. Gregori, J. P. Cámara, and G. A. Bada, “A jabber-based multi-
     agent system platform,” in Proceedings of the Fifth International Joint
     Conference on Autonomous Agents and Multiagent Systems, ser. AA-
     MAS ’06. New York, NY, USA: ACM, 2006, pp. 1282–1284.
[12] F. Bellifemine, G. Caire, A. Poggi, and G. Rimassa, “Jade: a software
     framework for developing multi-agent applications. lessons learned,”
     Information and Software Technology Journal, vol. 50, pp. 10–21, 2008.
[13] P. Saint-Andre, “Extensible messaging and presence protocol (XMPP):
     Core,” Internet Engineering Task Force (IETF), Tech. Rep., 2011.
[14] T. Inc., “Tigase XMPP server,” http://projects.tigase.org/projects/tigase-
     server.
[15] I.         Realtime,           “OpenFire          XMPP            server,”
     http://www.igniterealtime.org/projects/openfire/.




                                                                            18