This program simulates work of the shop merchandiser and track all of his moves.
The first solution about paking items on the shelf (in our case 2D bin packing problem) is to use shelf algorithm wich is more preferable for perfomance at my point of view.
Technology stack:
Spring boot
Google Guava lib
Spring data JPA
Postgresql
Liqubase
Hibernate envers
Log4j
SL4j
Lombok
JUnit 5
Mockito
Jenkins
SonarQube
Swagger
- Database:
- Logging:
- Spicing:
- Testing:
- CI CD tools used:
- Documentation:
The algorithm i used in my case is customised NFDH (Next Fit Decreasing High) packing algorithm:
- For each rectangle in the list of strings to pack:
- If the rectangle does not fit in the current shelf:
- Close the current shelf.
- Open a new shelf with self height 0 and position of previous shelf level.
- Add the rectangle to the current shelf.
- If the rectangle’s height is greater than the shelf’s height:
- Set the shelf height to the rectangle’s height.
- If the rectangle’s height is greater than the shelf’s height:
- If the rectangle does not fit in the current shelf: