Skip to content

A JavaSciprt port of SimPy, process-based discrete event simulation framework.

License

Notifications You must be signed in to change notification settings

uia4w/uia-simjs

Repository files navigation

UIA-SIM for JavaScript, DESim4JS

Build Status codecov Codacy Badge License

DESim4JS is a JavaScript port of SimPy, process-based discrete event simulation framework.

DESim4JS aims to port the concepts used in SimPy to the JavaScript world.

Examples

A simple example:

var env = new desim.Env(); 
var bell = env.event("bell");
env.process("John", function *() {
    while(true) {
        let state = yield bell;
        if(state === "end") {
            console.log("\\o/");
        } else {
            console.log("|o|");
        }
    }
});
env.process("School", function *() {
    while(true) {
        yield env.timeout("in", 40);
        bell.succeed("end");
        bell = env.event("bell");

        yield env.timeout("out", 10);
        bell.succeed("begin");
        bell = env.event("bell");
    }
});

env.run(250);

Develop References

Setting up your test environment with Tape and Codecov in Node.js

Codecov Bash uploader in CI

Integrating nyc with codecov.io

Testing your Node.js application with tape

Travis CI

Codecov token environment variable: CODECOV_TOKEN.

About

A JavaSciprt port of SimPy, process-based discrete event simulation framework.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published