Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.87 KB

README.md

File metadata and controls

56 lines (42 loc) · 1.87 KB

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.