function simStep() {
if (isRunning) {
// Chunk of code was here, deleted for clarity.
if (enteredPassengers < passengerCount) {
removeDynamicAgents();
addDynamicAgents();
updateDynamicAgents();
} else if (exitedPassengers < passengerCount) {
removeDynamicAgents();
updateDynamicAgents();
} else {
/*
Chunk of code was here, deleted for clarity.
Mainly to stop the simulation and to re-run if multiple simulations
were configured.
*/
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter