This code presents a computer application with a user-friendly interface and a 3D visualizer to solve a 3D knapsack problem using parcels of type A, B and C, and pentominoes of type L, P and T, each with different sizes and values.
- Installation
- Description
Prerequisites:
- Java Development Kit (JDK)
- JavaFX
- Code Editor
Clone the repository
- Open your terminal or command prompt.
- Navigate to the directory where you want to clone the repository.
cd path/to/your/directory
- Clone the repository
git clone https://gitlab.maastrichtuniversity.nl/bcs_group05_2023/project-1-1.git
Run the application
- Add the JavaFX libraries to the Java Project.
- Run the App.java file.
JavaFX1.java : This class handles all the graphics displayed in the application. It extends Application (The class from which JavaFX applications extend). All the classes which the program consists of are connected to this class.
App.java : This class launches the JavaFX1.java application.
Builder.java : This class includes the methods to support the search of a solution for Question A.
Parcel.java : This class builds the parcel object.
GreedyAlgorithm.java : This class contains the greedy algorithm for solving Question B. It implements Runnable, which helps the algorithm run.
Parcel.java : This class builds the parcel object.
BruteForceAlgorithm.java : This class contains the brute force algorithm used to solve Question C.
PentominoBuilder.java, PentominoDatabase.java, and pentominos.csv :
These classes were authored by the Department of Data Science and Knowledge Engineering (DKE) of Maastricht Universty. In short, they handle all the logic behind the pentominoes (which ones exist, how they rotate, their IDs, among other things).
GreedyPentominoes.java : This class holds the greedy algorithm previously used in Question B, now adapted to work with pentomino shapes.
Pentominoes.java : This class builds the Pentominoes object used in the greedy algorithm. It is a modified and adapted version of the Parcel.java class of Question A.