LINKING AND REUSING MODEL COMPONENTS
FOR ENVIRONMENTAL SIMULATION
Jean-Luc de Kok and Guy Engelen
Flemish Institute for Technological Research (VITO), Boeretang 200, Mol, Belgium
Keywords: Environmental Simulation, Coastal Zone Management, Component-Based Simulation, Model Reuse.
Abstract: Simulation modelling is widely accepted as a tool to gain understanding of the behavior of environmental
systems under pressure and support their integrated management. A common practice is that the modelling
process is aimed at identifying the relevant problems and potential management strategies in close
coordination with stakeholders before translating the available domain expertise into integrated simulation
models. The challenges include the need for cross-disciplinary thinking and model linking, incorporation of
social science knowledge, and the communication aspects of projects. Most projects bring along their own
case studies, with simulation models being designed from scratch. Although component-based design is the
common practice in software engineering few examples are found in environmental modelling. Project
deliverables are often not reused by parties different from those that developed them. An open-source
library of well-designed, reusable model building components could pave the way for a more efficient use
of modelling resources and considerably improve the efficiency and flexibility of the modelling process,
thereby creating more room for the communication with end users, scientific discussions, and model
interface design. The experiences of a multi-disciplinary simulation study of coastal systems are used to
discuss the methodological aspects and pitfalls of the design of reusable model components.
1 INTRODUCTION
Environmental systems are under increasing man-
induced pressure and the response to different
external conditions and combinations of
management options depends on the complex
interactions between the social, ecological and
economic processes involved. Different integrated
simulation models have been developed in the past
to support strategic environmental planning.
Unfortunately, these models are often not reused by
research groups other than those that developed the
models. One of the more important reasons is that
the degree of reusability of model constructs is
limited due to the specific requirements of the
modelling framework used (Rizzoli et al., 2008).
Reusability and flexibility for application by third
parties is seldom a priority for domain experts, who
often lack the professional software engineering
skills needed to make their products easily
transferable. Well-designed, reusable components
representing key functionalities could facilitate the
exchange of scientific expertise between
environmenttal modellers across different modelling
domains. In turn this would allow for a more rapid
and efficient design of new and maintenance of
existing simulation models. Multi-disciplinary
simulation studies with a policy-supporting objective
could benefit from a generic library of reusable
components because it reduces the effort required
from generalist modellers for the design of
integrated simulation models (Donatelli et al., 2008).
In turn this will leave more room for the
communication with stakeholders and addressing
scientific issues. The advantages and challenges of a
component-based design process for simulation
modelling is a topic of growing interest (Argent,
2004; Papajorgji, 2005; Rizzoli et al., 2008;
Verbraeck and Valentin, 2008). The aim of a
recently concluded research project SPICOSA
(www.spicosa.eu) was to develop a methodology for
science-policy interfacing in the field of integrated
coastal zone management. The scale and integrated
nature of the project, need to exchange model
fragments, range of different research themes and
component-based modelling platform used made the
project an interesting testing ground for the concept
of reusable model components (De Kok et al., 2010).
103
de Kok J. and Engelen G..
LINKING AND REUSING MODEL COMPONENTS FOR ENVIRONMENTAL SIMULATION .
DOI: 10.5220/0003576001030108
In Proceedings of 1st International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH-2011), pages
103-108
ISBN: 978-989-8425-78-2
Copyright
c
2011 SCITEPRESS (Science and Technology Publications, Lda.)
The project was organized around the different
design phases of integrated simulation models
linking the ecological, economic and social aspects
to the promising management strategies. Regular
consultations with stakeholders and representatives
of coastal planning institutes formed a key aspect of
the project. The modelled themes ranged from
fisheries and shell-fish farming to beach
attractiveness and coastal and inland eutrophication.
ExtendSim® (www.extendsim.com) served as
common simulation platform to allow for easy
exchange of model constructs between the different
project teams. This modelling environment supports
the component-based, hierarchical design of
dynamic simulation models to describe discrete and
continuous systems. Drag-and-drop linking of
reusable model components which are stored in
different libraries makes the design and maintenance
of models relatively easy, even for less-experienced
modellers. In addition, a large number of tools are
available to customize and improve the layout and
control of the model, an advantage in projects
developing policy instruments to be used in
interactive sessions with stakeholders. Simulation
models can be designed and modified by linking
standard components based on graphical icons, or by
means of more powerful coding in ModL, a
programming language similar to C (Fig. 1).
Modellers can also reorganize their components in
custom libraries to support the exchange of model
constructs. The project teams were required to
contribute one or more reusable model building
components to a generic model library, an important
deliverable of the project. Typical design criteria for
model components are reusability, flexibility,
encapsulation, interoperability (Papajorgji, 2005;
Rizzoli et al., 2008; Verbraeck and Valentin, 2008)
as well as framework independence (Rizzoli et al.,
2008). General guidelines for the design of
components were issued in the project (De Kok et
al., 2010) to help the modellers with their task and
ensure a certain degree of reusability of the
delivered components. The practical implementation
of the design guidelines turned out to be less
straightforward than expected, and some interesting
lessons can be drawn from the project. Here we take
a few examples of component linking and reuse to
reflect on the scientific and technical difficulties.
2 DESIGN APPROACH
The majority of environmental modellers are less
familiar with component-based design, because it is
not their first priority. The common practice is that
models expand gradually and iteratively in terms of
the functionalities included while gaining in
complexity. Frequent problems with the early
deliveries to the model library in this project
included a lack of separation of models and data,
excessive and inappropriate use of connectors,
overcomplexity, inadequate documentation and
testing, and functionalities that were too much
dependent on the case study modelled. The
advantages and general principles of component-
based modelling therefore had to be clarified by
means of tutorial examples taken from different
application domains. A literature review of the
design criteria that were mentioned earlier formed
the starting point for a number of more concrete,
project-focused guidelines and templates to
standardize the design process and avoid the
common pitfalls. Domain-independent components
with functionalities related to up- and downscaling,
user dialogues, im- and export of data, encryption,
statistics etc. were developed to support the project
teams with the design and polishing of their
simulation models. For organizational reasons the
majority of the components were designed by means
of a top-down procedure, and derived from the
simulation models at a late stage in the project. The
advantage of this approach is that the modelling
experience and data needed for the calibration of the
components were available, and the priorities were
clearer. On the other hand, the design of the
simulation models could not fully benefit from the
component-based design approach, compared to a
bottom-up approach.
Repeated exchanges to obtain feedback from the
support team and more experienced modellers
helped the project teams with the polishing and
improvement of their components. The approach for
designing the model components addressed the
following aspects:
1. First, it was necessary to identify which
functionalities could be useful to others. Here,
functionality is defined to be the modelled process
with in- and outgoing state variables. An example is
a component which describes the population
dynamics of a fish stock, with the fishing effort as
input and stock size as output variable. The
mathematical and visualization tools available in the
standard ExtendSim® libraries are typical examples
of components with a high degree of reusability, but
pertain to a low level of model detail. More complex
and process oriented components were needed to
reduce the effort required for developing a new
simulation model. On the other hand, components
SIMULTECH 2011 - 1st International Conference on Simulation and Modeling Methodologies, Technologies and
Applications
104
Figure 1: Icon-based (left) and ModL coded (right) component for logistic population growth.
which are too complex and case-dependent can be
expected to be less useful for application in other
modelling studies. Choosing the appropriate level of
detail, also referred to as the granularity (Donatelli
et al., 2008) of a component is essential. Screening
resulted in a tentative list of over 80 candidate
components pertaining to different model domains
and levels of detail. These components were
classified in five subcategories: ecological,
economic, social, physical, and domain-independent
support components. Fig. 2 shows an example of a
phytoplankton dynamics component from the
ecological sublibrary.
2. The technical implementation was relatively
straightforward once the functionality of a
component had been specified, using the supporting
graphical tools available in ExtendSim®. The next
step was then to restructure the component and
remove redundant connectors and model-specific
parameters as much as possible, which would
otherwise impede the connection to components
with complementary functionalities. The use of in-
and outgoing connectors was strictly limited to state
variables, whereas model-specific parameters and
input data were stored in databases or set in user
dialogues. The use of global arrays to store and
exchange model parameters was also discouraged to
in order to reduce the model dependence. Instead the
general recommendation made was to separate the
model code as much as possible from the data, use
generic indexing of database records, and add
transparent user dialogs to pass case-specific model
parameters. Some components were extended with
control options to create or access databases on user
demand, thereby increasing the level of flexibility.
3. After restructuring of each component the design
process focused on the layout and documentation.
Standardized templates were developed to ensure a
certain degree of uniformity and proper description
of the functionality, scientific background,
application domain, and references to the
developers. The use of simplified demonstration
applications with sample input was encouraged in
order to clarify the use of a component to other
modellers.
4. Next, the project teams were asked to verify and
test their components, to ensure the reliability, a
prerequisite for use by others. The components were
extracted from the supportive library and preferably
pasted into a blank model worksheet to test the
functionality with different sets of input variables,
whereas model-specific parameters were restricted
to their physical range. These tests included
component linking if possible and meaningful.
5. The general recommendation was to focus on the
genericity and reusability of the components for
other applications and modellers. Components were
reused within and between simulation models and
frequently exchanged among the modellers. A
proper component should allow for changes in use,
such as the number of fish species. Two other design
criteria were equally important but more difficult to
achieve. Although the interoperability of
components has been addressed in the past (Chiang,
2003) this important design criterion received only
limited attention in the project because most of the
simulation models were used to derive components
rather than the other way around. Moreover, the
majority of the study teams delivered only a few
components related to the processes modelled in
their case study. Nevertheless, the study sites were
asked to limit the number of in- and outgoing
connectors and reserve these for the key state
LINKING AND REUSING MODEL COMPONENTS FOR ENVIRONMENTAL SIMULATION
105
Figure 2: Component for phytoplankton dynamics.
variables to improve the interoperability of their
components. The complementarity of the
components was limited by the modelled domains
and processes, with insufficient contributions from
the social and economic sciences to fully meet the
demands for supporting ICZM. The expectation is
that this imbalance will gradually improve once a
wider community of modellers starts using the
model portal.
3 APPLICATIONS
A total of over fifty reusable components had been
delivered by the end of the project, with overlapping
functionalities and a general focus on physical and
ecological functionalities such as light extinction
and algal development. ExtendSim® can
automatically assign a global simulation order to all
components in a model. This can cause problems
after replacing components passing information at
distinct time steps in a hierarchically organized
model. The problem was solved by setting the
simulation order manually. To avoid these problems
such reusable components should verify the proper
and timely passing and initialization of variables. A
tutorial model of complementary components from
different sublibraries was developed to demonstrate
the advantages of component-based modelling for an
intermediate review of the project (Fig. 3). The
simulation model links plankton dynamics to shell
species growth and the income from harvesting.
Adding and linking components, completing the user
dialogues, and importing the databases takes only a
few minutes for this model. Because the components
are taken from different sublibraries and case studies
this example also demonstrates the complementarity
and connectivity of the components.
Powerful database functionalities are available in
ExtendSim® to drive the simulations, read model
input and store model output. A general
template icon
with connectors
documentation template
list of in- and outconnectors ModL com
p
onent scri
p
t
SIMULTECH 2011 - 1st International Conference on Simulation and Modeling Methodologies, Technologies and
Applications
106
Figure 3: Demonstration model linking components from different sub libraries.
recommendation was to let the users of the model set
the path and label input data files via the user dialog,
rather than defining these in the component script
internally. An example is a user dialog (Fig. 4),
based on resizable tables with economic data and
different options to create new or delete existing
tables, with automatic testing of the size of arrays
being im- or exported. The structure of the database
tables automatically determine the number of
economic sectors.
Figure 4: Tutorial example of linked components for
economic input-output analysis and tourism demand.
4 CONCLUSIONS
Component-based simulation of environmental
systems has considerable advantages: models are
easier to design, restructure and maintain, and model
constructs can be exchanged and combined more
easily. The most important design criteria for
reusable components for integrated environmental
simulation are genericity, functional
complementarity, proper documentation, reliability
and modelling framework independence (Rizzoli et
al., 2008; Verbraeck and Valentin, 2008). A web-
based model portal was set up to support the future
exchange, maintenance and documentation of the
reusable components. This portal will be maintained
after the project and a quality assessment of the
deliveries is currently being made. The majority of
the components delivered by the case studies
pertained to ecological processes with less attention
for social and economic applications. Some of the
delivered components, such as those describing the
population dynamics of fish stocks and shell species,
still are to be recombined into more generic tools. A
following step is then to gain wider support for the
model portal to encourage future contributions, in
particular those of the social sciences. Although the
components developed in this project depend on a
specific simulation platform the ModL coded
components can be transferred to a different
modelling framework, for example using enhanced
interface semantics as proposed by Rizzoli et al.
(2008) instead of the user dialogues and databases
which are currently used. Wide acceptance by a
community of domain experts depends on proper
documentation and concrete tutorial applications of
modelling tools targeting an audience including the
less skilled simulation modellers. Although the
simulation environment used in this project
adequately supports component-based modelling it
does not guarantee the reusability of components.
Modellers should become aware of the
consequences of reuse of their work in a different
model context at an early stage of projects. The
general lesson of the project is that the majority of
researchers are still insufficiently familiar with the
concept of modular design, although the advantages
are generally understood. Tutorial examples and
demonstration projects are not sufficient by
themselves to pave the way for component-based
LINKING AND REUSING MODEL COMPONENTS FOR ENVIRONMENTAL SIMULATION
107
modelling of (environmental) systems.
Organizational and technical resources such as the
web-based model portal will be needed to support
the exchange, quality improvement and management
of reusable model components. Whether the existing
model portal should be generally accessible is a
matter of discussion. The open-source concept
seems to be the best way to ensure sufficient and
adequate feedback on the contents of the model
library, a necessity for quality improvement.
Reclassification in functional categories and
screening of existing simulation models will help
identify missing components. A functional model
library should not only include abstract, generic
objects but also abundant concrete tools at a higher
hierarchical level to ensure general acceptance
among domain experts. Ultimately these efforts
should lead to a gradually expanding library of
reusable model components representing processes
from different domains, including those of the
economic and social sciences, to meet the demands
of all potential users.
REFERENCES
Argent, R. M., 2004. An overview of model integration for
environmental applications – components,
frameworks, and semantics. Environmental modelling
& Software 19, 219-234.
De Kok, J. L., Engelen, G., and Maes, J., Towards model
component reuse for the design of simulation models –
a case study for ICZM, Proc. 5
th
Biennial Meeting:
International Congress on Environmental Modelling
and Software. Swayne, D. A., Wanhong Yang, W.,
Voinov, A. A., Rizzoli, A., Filatova, T. (Eds.)
International Environmental Modelling and Software
Society, Ottawa, Canada, July 2010, 1215-1222.
Donatelli, M. and Rizzoli A. E., 2008. A Design for
Framework-Independent Model Components of
Biophysical Systems, Proc. 4
th
Biennial Meeting of
International Environmental Modelling and Software
Society. Sanchez-Marre M., Bejar J., Comas J., Rizzoli
A., and Guariso G. Eds., 727-734.
Papajorgji, P., 2005. A plug and play approach for
developing environmental models – Short
Communication. Environmental Modelling &
Software 20, 1353-1357.
Rizzoli, A., Donatelli, M., Athanasiadis, I. N., Villa, F.,
and Huber, D., 2008. Semantic links in integrated
modelling frameworks. Mathematics and Computers
in Simulation 78, 412-423.
Verbraeck, A. and Valentin, E. C., 2008. Design
Guidelines for Simulation Building Blocks. Proc.
2008 Winter Simulation Conference. Mason S. J., Hill
R. R., Mönch L., Rose, O, Jefferson T. and Fowler J.
W. Eds., 923-932.
Chiang, C. C., 2003. The use of adapters to support
interoperability of components for reusability
Information and Software Technology, Volume 45,
Issue 3(1), 149-156.
SIMULTECH 2011 - 1st International Conference on Simulation and Modeling Methodologies, Technologies and
Applications
108