/se306_a01

SOFTENG 306 Assignment 1

Primary LanguageJavaOtherNOASSERTION

SOFTENG 306

Project 1

Team 2 - Fob Coders

NAME GITHUB USERNAME UPI
Zain Azimullah ZainAzimullah zazi719
Brian Choi shchoichoi scho602
Lucy Jiang lucyJiang279 ljia374
Woo Jin Kang wjsoft08 wkan588
Sze-Meeng Tan SzeMTan stan557

Overview of Project

The purpose of this project is to implement an algorithm which schedules tasks on a given number of processors, such that the total time taken to schedule all the tasks is optimal. Each task has a cost associated with running it, and some tasks require other tasks to be completed first before they can be scheduled. If a task is scheduled on a different processor from its dependency, there is an additional communication cost associated with switching processors.

The task costs as well as the communication costs can be represented as nodes and edges in a "task graph" respectively. The project focuses on trying to deliver a decent runtime for the algorithm that does the scheduling - as well as parallelise this algorithm and provide a useful visualisation.

We separated this project into some main parts - these were the DOT file parsing, DOT file generation, the task object model, the schedule object model, the algorithm, the parallelised algorithm, the GUI infratstructure, the GUI components, the command line interface and tests.

How to Build

To download and build the project:

  1. Clone/download this repository
  2. Make sure you have set a system environment variable called JAVA_HOME which points to the JDK directory on your system
  3. Run the following command in a terminal which is in the se306_a01 repository folder:
  4. ./gradlew build (for Linux)
    gradlew.bat build (for Windows)

Alternatively:

  1. Clone/download this repository
  2. Open the build.gradle file in a Java IDE such as IntelliJ or Eclipse (we recommend IntelliJ)
  3. It is up to you what you do here, as your IDE will probably import and build modules appropriately, however if it does not, you can run Gradle tasks such as Clean and Build and then execute CLI.java which is in the app package. You will need to setup a run configuration that passes in the appropriate arguments

How to Run

To run the project, download the jar which is provided under releases. Alternatively, you can run the Gradle "jar" task after downloading/cloning the project:

./gradlew jar (Linux)
gradlew.bat jar (Windows)

If you create the jar using Gradle, it will be produced in the folder build/libs/

Make sure that your input DOT file is in the same directory as the jar, and open up a terminal in this directory. Execute the jar using the following format:

java -jar schedular.jar INPUT.dot P [OPTION]

INPUT.dot is an input file
P is the number of processors to schedule the tasks on
Options:
-o OUTPUT names the file as OUTPUT (by default it is INPUT-output.dot)
-v runs the visualizer
-p N causes the algorithm to be parallelised on N cores (default is sequential)

Locating Information

Our WBS, Network Diagram and Gantt Chart can be found at the top level of the repository ("Team 2 Project Plan.pdf"). Our algorithm pseudocode is also at the top level (algorithm_english.txt) and our research, libraries used, and other documentation is in the Wiki. We have commented links to our libraries in the build.gradle file as well.