OES JavaScript Core 2 Simulator Inspect Download
The OESjs Core 2 simulator implements an architecture for Object Event Simulation (OES) that extends the OESjs Core 1 simulator by adding support for activities, which may be resource-constrained.
The Activities extension includes the following additional code (files): (1) OES-Activities.js in the framework folder, (2) the sim.stat.initialize function in framework/simulator.js, (3) an extension of the oes.ui.showStatistics function in framework/simulatorUI.js
Simulation Examples
Service-Desk-AN
This minimal Activity Network model consists of two nodes: an initial event node for recurrent "CustomerArrival" events and an activity node for "Service" activities, which require a service desk as a (performer) resource.
Workstation-2
An Activity Network with a single activity node representing a single server queuing system model consisting of the object type WorkStation, the event type PartArrival, and the resource-constrained activity type Processing, which has the resource role workStation expressing that a Processing activity requires a workstation as a resource.
Pizza-Service-1
A single server queuing system model consisting of the object type "PizzaService", the event type "Order", and the simple activity type "MakePizza".
Pizza-Service-2
A single server queuing system model consisting of the object type "PizzaService", the event type "Order", and the resource-constrained activity type "MakePizza", which has the resource role "pizzaService" expressing that a "MakePizza" activity requires a pizza service company as a resource.
Make-and-Deliver-Pizza-AN-1
An activity network model consisting of the object types "OrderTaker" and "PizzaMaker", the event type "OrderCall", and the activity types "TakeOrder", "MakePizza" and "DeliverPizza".
Load-Haul-Dump-1
A haul service company has resource pools for dump trucks and wheel loaders. While the activities go to loading site, haul, dump, go back to loading site and go home just require a truck (or a wheel loader) as a resource, load activities require both a truck and a wheel loader.
Forklift-Transport-1
In a forklift transport operation, incoming products of different types are hauled from an arrival area to a destination area. There are different types of operators and each of them can only handle specific types of forklifts, which, in turn, can only transport specific types of products.
Forklift-Transport-2
In this model, which is based on Forklift-Transport-1, the Drive FL home and Walk back home activities can be preempted when a new product arrives and no suitable forklift/operator combination is available.
Medical-Department-1a
This example explicitly models the resource management of doctors with the help of a counter variable
for available doctors in the form of an attribute nmrOfAvailableDoctors
, and the operations
isDoctorAvailable()
, allocateDoctor()
and releaseDoctor()
, in the
MedicalDepartment
class.
Medical-Department-1b
This model is essentially the same as Medical-Department-1a, except that it uses the generic resource management
logic that is built into OES Core 2. The resource pool doctors
is modeled as a count pool,
which abstracts away from individual resources and only counts them.
Medical-Department-1c
In this model, the resource pool doctors
is modeled as an individual resource pool
instead of a count pool. This allows making the model more realistic, for instance, by assigning an
individual work schedule to each doctor defining her availability.
Medical-Department-2a
This model includes two activity types: WalkToRoom activities require a room and are performed by a nurse, while Examination activities also require a room and are performed by a doctor. The resource pools nurses and doctors are modeled as individual resource pools, while the resource pool rooms, which is used by both WalkToRoom and Examination activities, is modeled as a count pool.
Medical-Department-2b
This model is the same as Medical-Department-2a, except that Examination activities require a room, two nurses and a doctor.
Credits
OESjs Core 2 is using:
- David Bau's seedable random number generator seedrandom.
- Jake Archibald's IndexedDB library IDB for storing experiment data.