Jump to content

SIM.JS: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
External links: , Added Link to 2016 Master Thesis on Tape Library Modeling and Simulation
Added reference to a 2018 Winter Simulation Conference paper
 
(6 intermediate revisions by 6 users not shown)
Line 22: Line 22:
| genre = [[Discrete event simulation]]
| genre = [[Discrete event simulation]]
| license = [[LGPL]]
| license = [[LGPL]]
| website = {{URL|simjs.com}} {{URL|https://code.google.com/p/simjs-source/}}
| website = {{URL|https://simjs.z5.web.core.windows.net/}} {{URL|https://code.google.com/p/simjs-source/}}
}}
}}


Line 34: Line 34:
number of examples.
number of examples.


SIM.JS is released as [[open source]] software under the [[LGPL]] license. The first version was released in January 2011.
SIM.JS is released as [[Open-source software|open source]] software under the [[LGPL]] license. The first version was released in January 2011.


== Example ==
== Example ==


There a several examples bundled with the library download. Traffic light simulation is a standard simulation problem, which may be simulated as within this example:
There are several examples bundled with the library download. Trafficlight simulation is a standard simulation problem, which may be simulated as within this example:
{{sxhl|2=js|1=

function trafficLightSimulation(GREEN_TIME, MEAN_ARRIVAL, SEED, SIMTIME) {
function trafficLightSimulation(GREEN_TIME, MEAN_ARRIVAL, SEED, SIMTIME) {
var sim = new Sim();
var sim = new Sim();
Line 64: Line 64:
}
}
};
};
}}


== External links ==
== External links ==
* [http://www.theorsociety.com/Pages/ImagesAndDocuments/documents/Conferences/SW12/Papers/ByrneListonGeraghtyYoung.pdf Analysis of the potential role of open source discrete event simulation software in the manufacturing sector issued by Proceedings of the Operational Research Society Simulation Workshop 2012 comparing SIM.JS among other open source simulation solutions]
* [http://www.theorsociety.com/Pages/ImagesAndDocuments/documents/Conferences/SW12/Papers/ByrneListonGeraghtyYoung.pdf Analysis of the potential role of open source discrete event simulation software in the manufacturing sector issued by Proceedings of the Operational Research Society Simulation Workshop 2012 comparing SIM.JS among other open source simulation solutions]
* [https://web.archive.org/web/20141213023557/http://comserv.cs.ut.ee/forms/ati_report/downloader.php?file=391A6E9067929FF1718AD2745CFC02115FD92584 Bachelor thesis on Web-Based Single-Player Project Simulation Game reviewing SIM.JS]
* [http://centreofexcellence.net/J/JSS/Vol4/No2/JSSarticle3,4(2)pp770-794.pdf Applications of Queues in Hospitals in Istanbul by University of Bingöl using SIM.JS]
* [https://web.archive.org/web/20150220110412/http://serc2cdn1.mannadesignworks.netdna-cdn.com/wp-content/uploads/2014/05/SERC-RT-122-Phase-I-Technical-Report-2014-TR-048-1-20140930.pdf Interactive Model-Centric Systems Engineering report by Systems Engineering Research Center managed by Stevens Institute of Technology mentioning SIM.JS]
* [http://comserv.cs.ut.ee/forms/ati_report/downloader.php?file=391A6E9067929FF1718AD2745CFC02115FD92584 Bachelor thesis on Web-Based Single-Player Project Simulation Game reviewing SIM.JS]
* [https://ieeexplore.ieee.org/abstract/document/8632357 "Just-In-Time parallel simulation" compares simulation programmed in JIT languages versus AOT languages referencing SIM.JS]
* [http://serc2cdn1.mannadesignworks.netdna-cdn.com/wp-content/uploads/2014/05/SERC-RT-122-Phase-I-Technical-Report-2014-TR-048-1-20140930.pdf Interactive Model-Centric Systems Engineering report by Systems Engineering Research Center managed by Stevens Institute of Technology mentioning SIM.JS]
* [http://wr.informatik.uni-hamburg.de/_media/research:theses:jakob_l__ttgau_modeling_and_simulation_of_tape_libraries_for_hierarchical_storage_management_systems.pdf Modeling and Simulation of Tape Libraries for Hierarchical Storage Management Systems, Master Thesis reviewing DES frameworks, including SIM.JS]
* [http://wr.informatik.uni-hamburg.de/_media/research:theses:jakob_l__ttgau_modeling_and_simulation_of_tape_libraries_for_hierarchical_storage_management_systems.pdf Modeling and Simulation of Tape Libraries for Hierarchical Storage Management Systems, Master Thesis reviewing DES frameworks, including SIM.JS]



Latest revision as of 18:36, 25 September 2023

SIM.JS, a free discrete-event simulation package based on JavaScript
Original author(s)Maneesh Varshney
Developer(s)Maneesh Varshney
Stable release
0.26 / January 16, 2012; 12 years ago (2012-01-16)
Written inJavaScript
Operating systemCross-platform
TypeDiscrete event simulation
LicenseLGPL
Websitesimjs.z5.web.core.windows.net code.google.com/p/simjs-source/

SIM.JS is an event-based discrete-event simulation library based on standard JavaScript. The library has been written in order to enable simulation within standard browsers by utilizing web technology.

SIM.JS supports entities, resources (Facility, Buffers and Stores), communication (via Timers, Events and Messages) and statistics (with Data Series, Time Series and Population statistics).

The SIM.JS distribution contains tutorials, in-depth documentation, and a large number of examples.

SIM.JS is released as open source software under the LGPL license. The first version was released in January 2011.

Example

[edit]

There are several examples bundled with the library download. Trafficlight simulation is a standard simulation problem, which may be simulated as within this example:

function trafficLightSimulation(GREEN_TIME, MEAN_ARRIVAL, SEED, SIMTIME) {
    var sim = new Sim();
    var random = new Random(SEED);
    var trafficLights = [new Sim.Event("North-South Light"),
                         new Sim.Event("East-West Light")]; 
    var stats = new Sim.Population("Waiting at Intersection");
    
    var LightController = {
        currentLight: 0,  // the light that is turned on currently
        start: function () {
            sim.log(trafficLights[this.currentLight].name + " OFF"
                    + ", " + trafficLights[1 - this.currentLight].name + " ON");
            sim.log("------------------------------------------");
            // turn off the current light
            trafficLights[this.currentLight].clear();
            // turn on the other light.
            // Note the true parameter: the event must "sustain"
            trafficLights[1 - this.currentLight].fire(true);
            // update the currentLight variable
            this.currentLight = 1 - this.currentLight;
            // Repeat every GREEN_TIME interval
            this.setTimer(GREEN_TIME).done(this.start);
        }
    };
[edit]