Ants, but small.
Get a Galapagos instance running on port 9000. Galapagos commit ec944e6fd8 is confirmed to work.
cd rust
cargo run bench # Generates a performance metric
cargo run json # Dumps out a JSON file into the root of this repocd scala
sbt "run bench" # Generates a performance metric
sbt "run json" # Dumps out a JSON file into the root of this repocd typescript
npm install
npm run buildThis one allows you to run against a headless version of the actual NetLogo desktop application.
cd headless
sbt 'run "../Ants.nlogox"'Unlike the other options here, you cannot see it run in the browser. Its functionality could be expanded to hook into the mirroring stuff used by the Tortoise tests, so that you could render the mirroring output as JSON and read it in the browser. But this is left as an exercise for the reader.
From the root of the repository, launch an HTTP server, like this:
python3 -m http.server 8080Then:
- Navigate to http://localhost:8080 in your browser
- Click "Setup"
- Click "Go"
This will allow you to watch the TypeScript version in action.
You can click "Benchmark" and wait ~20 seconds, and you will eventually get a pop-up that tells you how many milliseconds it took to run the TypeScript version of the model.
You can click "Play Recording (Scala)" to watch a JSON file that was exported by Scala. It is expected to be found at the URL /microtortoise-data-scala.json. A similar thing can be done (presumably, for TypeScript) by getting another data file hosted at the URL /microtortoise-data.json. Such a recording can be created with the "Make Recording" button.