Simulation Environment for the JavaScript Agent Machine

Introduction

The design and technological implementation of smart adaptive materials is a challenge. Fundamental concepts has to be proven before any real system can br developed. Due to the strong coupling of sensing, reactive control, and information processing a multi-domain and multi-scale simulation has to be performed.

Combining physical world with MAS simulation is a challenge. Such a multi-domain simulation enables the direct derivation of sensor data from a physical model (sensing part) provision to a computational system, and the investigation of the action of this computational system on the physical system (actuating part). The goal of this multi-domain simulation is to investigate the behaviour of MAS on dynamic (or semi-static) changes of mechanical structures and vice versa.

The physical world consists of the mechanical structure given by a physical model (FEM or mass-spring multi-body), sensors, and external loading having impact on the static and dynamic reaction of the structure, including gravity. For the sake of simplicity, the mechanical structure under test is modelled with a mass-spring multi-body system. The multi-body physics simulation is well known from computer games and animations. It can be easily and efficiently integrated in computational systems like MAS simulators.

To this end, the SEJAM simulator (JAM platform + GUI + simulation control) was extended with a modified physics engine (based on Cannon.js and Three.js) enabling the direct coupling of the physical model with the computation of agents. The JAM platform and the SEJAM simulator are entirely implemented in JavaScript, executed with the Node Webkit (node.js+Chromium HTML browser).

A simulation model consists basically of three parts: (1) The MAS behaviour models; (2) The JAM virtual network world; (3) The phyiscal model. All parts are specified in JavaScript. In this environment, the physical model can be accessed by all agents. A distributed MAS simulation consists of node and worker agents executed on different virtual JAM nodes. There is commonly one artificial agent (world agent) representing the world and managing the simulation, i.e., generating and updating sensor data accessed by the node and worker agents by using the unified tuple-space interface. The world agent can read and modify physical simulation variables, i.e., reading strain, force parameters, and setting material/structure properties (e.g., stiffness).

sejam-arch