Introduction to simulation using JavaScript

JavaScript is a dynamic functional object-oriented programming language that can not only be used for enriching a web page, but also for implementing various kinds of web applications, including web-based simulations, which can be executed on front-end devices, such as mobile phones, tablets and desktop computers, as well as on powerful back-end computers, possibly in some cloud infrastructure. Although JavaScript cannot compete with strongly typed compiled languages (such as C++, Java and C#) on speed, it provides sufficient performance for many types of simulations and outperforms its competitors on ease of use and developer productivity, especially for web-based simulation. This tutorial provides a two-fold introduction: to JavaScript programming using the topic of simulation, and to simulation using the programming language JavaScript. It shows how to implement a Monte Carlo simulation, a continuous state change simulation and a discrete event simulation, using the power of JavaScript and the web.

Agent-based modeling: an introduction and primer

Agents are self-contained objects within a software model that are capable of autonomously interacting with the environment and with other agents. Basing a model around agents (building an agent-based model, or ABM) allows the user to build complex models from the bottom up by specifying agent behaviors and the environment within which they operate. This is often a more natural perspective than the system-level perspective required of other modeling paradigms, and it allows greater flexibility to use agents in novel applications. This flexibility makes them ideal as virtual laboratories and testbeds, particularly in the social sciences where direct experimentation may be infeasible or unethical. ABMs have been applied successfully in a broad variety of areas, including heuristic search methods, social science models, combat modeling, and supply chains. This tutorial provides an introduction to tools and resources for prospective modelers, and illustrates ABM flexibility with a basic war-gaming example.

Harnessing advances in computer simulation to inform policy and planning to reduce alcohol-related harms

Alcohol misuse is a complex systemic problem. The aim of this study was to explore the feasibility of using a transparent and participatory agent-based modelling approach to develop a robust decision support tool to test alcohol policy scenarios before they are implemented in the real world. Methods A consortium of Australia’s leading alcohol experts was engaged to collaboratively develop an agent-based model of alcohol consumption behavior and related harms. As a case study, four policy scenarios were examined.

A Hybrid System Dynamics-Discrete Event Simulation Approach to Simulating the Manufacturing Enterprise

With the advances in the information and computing technologies, the ways the manufacturing enterprise systems are being managed are changing. More integration and adoption of the system perspective push further towards a more flattened enterprise. This, in addition to the varying levels of aggregation and details and the presence of the continuous and discrete types of behavior, created serious challenges for the use of the existing simulation tools for simulating the modern manufacturing enterprise system. The commonly used discrete event simulation (DES) techniques face difficulties in modeling such integrated systems due to increased model complexity, the lack of data at the aggregate management levels, and the unsuitability of DES to model the financial sectors of the enterprise. System dynamics (SD) has been effective in providing the needs of top management levels but unsuccessful in offering the needed granularity at the detailed operational levels of the manufacturing system. On the other hand the existing hybrid continuous-discrete tools are based on certain assumptions that do not fit the requirements of the common decision making situations in the business systems.

Argus Invasive Species Spread Model Constructed Using Agent-based Modeling Approach and Cellular Automata

The stochastic Argus Invasive Species Spread Model (AISSM) is constructed using an Agent-Based Modeling (ABM) approach with cellular automata (CA) to account for spatial relationships and changes in those relationships over time. The model was constructed to support a wide range of geographical locations; however, this paper focuses on its application in the state of California. A timeseries of daily historical weather observations on a 6- kilometer grid was obtained for six weather variables important to insect and disease development. Weather conditions were then simulated using the K- nearest neighbor (K-nn) regional weather generator. The weather simulations were summarized into a monthly time-step and coupled with satellite land cover imagery to identify a habitat quality for each simulated month. This information was combined with the introduction of invasive species in the AnyLogic™ modeling environment. The spread of invasive species is driven by the habitat quality layer, which regulates its dispersal rate.

A Simulation-Based Investigation of Freight Transportation Policy Planning and Supply Chains

Regional freight transportation policy planning is a difficult task, as few policy-planners have adequate tools to aid their understanding of how various policy formulations affect this complex, socio-technical system. In this paper, we develop a proof-of-concept model to simulate the impacts of public policies on freight transportation in a simulated region. We use the techniques of multi-disciplinary system design and optimization to analyze the formulation of regional freight transportation policies and examine the relative effects of policies and exogenous forces on the region in order to provide insight into the policy-planning process. Both single objective and multi-objective analysis is performed to provide policy-planners with a clear understanding of the trade-offs made in policy formulation.

An Object-oriented Process Flow Approach to ARGESIM Comparisons "Flexible Assembly System" with AnyLogic

Simulator: AnyLogic is an object-orientated, general-purpose simulator for discrete, continuous and hybrid applications. It supports modelling with UML – RT and the underlying modelling technology is based on Java. Since Version 4.5 AnyLogic provides different advanced libraries as the Enterprise Library which implements often used discrete model object classes like sources, conveyors, and sinks.  Model: As the Comparison addresses the possibility to define and combine submodels, the objectoriented approach of AnyLogic, using the Enterprise Library, seems natural. The model consists of eight stations connected by some conveyors (all predefined in the Enterprise Library). 

An Object-oriented Numerical Solution to ARGESIM Comparison “SCARA Robot” using AnyLogic

Simulator: AnyLogic is able to handle continuous, discrete and hybrid models. It is based on JAVA and therefore object-oriented. It offers drag-and-drop dialogues for the basic parts of the model’s structure as well as for animation. Everything needed is created as an instance of the ActiveObject class, starting with the ‘root’ class which represents the model to state variables (the ‘important’ variables which can appear on the left-hand side of an ODE and can be plotted), statecharts and animation.

An Object-oriented Hybrid Approach to ARGESIM Comparison "Crane and Embedded Control" with AnyLogic

Simulator: AnyLogic is a general-purpose simulation environment for discrete, continuous and hybrid systems. It employs UML-RT structure diagrams for building hierarchical models in object-oriented way and hybrid statecharts for behaviour specification. The generated model is Java and can be extended with user’s Java code. The simulation engine handles discrete events and dynamically changing sets of algebraic-differential equations. It automatically detects “change” (or “state”) events. Debugging and visualization facilities are present.