A fully functional application that helps putting blocks of different sizes and dimensions in a container
This project helps with finding different ways to pack cargo in a container. It has two options:
- Maximizing profits
- Maximizing space utilization
The application gives the user the option to pick the approach and by default, the values for the profits of the blocks are 3, 4, and 5 for types A, B, and C respectively.
The application layer for this project was built using the JavaFX library and the algorithms were written in Java.
![Screenshot 2024-01-26 at 12 01 01 in the afternoon](https://private-user-images.githubusercontent.com/51225853/299967269-29b1cc6f-83fa-41fe-a64b-a5ebc4e18784.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM1MzgwNDIsIm5iZiI6MTcyMzUzNzc0MiwicGF0aCI6Ii81MTIyNTg1My8yOTk5NjcyNjktMjliMWNjNmYtODNmYS00MWZlLWE2NGItYTVlYmM0ZTE4Nzg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEzVDA4MjkwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFjMzJhY2VhODA4NGY4M2E0ODZmOGViM2Q4NzVjZjYzNGI3NWUyZDdjN2ZlYmJjYjdhYmZlODA2ODIxYjcwMjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KR7KENnqkjYT_bCzVzFt4qQT7dH43kMRKaZB0Bod0Ko)
We used JavaFX 18 and Java 21 for this project. For running this program you need to install JavaFX and add it to your project. You can find the instructions here and in order to download the Java 21 you can go to this link.
After installing these libraries you can run the program by running the JFX3D.java
file in src/Phase3.JFX3D
directory or by running these two commands in the terminal:
javac ./src/Phase3/JFX3D.java
java ./src/Phase3/JFX3D.java
![Screenshot 2024-01-26 at 11 58 38 in the morning](https://private-user-images.githubusercontent.com/51225853/299966829-a8b0c69c-abab-4527-b398-05beaae6efe3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM1MzgwNDIsIm5iZiI6MTcyMzUzNzc0MiwicGF0aCI6Ii81MTIyNTg1My8yOTk5NjY4MjktYThiMGM2OWMtYWJhYi00NTI3LWIzOTgtMDViZWFhZTZlZmUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEzVDA4MjkwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0OTRiZDZmZmMxMzM3N2JkM2E3NmVlMDRiYTQxNTU0ZjM3MmZlZGJlZDFhMDNiNzUzY2M2NjQxOTMxMWQ2MjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yMoYkkI5RKGk2NSJSrueUnVUsQ6yjSlIkfaeEVZvjaw)
After running the program, you are able to pick the algorithm that you want to use and the types of blocks you have.
You can also change the values of the items by changing the numbers in the values section. For maximizing space utilization, the values of items should be (-1, -1, -1)
.
![Screenshot 2024-01-26 at 12 02 55 in the afternoon](https://private-user-images.githubusercontent.com/51225853/299972560-6a6f79a0-7ddc-48f0-ade3-6fd7145238d8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM1MzgwNDIsIm5iZiI6MTcyMzUzNzc0MiwicGF0aCI6Ii81MTIyNTg1My8yOTk5NzI1NjAtNmE2Zjc5YTAtN2RkYy00OGYwLWFkZTMtNmZkNzE0NTIzOGQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEzVDA4MjkwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhMjhjNWIzY2NjNDRiZGFhMzU1MmI1MjRhYWRjM2QyZWFlODdlNzJlYjQ5ZjM2ZjMzN2YwNzhmMTM0NjlkZjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RT2fdi4hqVXct1_BIbHT3_S1cjHF84Lfn-_iDIBL6AQ)
After clicking on the Start
button, the program will show you the result of the algorithm that you chose. You can reset the program by clicking on the Reset
button.
You can use the sliders at the bottom of the app to render only parts of the container.
Furthermore, you can select the container and rotate it by using the mouse.
You can find the results and the full report about the algorithms in the results
directory. The results and the report are in the form of .pdf
and .xlsx
files.