Hybrid system modeling using the SIMANLib and ARENALib Modelica libraries

https://doi.org/10.1016/j.simpat.2013.05.005Get rights and content

Highlights

  • The SIMANLib and ARENALib libraries replicate the basic functionality of SIMAN and Arena.

  • They facilitate the description of multi-formalism hybrid models.

  • The Parallel DEVS formalism has been used as a base to design the new libraries.

  • The libraries can be freely downloaded from http://www.euclides.dia.uned.es/.

Abstract

The ARENALib and SIMANLib Modelica libraries replicate the basic functionality of the Arena simulation environment and the SIMAN language. These libraries facilitate describing discrete-event models using the Arena modeling methodology. ARENALib and SIMANLib models can be combined with other Modelica models in order to describe complex hybrid systems (i.e., combined continuous-time and discrete-event systems). The implementation and design of SIMANLib and ARENALib is discussed. The ARENALib components have been built in a modular fashion using SIMANLib. The SIMANLib components have been described as Parallel DEVS models and implemented using DEVSLib, a Modelica library previously developed by the authors to support the Parallel DEVS formalism. The use of Parallel DEVS as underlying mathematical formalism has facilitated the development and maintenance of SIMANLib. The modeling of two hybrid systems is discussed to illustrate the features and use of SIMANLib and ARENALib: firstly, a soaking-pit furnace; secondly, the malaria spread and an emergency hospital. DEVSLib, SIMANLib and ARENALib can be freely downloaded from http://www.euclides.dia.uned.es/.

Introduction

The Arena simulation environment uses a flowchart-based modeling methodology that facilitates the description of discrete-event systems [8], [9]. Systems are described using Arena from the point of view of the entities that flow through them using the available resources. Arena models are structured in a hierarchical and modular way. They are defined by means of a flowchart diagram and static data.

The flowchart diagram is composed by instantiating and connecting predefined components named flowchart modules. Each flowchart module has an interface and an internal behavior. The interface is used to connect with other modules, thus describing the path for the entities. The internal behavior describes the actions performed by the entities while in the component, e.g., delay a certain amount of time, seize and release resources, and record statistics. The simulation results are usually presented in the form of statistical indicators that are calculated during the simulation.

The static data allow to specify component characteristics, such as for instance, the characteristics of the entity arrival processes, resources and queues. The static data are described using the data modules provided to this end by Arena.

The Arena flowchart and data modules are arranged into panels. The main Arena panel is named BasicProcess. This panel includes the Create, Dispose, Process, Decide, Batch, Separate, Assign and Record flowchart modules, and the Entity, Queue, Resource, Variable, Schedule and Set data modules [8]. Other Arena panels are AdvanceProcess, AdvanceTransfer, AgentUtil, FlowProcess and Packaging [8].

Arena is based on the SIMAN simulation language [15]. Arena modules are high-level constructs whose functionality is equivalent to sets of SIMAN blocks and elements. Arena predefined modules are internally built using SIMAN blocks and elements, which represent lower-level actions. SIMAN and Arena components can be combined in the same model, provided that they have compatible interfaces and manage the same types of information. Arena provides two panels, named Blocks and Elements, that correspond to the components of the SIMAN language.

Arena provides limited support to the description of continuous-time models [8]. The linear models whose state-variable derivatives remain constant between discrete events can be described using the Levels and Rates SIMAN blocks, following the System Dynamics approach [7]. A general-purpose programming language (e.g., C, FORTRAN and Visual Basic) needs to be used to describe other types of continuous-time models and their connection to the Arena discrete-event model.

Other tools support different approaches to hybrid system modeling. For instance, Anylogic facilitates describing continuous-time models using System Dynamics [7], similarly to Arena. Ptolemy II provides functionality to describe the continuous-time model using block diagrams, similarly to Matlab/Simulink. Based on Ptolemy II, the Building Controls Virtual Test Bed (BCVTB) is a software environment that allows the co-simulation between different simulation programs, including the Modelica modeling environment Dymola among others [20].

The general-purpose, object-oriented modeling languages support the physical modeling paradigm [1]. In particular, the Modelica language [11] facilitates the object-oriented description of DAE-hybrid models, i.e., models composed of differential and algebraic equations, and discrete-time events. Modelica supports a declarative description of the continuous-time part of the model (i.e., equation-oriented modeling) and provides language expressions for describing discrete-time events. These features have facilitated the development of Modelica libraries supporting several modeling formalisms and describing phenomena in different physical domains [12]. Modelica facilitates the reuse of models and model components, which contribute to reduce the cost of new model development [17].

A number of Modelica libraries have been developed for supporting discrete-event modeling formalisms, including StateCharts [6], state graphs [14], hybrid automata [16], Petri Nets [13], extended Petri Nets [5] and Parallel DEVS [19]. The description of operation management models using Modelica is analyzed in [10] and the model of an inventory system is presented.

The Arena modeling methodology is supported by the SIMANLib and ARENALib Modelica libraries [18]. These libraries facilitate the description of discrete-event logistic models in Modelica, such as manufacturing and packaging processes, supply chains, health care systems, and transport and distribution networks among others. The physical modeling paradigm supported by Modelica can be combined with the Arena modeling methodology in order to describe complex hybrid systems. This combination is not currently supported by other modeling and simulation environments. SIMANLib and ARENALib include components to interface with other Modelica models. These components facilitate connecting models composed using SIMANLib and ARENALib to Modelica models developed using other methodologies, e.g., continuous-time models described using the physical modeling paradigm.

The implementation of SIMANLib and ARENALib, and their use for hybrid system modeling are discussed in this manuscript. Remarks on the SIMANLib and ARENALib implementation are provided in Section 2. The architecture and most relevant features of SIMANLib and ARENALib are described in Sections 3 The SIMANLib Modelica library, 4 The ARENALib Modelica library, respectively. The SIMANLib and ARENALib components for interfacing with models developed using other Modelica libraries are described in Section 5. Finally, two case studies are used to illustrate the SIMANLib and ARENALib capabilities for hybrid system modeling. The modeling of a soaking pit furnace and an emergency hospital are discussed in Sections 6 Soaking-pit furnace, 7 Emergency hospital, respectively. These case studies illustrate the capabilities for hybrid system modeling included in the libraries (i.e., external processes and generation of entities on demand).

Section snippets

Remarks on the SIMANLib and ARENALib implementation

The behavior of the SIMANLib components has been formally described in terms of atomic Parallel DEVS models [22]. The use of Parallel DEVS as a base to describe the behavior of SIMANLib components has facilitated the development, maintenance and reuse of the models. The formal specification of the SIMANLib components in Parallel DEVS can be found in [18]. The SIMANLib components have been developed using DEVSLib [19], a Modelica library that facilitates the description of Parallel DEVS models

The SIMANLib Modelica library

The SIMANLib Modelica library provides a subset of the modeling functionality found in the SIMAN language. The top-level architecture of SIMANLib is shown in Fig. 1a. The library is divided in two areas: a user’s area and a developer’s area. This division helps the user to focus on the components oriented for either developing new models or extending the functionality of the library with new components. The developer’s area is encapsulated in the SRC package, and contains the developer-oriented

The ARENALib Modelica library

ARENALib reproduces most of the modeling functionality of the Arena Basic Process panel. The top-level classes of ARENALib are shown in Fig. 2a. The library is also divided into two areas: a user’s area and a developer’s area. The developer’s area is encapsulated into the SRC package and contains the internal implementation of the library modules. The user’s area is composed of the following Modelica classes:

  • The User’s Guide model contains the user-oriented documentation of the library.

  • The Draft

Interfacing with other Modelica models

The Parallel DEVS models described using DEVSLib can communicate with other Modelica models in two ways [19]: through direct connections and using the interface models included in DEVSLib.

  • Direct connections. Variables of other Modelica models can be inputs to the transition functions of the DEVSLib Parallel DEVS models. These connections are similar to the interactions described in the DEV& DESS formalism between the discrete-event and the continuous-time parts of a hybrid model [22].

  • Interface

Soaking-pit furnace

The soaking-pit furnace described in [8] is modeled using ARENALib. The use of the Modelica language and the ARENALib Modelica library facilitates the model description. Instead of using Levels and Rates from the SIMAN language to describe the continuous-time equations of the furnace, as performed in [8], Modelica allows to directly code these equations (cf. lines 19 to 25 in Listing 3), which will be automatically handled and translated into executable code by the Dymola modeling environment.

Emergency hospital

This hybrid model is composed of two parts (see Fig. 8): the malaria spread model and the emergency hospital model. The former allows to estimate the malaria infection rate. The later is used to evaluate the use of the resources required to treat the infected people. In this case study, the continuous-time model of the malaria spread serves as input for the discrete-time model of the emergency hospital. The connection is performed using the Create module from the ARENALib library. This

Conclusions

The SIMANLib and ARENALib Modelica libraries facilitate the application of the Arena modeling methodology in Modelica. These libraries reproduce some modeling functionality of SIMAN and Arena, providing Modelica components to describe the flowchart diagram and the static information of the model. ARENALib reproduces most of the modeling functionality of the Basic Process panel of Arena. The SIMAN blocks supported by SIMANLib include: Create, Dispose, Queue, Seize, Delay, Release, Branch, Count,

References (22)

  • S. Robinson et al.

    Simulation model reuse: definitions, benefits and obstacles

    Simulation Modelling Practice and Theory

    (2004)
  • V. Sanz et al.

    System modeling using the Parallel DEVS formalism and the Modelica language

    Simulation Modeling Practice and Theory

    (2010)
  • K.J. Åström, H. Elmqvist, S.E. Mattsson, Evolution of continuous-time modeling and simulation, in: Proceedings of the...
  • F.E. Cellier et al.

    Continuous System Simulation

    (2006)
  • N. Chitnis et al.

    Bifurcation analysis of a mathematical model for malaria transmission

    SIAM Journal of Applied Mathematics

    (2006)
  • Dynasim AB, 2006. Dymola, Dynamic Modeling Laboratory. User’s Manual....
  • S.M. Fabricius, E. Badreddin, Hybrid dynamic plant performance analysis supported by extensions to the Petri Net...
  • J. Ferreira, J.E. de Oliveira, Modelling hybrid systems using StateCharts and Modelica, in: Proceedings of the 7th IEEE...
  • J.W. Forrester, Principles of Systems, Waltham, MA, USA,...
  • W.D. Kelton et al.

    Simulation with Arena

    (2007)
  • A.M. Law

    Simulation Modelling and Analysis

    (2007)
  • Cited by (0)

    This work has been supported by the Spanish CICYT under DPI2007-61068 Grant.

    View full text