Inspiration
Have you ever opened an Amazon delivery, only for a messy storm of styrofoam to be bestowed upon your eyes? And to top it all off, your precious orders and packages are all strewn about inside... We aim to solve the issues of inefficient packing and spacial usage, which can help mitigate the waste of styrofoam and plastic boxes, both of which are harmful for our environment.
What it does
Our program takes the dimensions of a 3d container and the dimensions of any number of 3d packages/objects. Starting from the bottom up, our algorithm fits the packages into the box, automatically stacking objects and rotating for available space along the way. This spin on the classic bin-packing problem also allows for users to analyze packing solutions in three dimensions through cross sections along the z-axis. We also included a website to aid with visualization and link to the code's GitHub repo.
How we built it
Our code was written entirely in Java. Classes for our boxes, packages, and packing methods facilitated the creation of methods. We used a 3d array to model the container, along with private fields and accessor/mutator methods for package dimensions. Starting from the bottom of the box to the top, our algorithm searches for available space based on the package dimensions, snugly fitting them in upon availability. In order to optimize solutions, the packages automatically rotate and stack to ensure that no empty space is wasted. Solutions are visualized by printed cross sections, each represented by a 2d array. In each cross section, different packages are differentiated by user-selected symbols, while empty space is denoted by periods. To view all three dimensions, the user can select the z-axis 'layer' of the cross section, allowing for a comprehensive view of the solution. These user inputs are all parsed from an input text file using a scanner. Our website is run on CSS and html, including informatio about our goals, a link to the code, and images.
Challenges we ran into
Making our project very user-friendly was difficult. We originally aimed to use a GUI, but ultimately settled on a text file for inputs with terminal-based outputs.
Accomplishments that we're proud of
We modeled the 3d bin-packing problem just using Java! We found an appropriate balance between user-dependence, program automation, and solution visualization without using any external visualizers.
What we learned
Java is more versatile than it may seem! We fit user-input, optimization, and comprehensible visualization all into three classes.
What's next for BSGE
Our program only takes in rectangular dimensions, so adjusting our code for circular and irregular shapes could be a suitable next step.
Log in or sign up for Devpost to join the conversation.