An open API service indexing awesome lists of open source software.

https://github.com/justinnk/mason-ssa

An extension to the MASON simulation framework introducing agent-based modelling via dependency-aware stochastic simulation algorithms, powered by aspect-oriented programming.
https://github.com/justinnk/mason-ssa

agent-based-modeling agent-based-simulation mason stochastic-simulation-algorithm

Last synced: 13 days ago
JSON representation

An extension to the MASON simulation framework introducing agent-based modelling via dependency-aware stochastic simulation algorithms, powered by aspect-oriented programming.

Awesome Lists containing this project

README

          

:construction: This prototype is in the process of being refined and may exhibit bugs :construction:

# mason-ssa: An SSA extension for MASON

This extension to the [MASON framework](https://cs.gmu.edu/~eclab/projects/mason/) provides facilities to implement agent-based models (ABM) and simulating them via stochastic simulation algorithms (SSAs).
Its key feature is the support of automatic dependency-tracking using an aspect-oriented approach. This way it combines the benefits from both worlds:
**model definition in a general purpose language** (Java) and **increased performance** when inter-agent dependencies can be exploited during a simulation step.
Supported SSAs:

A SIRS Model Display with grid-like contact structure

- First Reaction Method
- Direct Method
- Next Reaction Method (with dependency tracking)
- Direct Method (with dependency tracking)

## Getting Started

### :white_check_mark: Prerequisites

- Maven (tested with 3.8.2)
- Java 8 (or compatible)
- MASON
- the version found on the Maven Central Repository is out of date (14.0)
- Version 20 can be installed from its [GitHub repository](https://github.com/eclab/mason)

### :cd: Installation

- manual
- clone this repository: `git clone https://github.com/justinnk/mason-ssa.git`
- install the extension in your local repository: `mvn clean install`
- from mvn central
- current version on maven central: `0.1.1`
- include the extension as a dependency via maven using the atrifactId `io.github.justinnk.masonssa.`
- have a look at the [demo models](https://github.com/justinnk/mason-ssa-demo.git) for an example pom

### :rocket: Run Demo Model

- clone the demo repository: `git clone https://github.com/justinnk/mason-ssa-demo.git`
- navigate into the created folder: `cd mason-ssa-demp`
- run `sh build.sh && sh run_showcase.sh`
- The script currently only works / is only tested on Linux
- with some adaptions, it should also run on windows
- todo: add batch script

## :arrow_forward: Usage

For an example project, have a look at the [demo repository](https://github.com/justinnk/mason-ssa-demo.git).

1. In your maven `pox.xml` add the following dependencies
```xml


io.github.justinnk.masonssa
extension
0.1.1


io.github.justinnk.masonssa
aspects-base
0.1.1


io.github.justinnk.masonssa
aspects-nrm
0.1.1


io.github.justinnk.masonssa
aspects-odm
0.1.1


```

2. In order to weave the aspects, the following plugin has to be added in the `build>plugins` section of your `pom.xml`
```xml


com.nickwongdev
aspectj-maven-plugin
1.12.6


none
1.8
1.8
1.8

true
true

warning
UTF-8
false



cs.gmu.edu.eclab
mason


io.github.justinnk.masonssa
extension





io.github.justinnk.masonssa
aspects-base



io.github.justinnk.masonssa
aspects-nrm







compile





org.aspectj
aspectjtools
${aspectj.version}



```

3. Now you can use the extension like described in the documentation section

## :book: Documentation

TODO

## Roadmap

- ~~Add the plugin to maven central~~
- set up GitHub CI/CD
- (Re-)implement automatic performance checking for easy testing of improvements
- Improve dependency graph efficiency
- implement capabilities left as future work

## :woman_technologist: :man_technologist: Contributing

Feel free to open issues.
The project is still in the process of being prepared for contributions (i.e. documentation, source-code comments, etc. have to be refined/added).
Once this is done, see [Contributing](CONTRIBUTING.md) for more information.

## :balance_scale: License

This project is distributed under the terms of the Apache-2.0 license, see [LICENSE](LICENSE).
This project makes use of external libraries. Their copyright information can be found in [NOTICES](NOTICES).

## Literature

- Tutorial: [preliminary version](literature/tutorial.pdf)
- Thesis: [abstract](literature/thesis.pdf)
- Paper: [can be found here](https://ssl.linklings.net/conferences/wsc/wsc2021_program/views/includes/files/inv165s3-file1.pdf)

## Cite

This tool was developed as part of a bachelor thesis.
The results were also published in a conference paper:

```
J. N. Kreikemeyer, T. Köster, A. M. Uhrmacher and T. Warnke,
"Inferring Dependency Graphs for Agent-Based Models Using Aspect-Oriented Programming,"
2021 Winter Simulation Conference (WSC), Phoenix, AZ, USA, 2021, pp. 1-12,
doi: 10.1109/WSC52266.2021.9715293.
```
Bibtex:

```
@inproceedings{kreikemeyer2021inferring,
author={Kreikemeyer, Justin Noah and Köster, Till and Uhrmacher, Adelinde M. and Warnke, Tom},
booktitle={2021 Winter Simulation Conference (WSC)},
title={Inferring Dependency Graphs for Agent-Based Models Using Aspect-Oriented Programming},
year={2021},
publisher={IEEE},
volume={},
number={},
pages={1-12},
doi={10.1109/WSC52266.2021.9715293}
}
```