This project uses the Repast Simphony JZombies Model, taken from the Repast Java Tutorials and shows how to use Repast Simphony (almost) without Eclipse.
This is especially useful, when the model is built in a ci pipeline or one wants to use another IDE, like Intellij IDEA.
The approach is developed and widely used by the team of the topic field Cognitive Social Simulation of the Research Department Smart Data & Knowledge Services at DFKI.
git clone https://github.com/DFKI/Repast-Simphony-Ant.git
Install adoptopenjdk11
To run and build the model, Repast Simphony Runtime Libraries are needed. It is sufficient to just download (and unzip)
the plugins folder. Alternatively you can use your local
installation of Repast Simphony 2.9 .
plugins folder. For Eclipse under macOS the path can look like/Applications/Repast Simphony 2.9.0/Eclipse.app/Contents/Eclipse//), on Windows tooantJAVA_HOME environment variable to your adoptopenjdk11 installationClone the Repository
ant build "-Dplugins_loc=[/absolute/path/to/plugins]" "-Dmodel_loc=[relative/path/to/model.rs]"
ant run-model "-Dplugins_loc=[/absolute/path/to/plugins]" "-Dmodel_loc=[relative/path/to/model.rs]"
ant run-model "-Dplugins_loc=/Applications/Repast Simphony 2.9.0/Eclipse.app/Contents/Eclipse/" "-Dmodel_loc=./JZombies_Demo.rs"
ant run-batch "-Dplugins_loc=[/absolute/path/to/plugins]" "-Dmodel_loc=[relative/path/to/model.rs]" "-Dargs=-hl -r -model_dir [/absolute/path/to/project/root] -b batch/batch_params.xml -o output -c batch_config.properties"
ant build "-Dplugins_loc=[/absolute/path/to/plugins]" "-Dmodel_loc=[relative/path/to/model.rs]"
ant debug-model "-Dplugins_loc=[/absolute/path/to/plugins]" "-Dmodel_loc=[relative/path/to/model.rs]"
ant run-batch "-Dplugins_loc=[/absolute/path/to/plugins]" "-Dmodel_loc=[relative/path/to/model.rs]"
ant run-model "-Dplugins_loc=[/absolute/path/to/plugins]" "-Dmodel_loc=[relative/path/to/model.rs]"
Reference to Repast Server: https://repast.github.io/docs/RepastNG/browser.html
docker-compose up -d --build
Go to http://localhost:5000
CMD in the docker-compose.yml
build.xml file in the project root and set it as Ant Build File from the context menuAnt View and edit the properties of the build Ant Targetplugins_loc property with the path to the plugins folder as valuemodel_loc property with the value ./JZombies_Demo.rs
build Ant Targetrun-* Ant TargetsExample for run-model:
Create Run ConfigurationBefore Launch remove the default Build process and dd the build Ant Target
Under File > Project Structure > Project Settings > Modules > JZombies_Demo > Dependencies
lib folder in the project rootrepast.simphony.bin_and_src.jar from the plugins
folder: [path_to_plugins]/plugins/repast.simphony.bin_and_src_2.9.0/repast.simphony.bin_and_src.jar
Remote JVM Debug run configuration (the default settings should be correct)debug-model Ant TargetDebugger