Skip to content

HBRS-MAAS/ws18-project-right-brothers

Repository files navigation

Build Status Codacy Badge Coverage Status

MAAS Project - right-brothers

Add a brief description of your project. Make sure to keep this README updated, particularly on how to run your project from the command line.

Team Members

Dependencies

  • JADE v.4.5.0
  • ...

How to run

Just install gradle and run:

gradle run

Run with multiple machines

  • Connect machines to a common network
  • Find the ip of the server/host machine (for example 192.168.1.123)
  • Find a port which can be used for JADE communication (for example 5555)

For server/host machine

gradle run --args="-isHost 192.168.1.123 -localPort 5555 -stage1 -stage2 ... -noTK"

For client machines

gradle run --args="-host 192.168.1.123 -port 5555 -stage3 -noTK"

For the client which executes gradle command later than every other machine

gradle run --args="-host 192.168.1.123 -port 5555 -stageN"

It will automatically get the dependencies and start JADE with the configured agents.

In case you want to clean you workspace run

gradle clean

Test

For testing TimeKeeper

gradle run

For testing baking stage

gradle run --args="-baking"

For testing packaging stage

gradle run --args="-packaging"

For testing baking and packaging stage

gradle run --args="-baking -packaging"

For testing baking and packaging and visualisation stage

gradle run --args="-baking -packaging -visualization"

The visualization with all the orders in a scenario is very fast and hard to follow. It's easier to follow smaller subset of orders. To use a smaller number of orders please comment out line 73 to 75 (inclusive) in org.right_brothers.agents.DummyOrderProcessor and uncomment line 76.

Eclipse

To use this project with eclipse run

gradle eclipse

This command will create the necessary eclipse files. Afterwards you can import the project folder.

Team convention

Code

  • No commented out code should be checked in as it makes the code less readable. This is often done for print statements used during debugging. If other members find a commented out code he/she will remove it without confirming and without complaining. However, if there is some reason to comment out code it should explain the reason at first line.

    //TODO - I found this nice code from stackoverflow but not sure how to use it /** * */

  • Line comments should be avoided as much as possible and code should be self explanatory. Doc comment is encouraged but not mandatory.

Git

  • Multiple members working on same feature should use same branch. Having multiple branches makes merging more difficult.