View on GitHub

agentscript

An Agent Based Modeling system (ABM)

AgentScript

AgentScript is a minimalist Agent Based modeling system based on NetLogo semantics.

It has a Model/View/Control (MVC) architecture which cleanly separates the three components.

Modern JavaScript

AgentScript is entirely ES6 Module based with import and export statements.

This allows direct access to individual modules which will automatically load only the module and its dependencies.

Example: to import Class Model for building your own model, use:

import Model from ‘./path/to/agentscript/src/Model.js’

.. where path/to/agentscript is a local file system path or a url to a server:

To create your own local agentscript files:

Files

Our directory layout is:

The core agentscript directories:

Use of the models in one-page html demos, called “onepagers”

Developer directories:

Click on the directory name to see it on github. Click on the individual file names to see them nicely formatted.

Run the demos in the directories mentioned above.

The Models directory contains the individual Models JavaScript files exporting a Model. It is the only directory with .js files, the rest are “onepagers” .html files. Notice the links use “query parameters” that the index.html file uses to run the model. The output is a random sample of the model’s results.


Several tests for accessing README’s. Note models also has an index.html so will run the hello model when pointing at a dir. For that case, this works. models


Absolute URL to READMEs


models

views2

views3

gis

docs


Relative URL to READMEs


models

views2

views3

gis

docs


Absolute URL to Dir


models

views2

views3

gis

docs


Relative URL to Dir


models

views2

views3

gis

docs


Absolute URL to Github Repo


models

views2

views3

gis

docs

Developer Information

To clone the github repo:

All workflow is npm run scripts. See package.json’s scripts, or use yarn/npm run for a list. JavaScript Standard Style is used.

License

Copyright Owen Densmore, RedfishGroup LLC, 2012-2020
AgentScript may be freely distributed under the GPLv3 license:

AgentScript is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program, see LICENSE within the distribution. If not, see http://www.gnu.org/licenses/.