<!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>SimQRi - A Query-oriented Tool for the Efficient Simulation and Analysis of Process Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>(Tool Demonstration)</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Christophe Ponsard , Quentin Boucher , Gustavo Ospina CETIC Research Centre</institution>
          ,
          <country country="BE">Belgium</country>
        </aff>
      </contrib-group>
      <fpage>38</fpage>
      <lpage>40</lpage>
      <abstract>
        <p>-Process models are an abstraction used in several domains such as manufacturing (transformation chains), logistics (procurement and distribution networks), architecture of electronics systems (network of data/computation nodes). Such systems are often subject to requirements related to the processing delay, throughput, overall reliability, or quality attributes of specific outputs. Those characteristics are highly dynamic. Assessing them at design time requires some kind of execution of the model, typically using simulation. As the system is often nondeterministic, several simulations need to be run and combined in order to draw relevant conclusions. In this paper, we describe a tool, called SimQRi, that we developed to efficiently run a large number of simulations over process models, using Discrete Event Simulation combined with Monte-Carlo techniques. Their key point is that the properties to be assessed are formulated as queries over the model with a trace semantics. Queries are evaluated and aggregated through simulations, so there is no need to store traces and perform post-processing on them. Several operators are available on different process-related components (storage content, process activity, number of processes items, etc). In our demo we will demonstrate how the tool can be used 1) to assess several risks on supply chains and 2) to design a green Cloud to cope with response times with optimal energy usage. Index Terms-Process Models; Risk Assessment; DiscreteEvent Simulation; Oscar.cbls;</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>Process models are very common abstractions in many
application domains both in the physical world (logistics,
supply chain domains), in computer world (Cloud architecture,
signal processing, etc), or even in hybrid domains such as
smart manufacturing heavily mixing physical processes with
IT data collection and analysis processes based on the Internet
of Things and Big Data.</p>
      <p>
        Reasoning on such processes is not always easy because
of the dynamic nature of the requirements to enforce. It
can require some form of prototyping already beyond the
design phase. At design time, an option is to use
modelchecking, e.g. using the Communicating Sequential Process
(CSP) abstraction and tools like FDR [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. However, such
approaches have some limitations in expressiveness and size
of manageable models.
      </p>
      <p>
        We consider a more practical approach based on model
simulation. Our primary motivation is to help small and
medium enterprises (SMEs) in improving their maturity level
to master the processes present in their domain, focusing on
supply chains as primary domain, as confirmed by a survey
we conducted [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Based on this, we developed a framework
and its supporting tooling composed of:
a modelling language to represent process models using
quite abstract building bricks (processes, flows, storages)
so it can be used in different application domains.
an expressive query language to capture a large variety
of quantifiable properties.
an editor tool supporting graphical modelling and tabular
capture of queries, including the specification of
stochastic parameters for most of the parameters and model
validation, as well as feedback at the user interface level.
a simulation engine using Discrete Event Simulation
(DES) and Monte Carlo Simulation (MCS) in order to
cope with the non-determinism present inside the model.
a reporting tool to analyse the simulation results.
      </p>
      <p>The key point of such an approach is to reach a high level
of efficiency. In order to reach that goal, the tool is designed to
compute all the queries during the simulation without the need
to store any trace and post-process on them. The ultimate goal
of our research project is to help companies to fulfil strategic
goals, minimize financial, reputational and productivity losses
and improve their overall productivity and reliability.</p>
      <p>Our tool is available at https://simqri.cetic.be both as an
online web-based application (requiring no installation) and
as an Eclipse plugin.</p>
      <p>This paper is structured as follows. Section 2 gives a
summary of the framework in terms of meta-model, query
language and architecture. Section 3 details a use case related
to supply chain risk management while Section 4 details
another case related to green cloud design. Finally Section
5 draws some conclusions and our development roadmap.</p>
    </sec>
    <sec id="sec-2">
      <title>II. FRAMEWORK DESCRIPTION</title>
      <p>Our framework is composed of the following elements:
a Domain Specific Language (DSL) based on a
metamodel able to capture all the main elements such as
suppliers, storages, processes, and flows.
an expressive Query Language able the capture a rich set
of properties. Those properties can be efficiently
measured and statistically processed during the simulation.
an architecture based on an Open Source simulation
engine and both a web-based and desktop-based user
interface.</p>
      <sec id="sec-2-1">
        <title>A. Meta-model Overview</title>
        <p>Our DSL is industry 4.0 oriented and does not pursue the
same goals as business process modelling languages. Its
metamodel is described in Figure 1 and is composed of activable
components such as storages and processes, through which
items can flow.</p>
        <p>Storages represent any kind of device or place for storing
raw materials (e.g. a warehouse in a supply chain or disk
space for an IT infrastructure). They have a maximum
capacity. When this capacity is reached, they can either
block any process trying to put more items into them or
overflow (and lose the overflown items).</p>
        <p>Batch processes are processes that work in a batch
fashion. The supply items of those processes are collected
from several input storages, then they perform their work
for some time, and finally the produced outputs are
dispatched to their respective output storages before this
whole cycle starts again. They can have a single or
multiple production lines, which can model, for instance,
multi-line physical processes or multi-threaded computer
processes.</p>
        <p>Continuous processes are processes where items are
continuously picked from input storages and outputs are
produced like in a conveyor belt. Continuous processes
act like pipelines and process several items in a queue.</p>
        <p>The flow of items is controlled through activation rules
related to specific policies:</p>
        <p>On Order Activation represents on-demand production
triggered by a specific order book.</p>
        <p>Stock Monitoring are used to implement different
procurement policies (or possibly internal stock transfers)
based on specific conditions on the demanding storages.</p>
      </sec>
      <sec id="sec-2-2">
        <title>B. Query Language Overview</title>
        <p>
          Here, we give an overview of the main operators that can be
used to express queries on the model enabling a large range
of model analysis detailed in our usage scenarios. A more
detailed description is available from [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>Queries for Processes: These are atomic operators that
extract basic metrics from a process p of the simulation
model. Simple operations are available to check for the number
of started operations (startedBatchCount(p)) and completed
operations (completedBatchCount(p)), given a process can
fail with some probability. Other operations can be used to
check about the timing and load aspects (totalWaitDuration(p)
and meanLoad(p)). Specific events can also be detected like
anyBatchStarted(p).</p>
        <p>Queries for Storages: These are atomic operators which
extract basic metrics from a storage of the simulation model. The
status of a storage s at evaluation time can be retrieved using
classical functions like capacity(s), empty(s) or content(s),
respectively returning the (fixed) capacity, the emptiness status
and the number of items. Other operations are available for
getting usage information, like totalPut(s), totalFetch(s) and
totalLostByOverflow(s) respectively returning the number of
items put into s, fetched from s or lost by overflow of s.</p>
        <p>Operators: Complex queries can be built using following
operators over other queries (basic or complex), some of them
also referring to one or more states of the considered trace:
logical: true; false; not(!); and(&amp;); or(k); &lt;; &gt;; :::
temporal logic: hasAlwaysBeen; hasBeen; since; :::
arithmetic: +; ; ; =; sum; :::
temporal arithmetic: time; min; max; avg; integral:::</p>
      </sec>
      <sec id="sec-2-3">
        <title>C. Tool Architecture</title>
        <p>
          The global architecture of our tool is depicted in Figure 2.
The lower layer provides the Discrete Event and Monte-Carlo
Simulation infrastructure, based on the OscaR Scala Open
Source library [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. The middle layer is providing a REST API
that is used only for the web-based version of the tool. The
top layer is the user interface layer provided both as an online
web application and an Eclipse interface based on EMF and
Sirius technologies [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. The former requires no installation
and support model sharing while the later is more secure and
easy to integrate and adapt.
        </p>
        <p>
          A major point is the simulation efficiency: all elements
feature optimal O(1) complexity for their update operations.
Queries are evaluated incrementally during the simulation,
by performing timely inspection of the internal state of the
simulation model, so that the trace is actually not generated.
This ensures the tool is running minimal space and time
overhead [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>
          III. SCENARIO 1: SUPPLY CHAIN RISK MANAGEMENT
Supply chain risk management is the implementation of
strategies to manage both everyday and exceptional risks along
the supply chain, based on continuous risk assessment with the
objective of reducing vulnerability and ensuring the process
continuity [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. Such risks can occur for several reasons, both
external or internal.
        </p>
        <p>In our demo, we investigate a relatively simple case
consisting of three components, which are procured externally. The
production process can be characterised as an order-driven,
small batch, job shop production as depicted in Figure 3.</p>
        <p>For this domain, a specific wizard was developed to capture
different kinds of risks (quantity, quality, delay) using a
structured risk model that can be automatically translated into
specific queries in the query language. E.g. at system level,
the quantity risk can be expressed as: (content(OU T P U T )
content(ORDER)) ORDER:partCost. The same model is
used to produce the risk analysis dashboard to identify risk
causes and then try to address them.</p>
        <p>Controlling the risks requires tuning the model in order
to minimise the estimated costs induced by risks. However,
changing a parameter in the model might introduce multiple
(conflicting) effects. The tool supports a simple way to change
the values of some parameters to find out their optimal values,
given that other parameters remain constants. In our case, this
can be used to find optimal ordering frequency.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>IV. SCENARIO 2: GREEN CLOUD DESIGN</title>
      <p>Cloud application deployment is becoming increasingly
popular for the economy of hardware costs, the pay-per-use
model and the ability to scale. However, deploying software
on the Cloud carries both opportunities and threats regarding
energy efficiency. Our tool can help Cloud application
developers to learn and reason about the energy consumption of
their application on the server-side at design time.</p>
      <p>
        Our case study is a 3-tier web application that is designed
to be an online photo manager [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. It provides social services
for uploading, storing and previewing photos, creating and
sharing albums. The starting point is a model of the Cloud
Application and energy requirements expressed through a
specific UML profile [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. A simplified model is shown in
      </p>
      <p>In this case, we can also consider self-adaptation policies
of the form WHEN condition THEN action. The condition
part is a query on the model while the action part is
some model adaptation affecting some parameters like
Process.add/removeInstance. The following policy can be used
to express how to scale down for energy efficiency: WHEN
HasAlwaysBeen(MEDIA.running&lt;0.8*MEDIA.total,10min)
THEN MEDIA.removeInstance(1)</p>
      <p>Based on this model, probes and evolution policies,
simulations and analysis can be carried out.</p>
    </sec>
    <sec id="sec-4">
      <title>V. CONCLUSION AND ROADMAP</title>
      <p>The lessons learned so far by applying our tool on different
use cases shows it can adapt to different domains related to
process modelling and analysis. The query mechanism proved
both expressive and efficient on the feedback collected so far.</p>
      <p>Our on-going work is mainly to improve the more recent
Eclipse-based interface and to extend the reporting capabilities
of the tool by adding statistical graphics for the simulation
results. Traceability links between simulation results and
requirements should also be explored.</p>
    </sec>
    <sec id="sec-5">
      <title>ACKNOWLEDGMENT</title>
      <p>This work was partly funded by the ASCETiC FP7 project
(grant nr. 610874).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A. W.</given-names>
            <surname>Roscoe</surname>
          </string-name>
          , “
          <string-name>
            <surname>Model-checking</surname>
            <given-names>CSP</given-names>
          </string-name>
          ,
          <article-title>” in a Classical Mind, Prentice Hall International (UK) Ltd</article-title>
          .,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J. S.</given-names>
            <surname>Dong</surname>
          </string-name>
          , “
          <article-title>Model checking csp revisited: Introducing a process analysis toolkit</article-title>
          ,” in In ISoLA 2008. Springer,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>S.</given-names>
            <surname>Printz</surname>
          </string-name>
          , P. von Cube, and
          <string-name>
            <given-names>C.</given-names>
            <surname>Ponsard</surname>
          </string-name>
          , “
          <article-title>Management of procurement risks on manufacturing processes - survey results</article-title>
          ,” http://simqri.com/ uploads/media/Survey_Results.pdf,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>R. De Landtsheer</surname>
            , G. Ospina,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Massonet</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Ponsard</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Printz</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Härtel</surname>
            , and
            <given-names>J. P.</given-names>
          </string-name>
          von Cube,
          <article-title>“A Discrete Event Simulation Approach for Quantifying Risks in Manufacturing Processes,”</article-title>
          <source>in Int. Conf. on Op. Research and Enterprise Systems (ICORES)</source>
          ,
          <year>February 2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5] OscaR, “OscaR: Scala in
          <string-name>
            <surname>OR</surname>
          </string-name>
          ,” https://bitbucket.org/oscarlib/oscar,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Steinberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Budinsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Paternostro</surname>
          </string-name>
          , and E. Merks,
          <source>EMF: Eclipse Modeling Framework 2.0</source>
          , 2nd ed.
          <source>Addison-Wesley Professional</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Obeo</surname>
          </string-name>
          , “Sirius Designer,” http://www.obeodesigner.com/sirius,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Wieland</surname>
          </string-name>
          and
          <string-name>
            <surname>C. M. Wallenburg</surname>
          </string-name>
          , “
          <article-title>Dealing with supply chain risks: Linking risk management practices and strategies to performance,” Int</article-title>
          .
          <source>Journal of Phys. Distr. &amp; Logistics Mngmt</source>
          , vol.
          <volume>42</volume>
          , no.
          <issue>10</issue>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Tsebro</surname>
          </string-name>
          et al., “
          <article-title>Rich faces photo album application</article-title>
          ,” http://docs.jboss. org/richfaces/latest_3_3_X/en/realworld/html_single,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>C.</given-names>
            <surname>Ponsard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Deprez</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Michel</surname>
          </string-name>
          , “
          <article-title>Guiding cloud developers to build energy aware applications</article-title>
          ,” in Software Technologies - 10th
          <source>International Joint Conference, ICSOFT</source>
          <year>2015</year>
          , Colmar, France,
          <source>July 20- 22</source>
          ,
          <year>2015</year>
          ,
          <string-name>
            <given-names>Revised</given-names>
            <surname>Selected</surname>
          </string-name>
          <string-name>
            <surname>Papers</surname>
          </string-name>
          ,
          <year>2015</year>
          , pp.
          <fpage>397</fpage>
          -
          <lpage>414</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>