<!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>Porting the Renew Petri Net Simulator to the Operating System Android</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dominic Dibbern</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University Hamburg Faculty of Mathematics, Informatics und Natural Sciences Department Informatics</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>This article describes the steps to identify, extract and adapt the core parts of the Renew simulator in order to make them usable on an Android-powered device. As Renew is build in Java and has a plugin-architecture, a few plugins have to be adapted to get a working Petri net simulator for the operating system Android, which applications are widely written in Java. The result of this work is a framework for simulating and using Petri nets in an Android application.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        To extend the Petri net-based Agent-Oriented Software Engineering (PAOSE,
see [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]) approach, to use Petri net-based agents on mobile devices like
smartphones and tablet computers, the first step is to develop a Petri net simulator
for this type of devices. As Renew is used to create and simulate the agents,
its simulation engine has been ported to the operating system Android. Renew
(see [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]) is written in Java and Android applications are usually also written in
Java (see [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]), so the expenditure to port the application is not large.
Furthermore, Renew has a plugin-architecture, which allows to extract the needed core
plugins and embed them into an Android application.
      </p>
      <p>As a matter of fact, there are only three plugins needed for the simulation
engine plus a plugin management system. As Android misses some libraries from a
standard Java version, there are some plugins that have to be adapted. The
missing libraries are essentially the graphical user interface and the remote method
invocation capabilities. Fortunately, the graphical user interface is disconnected
from and not referenced in the simulator core plugins. The remote method
invocation is encapsulated and can easily be extracted to a new plugin, without
a loss of functionality. Some additional minor changes are not further discussed
here. With these changes Renew’s simulation engine is able to run on an
Android device, using the same codebase as the full Renew. This is an advantage,
by having an up-to-date version on the mobile devices.</p>
      <p>Although the Renew simulation engine can now be used on Android, the
start-up of application differs from the way of normal Java applications. This plus
a relative huge amount of needed space for the plugins, on a mobile device with
limited space for applications, implies several difficulties to create a practical
system architecture for Android. Figure 1 shows the envisioned system-architecture.
There is one application providing Renew, which contains and distributes the</p>
      <p>PNSE’12 – Petri Nets and Software Engineering
Renew plugin archives to other application, that want to make use of the
simulator. To allow application developers an easy use of Renew, three components
have been build. The Renew Service as the server and the Prepare Renew
Activities as clients communicate at application start-up and automatically start
the Renew simulation engine. The Renew Activity is a convenient extension
of the Prepare Renew Activity for easy control of the simulation engine. To
develop a new application, using the simulation engine, the developer has to
extend the Renew activity and make use of its control functions. To reduce the
use of disk space and to ensure an easy update there is one application providing
Renew for a couple of applications, which use the Renew simulator.</p>
      <p>As a result the simulation engine of Renew is used to create a framework for
Android applications, allowing them to take advantage of developing Petri nets
instead of normal code, if it is useful. This prototypical implementation is the
first step to extend the PAOSE approach into the mobile world of smartphones.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Cabac</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Modeling Petri Net-Based Multi-Agent Applications</article-title>
          . Dissertation, Universität Hamburg, Department Informatik,
          <string-name>
            <surname>Vogt-Kölln Str</surname>
            . 30,
            <given-names>D</given-names>
          </string-name>
          <string-name>
            <surname>-</surname>
          </string-name>
          22527
          <string-name>
            <surname>Hamburg</surname>
          </string-name>
          (Apr
          <year>2010</year>
          ), http://www.sub.uni-hamburg.de/opus/volltexte/2010/4666/
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Kummer</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wienberg</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duvigneau</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabac</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          : Renew - the
          <source>Reference Net Workshop (Aug</source>
          <year>2009</year>
          ), http://www.renew.de/, release 2.
          <fpage>2</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Open Handset Alliance:
          <article-title>Android developers</article-title>
          .
          <source>Website</source>
          (
          <year>2012</year>
          ), http://developer.android.com
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>