Simulation and Modelling Presentation You research and find a PROBLEM THAT NEEDS TO BE MODELED. The research necessary to find a real-world problem.
You will write up the problem in a SHORT PAPER/AND OR OUTLINE, use a POWERPOINT presentation. The idea is that you have identified a real problem and are going to use one of the modeling techniques in Insight Maker to help explain and solve the problem.
Follow the .jpg files for Assignment and PPT requirements.
PLEASE FOLLOW THE BELOW LINK FOR AN EXAMPLE.
Please follow this link for Modeling types and example with flu model: https://insightmaker.com/book/export/html/38 Simulation Modelling Practice and Theory 47 (2014) 28–45
Contents lists available at ScienceDirect
Simulation Modelling Practice and Theory
journal homepage: www.elsevier.com/locate/simpat
Insight Maker: A general-purpose tool for web-based modeling
& simulation
Scott Fortmann-Roe
University of California, Berkeley, Department of Environmental Science, Policy, and Management, 130 Mulford Hall, Berkeley, CA 94720-3114, United States
a r t i c l e
i n f o
Article history:
Received 29 April 2013
Received in revised form 23 March 2014
Accepted 26 March 2014
Available online 14 June 2014
Keywords:
Modeling
Simulation
Web-based technologies
System Dynamics
Agent-Based Modeling
a b s t r a c t
A web-based, general-purpose simulation and modeling tool is presented in this paper. The
tool, Insight Maker, has been designed to make modeling and simulation accessible to a
wider audience of users. Insight Maker integrates three general modeling approaches –
System Dynamics, Agent-Based Modeling, and imperative programming – in a unified
modeling framework. The environment provides a graphical model construction interface
that is implemented purely in client-side code that runs on users’ machines. Advanced features, such as model scripting and an optimization tool, are also described. Insight Maker,
under development for several years, has gained significant adoption with currently more
than 20,000 registered users. In addition to detailing the tool and its guiding philosophy,
this first paper on Insight Maker describes lessons learned from the development of a complex web-based simulation and modeling tool.
Ó 2014 The Author. Published by Elsevier B.V. This is an open access article under the CC BY
license (http://creativecommons.org/licenses/by/3.0/).
1. Introduction
The field of modeling and simulation tools is diverse and emergent. General-purpose modeling tools (e.g. MATLAB’s
Simulink or the Modelica language [1]) sit beside highly focused and domain-specific applications (e.g. [2] for modeling
network control systems, [3] for simulating the behavior of wireless network routing protocols, or [4] for the simulation
and control of turbines). Interest in and published works on such tools has grown over time. The ISI Web of Knowledge
reports a substantial growth in papers published on modeling or simulation tools with 299 such papers published in the span
of 1985–1989, 1482 published from 1995 to 1999, and 3727 published from 2005 to 2009.1
For end-users, simulation and modeling tools are generally designed as executables to be run on a consumer operating
system such as Windows or Mac OS X. With the expansion of the Internet and the ubiquity of the World Wide Web, new
possibilities to harness this communication technology and platform to develop rich collaborative modeling tools have
become available. One major review of the opportunities and issues faced when utilizing web-based technologies as part
of a simulation or modeling application has been [5]. However, technology has advanced rapidly in the period since the publication of that review. Competition among technology companies such as Apple, Microsoft and Google has led to a rapid
increase in the availability of advanced features in web browsers and significant performance enhancements in these same
browsers (these improvements are documented at sites such as http://AreWeFastYet.com and http://html5test.com). Such
improvements have changed what is effectively possible in the browser. Where [5] note that web-based technologies were
1
E-mail address: ScottFR@berkeley.edu
The exact search query used was ‘’’modeling tool’’ OR ‘‘simulation tool’’’ in the Topic field.
http://dx.doi.org/10.1016/j.simpat.2014.03.013
1569-190X/Ó 2014 The Author. Published by Elsevier B.V.
This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/3.0/).
S. Fortmann-Roe / Simulation Modelling Practice and Theory 47 (2014) 28–45
29
not well suited to ‘‘local simulation and visualization’’ – running all simulation code on an end-user’s machine – that is no
longer the case as the work presented here demonstrates.
Other work on the intersection between simulation and modeling tools and web-based technologies includes but is not
limited to, [6] who develop a simulation–optimization platform for industrial applications, [7] who propose a framework for
online collaborative modeling and simulation an approach to environment construction adaptable across multiple domains,
[8] who study the execution of simulations in cloud-based platforms, and [9] who explore collaborative model integration in
a distributed environment. What is missing from earlier work, however, is a realization of a general-purpose simulation
environment developed using web-based technologies targeted first at a general audience.
Web-based technologies are especially beneficial to non-experts as they can significantly reduce the costs required for
a new user to experiment with and learn about a simulation and modeling tool. Simulation and modeling tools have been
shown to be useful instructional devices (e.g. [10] who used a simulation tool in the economics classroom or [11] for
examples of work in primary schools). By developing web-based simulation and modeling tools, the accessibility of these
tools can be increased both within the classroom and outside it. A layperson considering modeling may be adverse to
downloading and installing modeling and simulation software on a personal computer (due to fear of viruses and other
concerns). On the other hand, the same person may be more willing to open a simple web page that contains a simulation
model or embedded model construction interface. Lowering barriers to entry make it possible to engage more people in
modeling and simulation, potentially leading to societal benefits as a result of an increased usage and understanding of
modeling.
The rest of this paper presents the simulation and modeling tool Insight Maker (available at http://InsightMaker.com). It
is a free, open-source modeling and simulation tool developed using web-based technologies and supports graphical model
construction using multiple paradigms. The software is designed primarily to be as accessible to the layperson as possible,
but also contains significant advanced modeling tools such as embedded scripting capabilities and an optimization toolset.
Insight Maker was made public at the end of 2009 and has undergone continual development and evolution since then. Since
its release, the tool has gain over 20,000 registered users. The feedback from these users has helped set the course for the
direction and development of the tool.
The remaining sections of this paper first describe the philosophy and design principles of the simulation and modeling
tool. Next the architecture of the tool is detailed. As a web-based technology, the tool includes both server-side and clientside components and this architecture is discussed. Particular attention is paid to the benefits offered and compromises
required to successfully implement a complex tool such as Insight Maker in a web-based environment. Finally, given that
the tool has undergone multiple years of iteration and development based on user feedback and benchmarks of user adoption, conclusions and lessons learned from this evolution are also presented.
2. Guiding principles
It can be argued that three basic criteria should be used when assessing a tool or environment used to develop simulation
and models: performance, features, and accessibility. A high-performing environment is one that executes simulations
quickly with minimal resource requirements. Features are capabilities and high-level functionality in the simulation and
modeling tool. Accessibility indicates how easy it is to learn or use an environment. There are generally tradeoffs among
these criteria in the face of a fixed amount of development resources:
Performance versus features: Adding features to the simulation tool may often result in a negative impact on performance.
In addition to software ‘‘bloat’’, certain features may require computational overhead during simulations or make it more
difficult to implement some types of optimizations.
Performance versus accessibility: Making a simulation program accessible to users often requires utilizing higher-level
concepts divorced from the underlying machine hardware. An environment’s ability to convert higher-level concepts
to efficient machine code vary, but in general, accessible higher-level environments will have reduced performance when
compared to less accessible, lower-level environments.
Accessibility versus features: A baseline of features is important to make a simulation program accessible for users (e.g. a
Graphical User Interface). However, many features added to simulation software are targeted at specific subsets of users
and offer little value to the average user. Excess features that lead to ‘‘bloat’’ may result in user frustration or the feeling of
being overwhelmed [12].
Performance versus accuracy: One final tradeoff is between performance and accuracy, as they are often inversely correlated. This tradeoff may often be exposed directly to users allowing them to determine how to balance these competing
goals.
Although tradeoffs may be mitigated through increased development time or resources, the choices developers make
about these tradeoffs are key in defining their simulation programs and environments (Fig. 1). As an example, models
and simulations may be developed in raw assembly as machine processor instructions. Such models should have excellent
performance, but their development would be highly difficult as assembly is inaccessible and has a minimal built-in feature
set. At the cost of some performance, higher-level development environments such as C++ are alternatives. Higher-level tools
30
S. Fortmann-Roe / Simulation Modelling Practice and Theory 47 (2014) 28–45
Fig. 1. Conceptual illustration of priority tradeoffs for simulation and modeling tools.
offer increased accessibility and features, but in exchange are often not able to match the performance of a highly optimized,
lower-level alternative.
Insight Maker prioritizes tradeoffs among performance, accessibility and features in the following way. Accessibility is
given primary priority, followed by features, with performance assigned the lowest priority. Accessibility is the primary goal
of Insight Maker and is central to the design of the tool from the perspective of the overall program architecture (namely, the
choice of implementation as a web application to increase application availability), to small language design choices (such as
the use of case-insensitivity in the language), to cosmetic choices.
The inclusion of a rich feature set is Insight Maker’s second priority. Many tools and capabilities are included in the
program such as a built-in optimizer and scripting language. In adding features, attempts are made not to significantly
increase the apparent complexity of the software; this has meant making those features available for users who desire them
but highlighting a basic set of functionality for newer users who are not immediately interested or able to use the more complex features. An instance of this approach is Insight Maker’s support for measurement units. The simulation engine contains
the ability to associate units with each number in the simulation that are then automatically checked and validated when the
simulation runs. This useful capability can catch a class of equation errors and improve the reliability of models. However, it
can also decrease the accessibility of the software as it requires that users specify the units upfront when constructing a
model, which can be an unnecessarily complex burden for many applications. Thus, the simulator makes units a purely
optional feature in model construction, which the user can ignore or fully engage with depending on their individual skill
level and needs.
The priority that is least focused on in Insight Maker is performance. Significant work has gone into optimizing the
application. Nevertheless, choices made as a result of prioritizing accessibility first and features second make it impossible
to achieve speeds that would be possible if performance had been the primary priority. For instance, the choice of a web
application architecture imposes significant limitations on the application’s performance. As a pure web application, the simulator must use ECMAScript as its primary programming language2 which has good, but not excellent, performance characteristics, being roughly 2–8 times slower than C++ for numerical work [13]. Similarly, specific features may have a performance
cost. For instance, the support of units in Insight Maker requires an aggregate data object to be maintained representing the
results of calculations. This data object has significant performance costs compared to the usage of generic numbers.
3. The application
Insight Maker as a web application means that users run it by accessing a URL through their web browser. The application
provides a number of different services that both mirror what would be found in a traditional desktop application – model
construction and model simulation – but also extend beyond into areas more specific to a web environment – user account
management as well as model searching and sharing. Although the latter services are important to the proper functioning of
the application, they serve a purely bookkeeping role and are not intellectually interesting in the context of modeling and
simulation. Instead, it is the novel simulation and modeling aspects of the application that are the focus of this section
and paper.
Fig. 2 illustrates the primary model construction interface of Insight Maker running within the Google Chrome web browser. The interface is divided into three primary components: the model diagram, the toolbar and the configuration panel. The
model diagram is an interactive illustration of the current model’s structure along with additional UI features such as textual
descriptions, pictures and interactive buttons. Users may select, position and resize elements in the model diagram using an
2
Other languages such as Java and Flash are often used in the browser. However, usage of these technologies require that users have plug-ins installed to
support them. Many users may not.
S. Fortmann-Roe / Simulation Modelling Practice and Theory 47 (2014) 28–45
31
Fig. 2. The primary model construction interface running within the Google Chrome web browser.
input device such as a mouse or, on touch devices such as tablets, their finger. Each item in the model diagram has a set of
attributes associated with it that control its behaviors. The attributes can be configured in the configuration panel. The toolbar at the top of the window provides a number of functions. It contains a selector to add different types of objects to the
model diagram (both for simulation and for descriptive purposes), standard tools for document editing (undo/redo, copy and
paste, etc.), styling options to adjust the appearance of objects in the diagram (coloring and font characteristics), tools to
interface with the simulation, and buttons to save the completed model or start a simulation of the model.
The entire model building and simulation aspect of the application runs within a single web browser window. When a
simulation completes, results are displayed within the same browser window. A number of different display types for results
are available including time series charts, tables, histograms, scatterplots, and two-dimensional maps (Fig. 3). For offline
analysis, users can export results to CSV files. In addition to the display of results, a number of other windows and configuration dialogues open within this main window. By way of example, dialogues to configure an object’s mathematical equation, set simulation time settings, and carry out optimization runs or sensitivity tests all open within this primary window.
The entire contents of this window are defined using standard web technologies such as Hypertext Markup Language
(HTML) and Cascading Style Sheets (CSS).
4. System architecture
The application uses a client–server architecture (Fig. 4), where clients (user computing devices) are connected to the server over the Internet. Users may use the web browser on their machine to connect to the server and load the model construction and simulation environment. The server-side components are responsible for managing user accounts, storing user data
and models, and providing search infrastructure. The client-side components provide model-editing capabilities along with
model simulation and analysis functionalities. Clients do not communicate with one another directly and instead all communication happens through the centralized server.
It is important to note that the client-side code runs the simulation. An alternative would be to place the simulation logic
and code on the server and simply use the client for model construction and the reporting of results. This latter structure
was, in fact, how the application was originally designed. There are tradeoffs between these two approaches. In general,
optimized server-side simulations should be faster than client-side, ECMAScript-powered simulations. For small models,
however, the latency of sending data back and forth to the server may result in a server-side simulation effectively being
slower than client-side simulations. Other trade-offs between server-side and client-side simulations involve issues with
proprietary models (client-side simulation gives the client access to the model, making it impossible to release a model
32
S. Fortmann-Roe / Simulation Modelling Practice and Theory 47 (2014) 28–45
Fig. 3. Example of simulation output displays. Clockwise from upper left: the simulation of the spread of disease in a community, the distribution of two
attributes of individual agents in a simulation, a simulation of world population growth, the simulation of location and connections between individual
agents in a model.
Server
• Stores models
• Manages user accounts
• Manages collaborative
editing
Client
• Model construction
• Simulation
• Result display
Fig. 4. Overview of tool’s client–server architecture.
without also releasing access to the model details) and the effects of software popularity (server-side simulations can
become costly and require the purchasing of additional servers, if the software experiences significant demand; client side
simulation reduces this pressure). Ideally, both server-side and client-side simulation options would be available for the user
to choose between. Unfortunately, this would most likely require maintaining two simulation code bases, which is currently
beyond the scope of the resources available to this project.
In terms of technological choices, the tool uses standard open-source technologies and runs on a generic Linux/Unix
server. As much as possible, existing open-source technologies and solutions were used to minimize costs and increase
the portability of the system. Data are stored on the server in the open-source MySQL database, while the open-source
language PHP and the open-source content management system Drupal are used to store data and implement server-side
application logic. The open-source application Lighttpd is used as the actual server software.
S. Fortmann-Roe / Simulation Modelling Practice and Theory 47 (2014) 28–45
33
Fig. 5. Overview of the simulator architecture.
5. Simulator architecture and capabilities
The simulator portion of Insight Maker is architected modularly in multiple layers, where the higher-level layers depend
on functionality pr…
Purchase answer to see full
attachment