SWEN90004 - Modelling Complex Software Systems - Assignment 2
James Sinclair - 1114278, Yujun Yan - 952112, Junkai Xing - 1041973
- Exported Jupyter notebook has full details of data analysis
Directory structure:
data-analysis
: Jupyter notebooks and output files from data analysisjava-data
: stores results from running Java modelcommit-{hash}
: stores Java output from a given commitinitial-patches
: stores initial grain state of patches
netlogo-data
: BehaviorSpace output of NetLogo wealth distribution modelinitial-world-check
: stores initial grain state of patches for NetLogo models
out
: contains built class filesprops
: properties files as described belowsrc
: source code for Java model
To build the simulation, from the project root:
javac -d out src/World.java src/Turtle.java src/Patch.java src/Heading.java --class-path=src
To run the simulation, from the project root:
java -classpath out World
- can pass properties file as command line argument, otherwise defaults
to
props/wealth-distrib-default.properties
- output CSVs will be named:
- original model:
{properties-file}-seed-{random-seed}.csv
- extension model:
{properties-file}-seed-{random-seed}-inheritance.csv
- original model:
- output CSVs are output in the working directory
java -classpath out World {filename} {random seed} {inheritance flag}
- arg 1: properties filename {string}
- default value =
props/wealth-distrib-default.properties
- e.g.
java -classpath out World props/wealth-distrib-default.properties
- default value =
- arg 2: random number seed {int}
- default value = 0
- If provided, must also pass arg 1.
- e.g.
java -classpath out World props/wealth-distrib-default.properties 10
- arg 3: whether to run models with inheritance extension {boolean}
- default value = false (no inheritance)
- can only be used with arg 1 and arg 2
Run the Windows batch script wealth-distrib.bat
to build and then run experiments.
An individual CSV will be output for each run of each experiment.
Properties descriptions wealth-distrib-{i}.properties
for experiments.
The NetLogo default model settings are used unless otherwise specified.
wealth-distrib-default.properties
: Defaultwealth-distrib-2.properties
: num-people = 1000wealth-distrib-3.properties
: num-people = 50wealth-distrib-4.properties
: max-vision = 15wealth-distrib-5.properties
: max-vision = 1wealth-distrib-6.properties
: percent-best-land = 25%wealth-distrib-7.properties
: percent-best-land = 5%wealth-distrib-8.properties
: grain-growth-interval = 10wealth-distrib-9.properties
: num_grain_grown = 1-
wealth-distrib-10.properties
: num_grain_grown = 10 -
wealth-distrib-11.properties
: life-expectancy-min = 50; life-expectancy-max = 50 -
wealth-distrib-12.properties
: life-expectancy-min = 50; life-expectancy-max = 100
JUnit is required to run unit tests. Requires manual setup
- See
WorldTest