Code Monkey home page Code Monkey logo

swen90004-assignment-2's Introduction

Java Wealth Distribution Model

This is an implementation of the agent-based, wealth distribution model in Java. At the very basic level, it is a replication of the Netlogo "Wealth Distribution" model in its model library. The Java implementation also supports a set of extension features such as wealth inheritance.

Usage

To build the model, simply run make in the project directory (where the makefile is located). The make process generates program.jar as the compiled Java program. It can be run with a set of parameters by the following command:

java -cp ./program.jar Simulation [numPeople] [maxVision] [metabolismMax] [lifeExpectancyMin] [lifeExpectancyMax] [percentBestLand] [grainGrowthInterval] [grainGrowthRate] [timeMax] [filename]

...where most of the parameters correspond to those in the Netlogo model. The timeMax parameter specifies the duration of simulation, and filename specifies the name of CSV file output.

There is also a Python script for experimenting and data visualisation. In order to use it, simply call:

python3 ./experiment.py

or

python ./experiment.py if Python 3 is installed as default.

The script calls the Java program automatically and generates a set of plots in the output folder. Parameters can be modified in experiment.py.

swen90004-assignment-2's People

Contributors

leane-li avatar soonhwanj avatar jack9966qk avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

hdias5000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.