<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Metamodel of a Multi-Paradigm Approach to Smart Cyber-Physical Systems Development</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Massimo Cossentino</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Salvatore Lopes</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovanni Renda</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Luca Sabatucci</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Flavia Zaffora</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Research Council ICAR Institute</institution>
          ,
          <addr-line>Palermo</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>35</fpage>
      <lpage>41</lpage>
      <abstract>
        <p>-This paper illustrates an approach to the development of a shipboard power system reconfiguration as a Smart cyber-physical system (CPS). It is developed by representing it through a meta-model, providing a multi-paradigm approach that exploits the best features of three available frameworks, Jade, Jason and Akka. The resulting developing framework allows the creation of a new composite entity (labelled H-Entity) that exploits the advantages of Jade, Jason and Akka. Index Terms-CPS, smart, meta-model, multi-paradigm</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>The CPS application fields are nowadays several in all
the domains of human activities. Here the paradigm of CPS
is presented with the added quality of smartness, trying to
find a flexible solution integrating heterogeneous technologies
to easily communicate, although formerly not thought to
cooperate at all. The specific case study is the Shipboard Power
System (SPS) reconfiguration, where the use of a smart CPS is
particularly compelling. The proposed solution to the problem
adopts a multi-paradigm approach, where the selected
requirements of adaptivity, proactivity, reactivity and smartness led to
the consideration of different paradigm frameworks, especially
referring to Agents and Actors entities. Among the available
frameworks, three of the most representative, Jason, Jade and
Akka, have been examined. Thus, this approach allowed to use
each paradigm’s strength points for the most suitable task. The
resulting developing framework is proposed in the form of a
meta-model, representing the composition of the so-called
HEntity, the core element of the meta-model. It constitutes the
central reasoning of the proposal, gathering in itself different
entities finally able to exchange information. In the end, an
appendix with the definition of all meta-model elements is
provided.</p>
    </sec>
    <sec id="sec-2">
      <title>II. THEORETICAL BACKGROUND</title>
      <p>Before entering the proposal of a smart CPS development,
it is better to briefly introduce what a CPS is, which are the
principal domain applications, and what kind of frameworks
can be taken into account. Thus, a short presentation of CPS,
Ptolemy, Jade, Jason and Akka is following.</p>
      <sec id="sec-2-1">
        <title>A. Cyber-Physical System (CPS)</title>
        <p>
          A Cyber-Physical System (CPS) is a new generation of
systems integrating the physical processes with those of the
digital systems [
          <xref ref-type="bibr" rid="ref1 ref5">1</xref>
          ], [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. In CPS, components are usually
distributed over a network. The term ‘cyber-physical’ was born
around 2006 at the National Science Foundation (NSF) in the
United States. This Foundation supports the collaboration of
cyber and physical components with the objective to extend the
capabilities of the physical layer. The join between the cyber
and the physical will create new applications [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]–[
          <xref ref-type="bibr" rid="ref7">6</xref>
          ]: industry
4.0, biomedical/healthcare systems, next-gen transportation
systems, smart grid and renewable energy.
        </p>
        <p>
          Since their very start in early 2000, the research and
applications on this field increasingly evolved influencing several
human activities [
          <xref ref-type="bibr" rid="ref1 ref5">1</xref>
          ]. Whereas a CPS is by nature adaptive
and predictive [
          <xref ref-type="bibr" rid="ref8">7</xref>
          ], adding the word smart means to define
it with a specific quality of intelligence that the CPS does
not necessarily require. Nevertheless, the smartness of a CPS
lies in the property of the reasoning, and in the ability
of communication and knowledge-sharing among dissimilar
components to take run-time decisions.
        </p>
        <p>Current approaches to the development of smart CPSs
encompass several alternative frameworks. Some selected are
illustrated in the following.</p>
      </sec>
      <sec id="sec-2-2">
        <title>B. Ptolemy II</title>
        <p>
          Ptolemy II was born around 1996, successor to Ptolemy
Classic. It is a framework of Java-based components with
a graphical user interface called Vergil. As described from
the developer [
          <xref ref-type="bibr" rid="ref9">8</xref>
          ], “the Ptolemy project studies the modelling,
simulation and design of simultaneous embedded systems in
real time.” Its central core consists in the possibility to
assemble concurrent components, using well-defined computational
models governing the components interactions. A further
development of the issue is to mix different computational
models for the purpose.
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>C. Jade</title>
        <p>
          JADE (Java Agent DEvelopment framework), is an
Agentoriented middleware [
          <xref ref-type="bibr" rid="ref10">9</xref>
          ]. It is compliant to FIPA standards,
implementing the Agent Management specification and the
FIPA Agent Communication stack [
          <xref ref-type="bibr" rid="ref11">10</xref>
          ]. It allows to realize a
distributed system, whose agents are autonomous and
proactive [
          <xref ref-type="bibr" rid="ref12">11</xref>
          ]. It supports ontologies and content languages and it
holds an interaction protocols library [
          <xref ref-type="bibr" rid="ref11">10</xref>
          ].
        </p>
        <p>
          Jason is a framework implementing the AgentSpeak
language [
          <xref ref-type="bibr" rid="ref13">12</xref>
          ]. It is agent-oriented, and it uses a Java-based
platform. As coming from AgentSpeak, it is inspired by the
philosophical belief-desire-intention (BDI) model, that gives
to it a human-like “reasoning”: thus, Agents acquire a kind of
intentionality. They are autonomous, proactive, reactive and
they show a social ability, so that they are able to coordinate
and cooperate. In the framework JaCaMo, the organization
of autonomous BDI agents, programmed in Jason, is defined
by the Moise framework, and the Agents work in a shared
artifact-based environment, programmed in Cartago [
          <xref ref-type="bibr" rid="ref14">13</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-4">
        <title>E. Akka</title>
        <p>
          Akka is a Java-based framework, containing libraries
implemented by the Scala programming language [
          <xref ref-type="bibr" rid="ref15">14</xref>
          ], and whose
main entity is an Actor. It presents a robust hierarchical
structure, made by actors linked each other by a parent-sons
strategy. Akka Actors interact by exchanging asynchronous
messages.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>III. THE APPROACH</title>
      <p>Smart CPS may be applied in many different contexts:
this section will discuss our specific domain of interest, the
reconfiguration of shipboard power systems, and an analysis of
the approach adopted for developing the proposed framework.
A. The context: smart CPS for Shipboard Power Systems
(SPS)</p>
      <p>
        The here-described application context is specifically
referred to the use of a CPS for the reconfiguration of Shipboard
Power Systems (SPS). An SPS is responsible for vessels power
supply, and it governs all the aspects of the electrical system
onboard. About the state of the art of the reconfiguration
methods, a study has been led [
        <xref ref-type="bibr" rid="ref16">15</xref>
        ], and it generated a
reflection about the possible use of a smart CPS encountering
the requirements this problem would ask for. The case of SPS
is particularly relevant because it is an enclosed environment
that, in scale, could represent any other application field
where the need to make different technologies cooperate is
compelling and fruitful to improve the efficiency of the entire
system itself. It allows the experimentation on the interaction
between the cyber-physical system and human control, for
its adaptation after one or several changes occurred. Notably,
the implementation and improvement of reconfiguration
procedures acting on both the physical (the electrical one) and the
cybernetic system (the software side of the problem) imply the
challenge to face the occurring faults with a real-time response.
Here a general SPS reconfiguration scenario is depicted. The
Captain sets the ship’s Mission through an Interface, that
communicates with the SPSManager and can lay out a change
of the Mission. So the SPSManager sets the load priorities
(distinguishing vital, semi-vital and non-vital loads in the
specific case) and finds a reconfiguration plan responding
to the electrical failure perceived and communicated by the
sensors through the SensorActor. The solution found has
to be validated by the SPSPlanValidator, and the resources
must be negotiated with other requirements through the SPS
Representative. Now the Captain can decide if approving or
not the solution and, if yes, the SPSManager can apply it
through the enactor, set by the crew and directly acting on the
switches that physically turn off the selected circuits.
By showing this exemplified situation, the smartness is
especially required for the central role that the Manager plays
and for the need to set run-time plans after deciding the load
priorities.
      </p>
      <sec id="sec-3-1">
        <title>B. The requirements</title>
        <p>
          The general requirements a CPS should fulfill lie in a
wide domain, that in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] is richly exposed. All of these are
strictly interrelated each other and the underlying need is the
security the system should assure in dealing with trustiness
and reliability of its physical and digital components and with
the run-time interaction with the real world. Looking closer to
the present case, the CPS here developed for a SPS should:
be smart, i.e. the system should show a reasoning aptitude
(agent-oriented paradigm); be adaptive, that means the system
can efficiently adapt to environmental changes; be predictive,
i.e. it can foresee changes in its behavior for possible changes
in the context; be distributed: the system is heterogeneous and
its parts are located in different places so it is able to maintain
the connection; face realtime event, so the system is able to
promptly react to changes; provide feedback loop, thus it can
react to unexpected changes by monitoring itself and adjusting
its behavior.
        </p>
        <p>C. The proposed approach: a multi-paradigm strategy</p>
        <p>
          A cyber-physical system is heterogeneous by definition,
even just for it couples digital elements with physical ones.
The purpose here exposed is to develop a smart cyber-physical
system respecting some requirements especially involving
the information exchange among heterogeneous systems, an
ability we can refer to as interoperability [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. Therefore,
interoperability could determine a sort of translation among
elements, languages, frameworks originally independent,
acting on the communication-side of a CPS. A smart CPS uses
specific frameworks involving some reasoning, and the need
for communication has to include a social aspect along with
an aptitude to adaptation. These elements explicitly belong to
agent-oriented languages, while the necessity of scaling and
feedback loop requires to adopt an actor-based language. Thus,
at first a selection and a comparison of three agent and
actorbased frameworks was done, trying to understand which of
them could be more suitable to the purpose. Dealing with the
above-mentioned SPS scenario, with the constraint of using
different available technologies (the CPS challenge), meant
having a multi-paradigm approach.
        </p>
        <p>
          The term multi-paradigm refers to a domain dealing with
complex heterogeneity of models [
          <xref ref-type="bibr" rid="ref17">16</xref>
          ]. The Multi-Paradigm
Modeling, MPM, comes to solve the contemporary use of different
paradigms characterized for not sharing the same language.
        </p>
        <p>
          The more heterogeneous is the relationship the harder is the
issue to address. The problem here exposed couples different
paradigms with different underlying languages. Jade, Jason
and Akka have been taken into account [
          <xref ref-type="bibr" rid="ref12">11</xref>
          ], highlighting
their common points and their peculiarities. Although they are
all Java-based, their differences are several, and they descend
from the concepts behind their main entity, the Agent for
Jade and Jason, the Actor for Akka. Moreover, Jade’s Agents
respect FIPA standards, whereas Jason’s are based on a BDI
model. In the following lines, their distinguishing traits will
be summarized.
        </p>
        <p>• Jason’s reasoning</p>
        <p>
          Basing on a BDI (belief-desire-intention) model, Jason’s
Agent shows a decision-making ability that can be called
reasoning [
          <xref ref-type="bibr" rid="ref13">12</xref>
          ]. Human-like, it expresses by a sequence
of tasks making a plan that is acted to pursue a goal,
with the qualities of autonomy, reactivity, proactivity and
social ability. With special regards to the last one, the
communication among Agents is an actual action [
          <xref ref-type="bibr" rid="ref13">12</xref>
          ],
that has a Propositional Content and a Performative (e.
g. a request).
• Jade’s communication protocols
        </p>
        <p>
          In Jade the interaction between distributed Agents is
particularly stressed. As fully adhering to FIPA, the
Agent is proactive, so it can react to a state change
and decide to pursue a goal [
          <xref ref-type="bibr" rid="ref12">11</xref>
          ]. Developing with Jade
means using the object-oriented paradigm with specific
aptitude to finite state-machine and interoperability due
to protocols-oriented communications, to ontologies and
to full support for FIPA specifications.
• Akka’s hierarchy
        </p>
        <p>
          The peculiar structure of Akka lies in the father-sons
hierarchy of the entities. [
          <xref ref-type="bibr" rid="ref15">14</xref>
          ]. Developing a reactive
system on Akka means reasoning in terms of parallel,
asynchronously communicating processing (the actors),
and enfatizing aspects such as efficiency, distribution,
scalability and failures control. Unlike Jason and Jade,
Akka features allow a safe approach for implementing
highly scalable and performant functions; moreover Akka
Stream provides a capability of internal coordination to
implement pre-defined workflows.
        </p>
        <p>For the above-mentioned aim, it resulted that none of them
can be substituted without losing something, so instead of
settle with just one, the new objective was to choose all of
them, basically using each strength points, i.e.: Jason’s
reasoning, Akka’s hierarchy and scalability, Jade’s communication
protocols.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>IV. THE PROPOSED FRAMEWORK</title>
      <p>
        Since it is a compact representation, the use of a
metamodel is useful to have an overall view of all the components
of the proposal: the more the parts are, the more useful
the construction of the meta-model is. Building it up means
to clear up the hierarchies and especially the relationships
keeping otherwise separated and, most of all, to finally see
possible links and how to develop them [
        <xref ref-type="bibr" rid="ref18">17</xref>
        ].
      </p>
      <p>In the following section the H-Entity will be introduced. Right
after we will have a look at the represented meta-model (Fig.
1). There, a top-down and a bottom-up perspective to deal
with it are provided. This means that one could read the
metamodel in terms of composition of elements (top-down) or by
analyzing the single parts which it is made of (bottom-up).</p>
      <sec id="sec-4-1">
        <title>A. The H-Entity</title>
        <p>The so-defined H-Entity, where ‘H’ stands for
heterogeneous, holds the entire philosophy here proposed. It can be
considered as a polyhedral organism composed of frameworks
that cooperate by exploiting their best qualities and winning
skills. The H-Entity allows them to share their knowledge
among each other if they use different languages, and between
them and the external world, making into communication other
possible H-Entities. It is conceived as a flexible and versatile
structure, defined by Roles played by the most suitable specific
Entity (composing the H-Entity).</p>
      </sec>
      <sec id="sec-4-2">
        <title>B. Top-down meta-model perspective</title>
        <p>Let’s now observe the meta-model. The principle of all lies
in the Cyber-Physical World, which is made up of a CPS
Organization and of an Environment; they are the
organizational side, corresponding to the Moise framework, and the
environmental side, belonging to Cartago. The so-called
HEntities also belong to the CPS world: they play the CPS roles,
which are Moise roles and make a CPS organization. They
constitute the link among the left and right areas. On their turn,
the H-Entities are entities (Agents and/or Actors) playing both
H-Roles, defined as Manager, Worker, Diplomat and Interface,
and Entity Roles, which are Moise roles. This is the Moise
Organization, that allows the Entity to pursue a goal by playing
a role that determines the behavior of a Group of Entities. The
same kind of organization is adopted inside a single H-Entity
among its own Entities constituting it, or among different
HEntities, that happen to interact in the Cyber-Physical World.
Then, the H-Roles define the distribution of responsibilities
in a single H-Entity; the CPS Roles describe the
macrofunctionalities in the whole external system of CPS, among
different H-Entities. The Roles define the structural definition
of the organization and allow the Entities to pursue a goal by
following a behavioral constraint; the Goal is collective and
to be achieved by accomplishing Missions, that are the link
between roles and Social Scheme, i.e. between the structural
and the functional part of the organization. On the left side, the
CPS world has an Environment, both physical and cybernetic.
Here the artifacts compose the workspace: the artifacts are
made by a Manual, that holds the information about their state,
and by some Operations. The latter ones update Observable
Properties, that are the states of the artifacts, and generate
Observable Events (e. g., in the lower meta-model level, the
messages).</p>
      </sec>
      <sec id="sec-4-3">
        <title>C. Bottom-up meta-model perspective</title>
        <p>Let’s put one aside the other the three frameworks we
analyzed. Each of them has its own entity: Jade and Jason
Agents and Akka Actor.
a) Jade side: Jade’s Agent has an AgentState, performs
a behavior through a Scheduler and it sends and receives an
ACLMessage, which is FIPA compliant: thus, it contains a
Content, a Content Language, an Ontology, a Protocol and a
Performative, and it is expressed by an Agent-Communication
Language (ACL).</p>
        <p>b) Jason side: The Jason Agent lives following a BDI
model. In pursuing some Goals, it reacts to the Events
occurring in the context which trigger some Plans. The Plans
have to satisfy these goals. In the meanwhile, Jason Agent
communicates through messages, defined as Jason Messages,
made by a content (Proposition) and a Performative.</p>
        <p>
          c) Akka side: Finally, in Akka the actor shows a parental
hierarchy [
          <xref ref-type="bibr" rid="ref15">14</xref>
          ] that enacts a Supervision Strategy. The actor
performs a Behavior which influences a State. The Behaviour
triggers the so-called Akka Message that in turns generates a
behaviour.
        </p>
      </sec>
      <sec id="sec-4-4">
        <title>D. The linking entities</title>
        <p>Something is immediately evident: at the bottom of the
figure, the message level shows a gradual implementation from
the Actor to Jade Agent framework: the Message, containing
just a Content in Akka, acquires a Performative in Jason, and
then also a Protocol, a Language and an Ontology in Jade
(that, it is known, has its strength point in the communication
side). Here it comes the key of the interaction among the
three frameworks, originally not conceived to communicate
at all. The other elements placed outside the known
metamodels are those related to the concepts of entities: the upper
entities, called H-Entities, are all of those elements who can
interact among each other in the CPS world through an
upper Moise Organization, that replicates in the lower
metamodel level among the Roles of a single entity. Thus, the
Goal can be a Social Goal, when pursued at the upper level, 15
while at the bottom it is the single Goal pursued by Agents. 16
There are still two elements to be analyzed, the so-defined 17
Jade-Jason Message Wrapper and the Jade-Akka Message 1198
Wrapper, highlighted in green in the picture. These constitute 20
the practical key for the realization of the inter-communication 2212 }
among the three frameworks. What they do is establishing
a translation using the Jade Communication Protocol as a
channel: whenever an agent or an actor sends a message,
Jade intercepts it to re-send it to its recipient, using a wrapper
with Jason, by sharing the content and the performative, and
a wrapper with Akka, sharing only the content.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>V. THE SOLUTION</title>
      <p>The meta-model allowed to understand how and at what
level to realize the merging among all frameworks. The
following subsections will provide details about the wrappers
developed to allow their interactions and the solution to the
scenario introduced before.</p>
      <sec id="sec-5-1">
        <title>A. Examples of code: the Wrappers</title>
        <p>As introduced in the previous section, the entities are linked
together at the message level. This layer is implemented
with the wrappers: in source code 1 and source code 2,
the wrappers connect the Jason agent (Manager), with the
Akka Actor (root). The communications from the Jason Agent
to the Akka Actors are managed through a bridge. This is
implemented with a Jade agent named JadeAkkaActorSystem
(source code 1).
1 public class JadeAkkaActorSystem extends Agent {
2 ...
3 protected void setup() {
4 Akka2Jade bridge =new Akka2Jade(this);
5 root = system.actorOf(Root.props(bridge),
"rootworker");
addBehaviour(new ForwardIncomingMessages());
ACLMessage msg = new ACLMessage(ACLMessage.INFORM);
msg.addReceiver(new AID("manager",AID.ISLOCALNAME))
;
msg.setLanguage("h-language");
msg.setContent(content);
myAgent.send(msg);
}
}</p>
        <p>Source code 2. Akka to Jason wrapper def</p>
        <p>The use of a Jade Agent as a bridge is very useful because,
through the extension of the CyclicBehaviour class, a type
of Behaviour that execute the action() method cyclically and
never ends, the agent waits for messages from Jason agent,
then the Jade Agent sends them to the root actor. With the
source code 1, in the setup() method (line 5), a root actor
is instantiated: this actor has the task of initializing all the
possible sub-actors useful to the system, and it allows the
subactors to connect with the Jason Agent. When the Manager
(Jason Agent) would like to send a message to an actor, the
JadeAkkaActorSystem intercepts the message (line 12) and
sends it to the root actor (line 15), which has the task to send
the message to the specified sub-actor. When an actor would
send a message to a Jason Agent, uses the class Akka2Jade
(source code 2). These bridges also exploit a native class
named JadeAgArch that allows instantiating a Jason Agent into
a Jade Agent, sending messages from Jason to Akka Actor
through Jade Agent and vice versa. With the source code 2,
the actor uses the sendJason(msg) method (line 3-21) to send
a message to the Manager (Jason Agent).</p>
      </sec>
      <sec id="sec-5-2">
        <title>B. The SPS scenario</title>
        <p>In Fig. 2 it is explained the CPS solution for the SPS
scenario, with the adoption of the proposed meta-model.
The Captain sets the Mission by using the Interface which
is made by a Cartago Artifact; so the Mission is changed and
this is communicated to the SPSManager, whose role is played
by a Jason Agent. It sets the load priorities with an exchange
with the MissionManager, which after detecting the electric
failure (by sensors communicating with Akka Actors, through
the CircuitMonitor, finds a possible Reconfiguration with the
SPS Plan Generator, which is an Actor. This is sent to the
Manager which needs to validate the Solution by sending it
to a Validator, an Akka Actor, exchanging information with a
MatLab platform. So the available resources are negotiated
with a “talk” between the Jason Agent Manager and the
SPSRepresentative which is a Jade Agent. The solution is
finally approved by the Captain who allows the Manager to
apply it by enabling the Crew to interact with the Enactor,
a Cartago Artifact, passing through a Reconfigurator Enactor,
an Akka Actor. It physically switches off the non-vital loads
to efficiently deal with the fault. Thanks to the proposed
approach, the solution takes advantage of the most relevant
features of the three composing frameworks: it shows the
capability to adhere to standards, from Jade; it implements
a strategy in high levels rules, through Jason, and it is very
efficient, due to the Akka contribution.</p>
        <p>Source code 1. Jason to Akka wrapper def
1 public class Akka2Jade {
2 ...
3 public void sendJason(String msg) {
4 if (myAgent != null)
5 myAgent.addBehaviour( new SendToJason(msg));
6 }
7
8
9
10
11
12 }
13 @Override
14 public void action() {
private class SendToJason extends OneShotBehaviour {
...
public SendToJason (String content) {
this.content = content;
&lt;&lt;worker&gt;&gt;
CircuitMonitor</p>
        <p>[Akka]
&lt;&lt;worker&gt;&gt;
SensorMonitor
[Akka]</p>
        <p>&lt;&lt;worker&gt;&gt;
SensorArrayMonitor
[Akka]</p>
        <p>2. Electric failure
&lt;&lt;worker&gt;&gt;
SensorMonitor
[Akka]</p>
        <p>9. Apply Solution
&lt;&lt;worker&gt;&gt;
Reconfiguration</p>
        <p>Enactor
[Akka]</p>
        <p>&lt;&lt;worker&gt;&gt;
SPSPlanGenerator
[Akka]</p>
        <p>8.</p>
        <p>Approve
Solution
&lt;&lt;manager&gt;&gt;
SPSManager
[Jason]
3. Find
Reconfiguration
&lt;&lt;interface&gt;&gt;
CrewInterface
[Cartago]</p>
        <p>MatLab
Simulink
4. Validate Solution</p>
        <p>&lt;&lt;worker&gt;&gt;
SPSPlanValidator
[Akka]</p>
        <p>5. Feasible Solution</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>VI. CONCLUSIONS AND FUTURE WORKS</title>
      <p>The need to work with smart CPS implies the necessity to
make different frameworks and paradigms interact with each
other. This issue by nature leads to a multi-paradigm approach,
with the theme of communication among not-overlapping
languages. The solution we developed is here presented by
means of a meta-model including the considered agent and
actor-based frameworks (here Jade, Jason and Akka), linked by
the so-called H-Entity, a polyhedral structure that allows taking
advantage of each framework winner skills to be exploited at
best according to the needed roles to be played. The solution
adopted for an SPS reconfiguration revealed a possible way
to make the different entities interact at the message level, by
the use of wrappers.</p>
      <p>The SPS reconfiguration system prototype is now under test.
The evaluation of the system will be performed by measuring
the response time and the interactions among the different
parts of the platform. The future advancement will be to extend
the use of CPS to all the other ship’s facilities: the final purpose
is to give form to a Smart Ship solution, as already provided
by vendors such as Hyundai 1.</p>
      <p>VII. APPENDIX: DEFINITION OF META-MODEL ELEMENTS</p>
      <p>
        CARTAGO [
        <xref ref-type="bibr" rid="ref19">18</xref>
        ] [
        <xref ref-type="bibr" rid="ref20">19</xref>
        ]
Artifact: it is the basic element of the environment and it
provides organizational operations as they are used by Agents.
Environment: it consists in the field of work for the agents’
activities.
      </p>
      <p>Manual: it contains the information about the functional
description and the observable states of the artifact.
Workspace: it is defined as an open set of artifacts and agents.
The agent must exist in a workspace.</p>
      <p>Operation: It determines the update of the artifact state or it
generates observable events.</p>
      <p>Observable Property: it determines the functional behavior of
the artifact.</p>
      <p>Observable Event: it is an event generated by an operation
and sensed and registered by the agent sensors.</p>
      <p>
        MOISE [
        <xref ref-type="bibr" rid="ref14">13</xref>
        ] [
        <xref ref-type="bibr" rid="ref20">19</xref>
        ]
Group: responsible for one or more Social Schemes that the
Agents adhere to.
      </p>
      <p>Social Scheme: it contains several missions.</p>
      <p>Mission: contained in the Schemes, it is defined by a set of
goals to achieve.</p>
      <p>Role: it is a behavioral constraint for an Agent to play in a
Group.</p>
      <p>Norm: the collecting element between the Role and the
Mission so the Group to Role.</p>
      <p>Social Goal: the Goal the organization has to achieve.</p>
    </sec>
    <sec id="sec-7">
      <title>H-ENTITY</title>
      <p>H-Entity: it is the core element of the meta-model. It gathers
all the possible heterogeneous entities.</p>
      <p>Entity: one of the infinite possible members of the H-Entities.
It can be an Agent or an Actor.</p>
      <p>H-Role: H-Roles are internal roles played by the Entities.
CPS Role: CPS Roles are played among different H-Entities
interacting in the CPS World.</p>
      <p>Entity Role: the external roles played by Entities following
the Moise Organization.</p>
      <p>
        JADE [
        <xref ref-type="bibr" rid="ref11">10</xref>
        ] [
        <xref ref-type="bibr" rid="ref21">20</xref>
        ]
Jade Agent: it shows quality of autonomy and proactivity.
Behaviour: It implements the tasks that the Agents can
pursue.
      </p>
      <p>ACLMessage: it is based on an asynchronous communication
paradigm. It makes the interaction among Agents.
Protocol: as part of the structure of the ACLMessage, it is
defined to the purpose of interaction among messages by the
specification of sequences.</p>
      <p>Content: it defines the information carried by a message. It
follows FIPA indications about its expression generally using
SL (semantic language).</p>
      <p>Content language: it is expressed in SL and it is made up of
expressions or propositions.</p>
      <p>Ontology: it is a knowledge base the messages refer to.
Performative: it is a type of communication expressed by a
message, it is the communicative act.</p>
      <p>
        JASON [
        <xref ref-type="bibr" rid="ref13">12</xref>
        ] [
        <xref ref-type="bibr" rid="ref22">21</xref>
        ]
Jason Agent: autonomous, reactive, proactive and social entity
based on a BDI (belief, desire, intention) model.
      </p>
      <p>Plan: a set of actions to be performed to pursue and satisfy a
goal.</p>
      <p>Trigger Event: it is the circumstance that activates a plan
rather than another.</p>
      <p>Action: each task which a plan is made of. It is performed by
the agent and can change the environment so becoming an
Event.</p>
      <p>Event: a change in agent’s initial knowledge or goal.
Context: it is a set of conditions determining the execution of
a Plan.</p>
      <p>Belief : a predicate representing the starting knowledge of the
environment the agent has.</p>
      <p>Rule: a logic expression made by predicates.</p>
      <p>Goal: the final state that the agent wants to achieve by
performing a plan.</p>
      <p>Jason Message: it has a performative and a content. It allows
the Agents to communicate each other and it updates the
believes.</p>
      <p>Jason Performative: it is of the kind of request, information,
etc
Propositional Content: it is expressed by arguments and it
could be true or false.</p>
      <p>
        AKKA [
        <xref ref-type="bibr" rid="ref15">14</xref>
        ] [
        <xref ref-type="bibr" rid="ref12">11</xref>
        ]
Akka Actor: a reactive entity encapsulating a state and a
behavior.
      </p>
      <p>State: it is encapsulated by the Actor.</p>
      <p>Behaviour: an encoding of reactions.</p>
      <p>Supervision Strategy: the feature based on the hierarchical
structure of Akka made of fathers and son. Each father is
responsible for its sons.</p>
      <p>Akka Message: the interaction key among Actors. It stimulates
a reactive action of the Actor. Received messages are stored
in a mailbox. It has just a content.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Shi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Wan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Yan</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Suo</surname>
          </string-name>
          , “
          <article-title>A survey of cyber-physical systems</article-title>
          ,” in
          <source>Wireless Communications and Signal Processing (WCSP)</source>
          ,
          <source>2011 International Conference on. IEEE</source>
          ,
          <year>2011</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>V.</given-names>
            <surname>Gunes</surname>
          </string-name>
          , S. Peter,
          <string-name>
            <given-names>T.</given-names>
            <surname>Givargis</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Vahid</surname>
          </string-name>
          , “
          <article-title>A survey on concepts, applications, and challenges in cyber-physical systems</article-title>
          .
          <source>” KSII Transactions on Internet &amp; Information Systems</source>
          , vol.
          <volume>8</volume>
          , no.
          <issue>12</issue>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>H.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Lai</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H. V.</given-names>
            <surname>Poor</surname>
          </string-name>
          , “
          <article-title>Multicast routing for decentralized control of cyber physical systems with an application in smart grid,”</article-title>
          <source>IEEE Journal on Selected Areas in Communications</source>
          , vol.
          <volume>30</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>1097</fpage>
          -
          <lpage>1107</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>P.</given-names>
            <surname>Leita</surname>
          </string-name>
          <article-title>˜o,</article-title>
          <string-name>
            <given-names>A. W.</given-names>
            <surname>Colombo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Karnouskos</surname>
          </string-name>
          , “
          <article-title>Industrial automation based on cyber-physical systems technologies: Prototype implementations</article-title>
          and challenges,” Computers in Industry, vol.
          <volume>81</volume>
          , pp.
          <fpage>11</fpage>
          -
          <lpage>25</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>1IntegrICT, http://www.hyundai-electric.com/elec/en/integrict/integrict1.jsp</mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Bagheri</surname>
          </string-name>
          , and H.-A. Kao, “
          <article-title>A cyber-physical systems architecture for industry 4.0-based manufacturing systems</article-title>
          ,
          <source>” Manufacturing Letters</source>
          , vol.
          <volume>3</volume>
          , pp.
          <fpage>18</fpage>
          -
          <lpage>23</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Sridhar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hahn</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Govindarasu</surname>
          </string-name>
          , “
          <article-title>Cyber-physical system security for the electric power grid</article-title>
          ,
          <source>” Proceedings of the IEEE</source>
          , vol.
          <volume>100</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>210</fpage>
          -
          <lpage>224</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>P. J.</given-names>
            <surname>Mosterman</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Zander</surname>
          </string-name>
          , “
          <article-title>Cyber-physical systems challenges: a needs analysis for collaborating embedded software systems</article-title>
          ,
          <source>” Software &amp; Systems Modeling</source>
          , vol.
          <volume>15</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>5</fpage>
          -
          <lpage>16</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>[8] [Online]. Available: https://ptolemy.berkeley.edu</mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>F.</given-names>
            <surname>Bellifemine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Poggi</surname>
          </string-name>
          , and G. Rimassa, “
          <article-title>Jade: a fipa2000 compliant agent development environment</article-title>
          ,”
          <source>in Proceedings of the fifth international conference on Autonomous agents. ACM</source>
          ,
          <year>2001</year>
          , pp.
          <fpage>216</fpage>
          -
          <lpage>217</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>F. L.</given-names>
            <surname>Bellifemine</surname>
          </string-name>
          , G. Caire, and
          <string-name>
            <given-names>D.</given-names>
            <surname>Greenwood</surname>
          </string-name>
          ,
          <article-title>Developing multi-agent systems with JADE</article-title>
          . John Wiley &amp; Sons,
          <year>2007</year>
          , vol.
          <volume>7</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Cossentino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lopes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Nuzzo</surname>
          </string-name>
          , G. Renda, and L. Sabatucci, “
          <article-title>A comparison of the basic principles and behavioural aspects of Akka, JaCaMo and Jade development frameworks</article-title>
          .
          <source>” 19th Workshop</source>
          From Objects to Agents (WOA
          <year>2018</year>
          ), Palermo,
          <fpage>28</fpage>
          -
          <lpage>29</lpage>
          June 2018.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R. H.</given-names>
            <surname>Bordini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Hu</surname>
          </string-name>
          <article-title>¨ bner, and M. Wooldridge, Programming multiagent systems in AgentSpeak using Jason</article-title>
          . John Wiley &amp; Sons,
          <year>2007</year>
          , vol.
          <volume>8</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Hu</surname>
          </string-name>
          <article-title>¨ bner,</article-title>
          <string-name>
            <surname>O. Boissier</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Kitio</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Ricci</surname>
          </string-name>
          , “
          <article-title>Instrumenting multi-agent organisations with organisational artifacts and agents</article-title>
          ,”
          <article-title>Autonomous agents and multi-agent systems</article-title>
          , vol.
          <volume>20</volume>
          , no.
          <issue>3</issue>
          , pp.
          <fpage>369</fpage>
          -
          <lpage>400</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gupta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Akka</given-names>
            <surname>Essentials</surname>
          </string-name>
          . Packt Publishing, Birmingham,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>L.</given-names>
            <surname>Agnello</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Cossentino</surname>
          </string-name>
          , G. De Simone, and L. Sabatucci, “
          <article-title>Shipboard power systems reconfiguration: a compared analysis of state-of-the-art approaches</article-title>
          ,” Smart Ships Technology, pp.
          <fpage>1</fpage>
          -
          <lpage>9</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>C.</given-names>
            <surname>Hardebolle</surname>
          </string-name>
          and
          <string-name>
            <given-names>F.</given-names>
            <surname>Boulanger</surname>
          </string-name>
          , “
          <article-title>Exploring multi-paradigm modeling techniques</article-title>
          ,
          <source>” Simulation</source>
          , vol.
          <volume>85</volume>
          , no.
          <fpage>11</fpage>
          -
          <issue>12</issue>
          , pp.
          <fpage>688</fpage>
          -
          <lpage>708</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>T.</given-names>
            <surname>Ku</surname>
          </string-name>
          <article-title>¨ hne, “Matters of (meta-</article-title>
          ) modeling,”
          <source>Software &amp; Systems Modeling</source>
          , vol.
          <volume>5</volume>
          , no.
          <issue>4</issue>
          , pp.
          <fpage>369</fpage>
          -
          <lpage>385</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ricci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Viroli</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Omicini</surname>
          </string-name>
          , “
          <article-title>Cartago: A framework for prototyping artifact-based environments</article-title>
          in MAS,” in
          <source>International Workshop on Environments for Multi-Agent Systems</source>
          . Springer,
          <year>2006</year>
          , pp.
          <fpage>67</fpage>
          -
          <lpage>86</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>O.</given-names>
            <surname>Boissier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. H.</given-names>
            <surname>Bordini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Hu</surname>
          </string-name>
          <article-title>¨ bner, A. Ricci, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Santi</surname>
          </string-name>
          ,
          <article-title>“Multi-agent oriented programming with JaCaMo,”</article-title>
          <source>Science of Computer Programming</source>
          , vol.
          <volume>78</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>747</fpage>
          -
          <lpage>761</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>C.</given-names>
            <surname>Hahn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Madrigal-Mora</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          K. Fischer, “
          <article-title>Interoperability through a platform-independent model for agents,” in Enterprise Interoperability II</article-title>
          . Springer,
          <year>2007</year>
          , pp.
          <fpage>195</fpage>
          -
          <lpage>206</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>M.</given-names>
            <surname>Cossentino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chella</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lodato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lopes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Ribino</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Seidita</surname>
          </string-name>
          , “
          <article-title>A notation for modeling Jason-like BDI agents</article-title>
          ,” in 2012 Sixth International Conference on Complex,
          <source>Intelligent, and Software Intensive Systems. IEEE</source>
          ,
          <year>2012</year>
          , pp.
          <fpage>12</fpage>
          -
          <lpage>19</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>