Inspiration

The main inspiration was learning and challenging ourselves by trying to make this work being only 2 Computer Science students that are in their second year and wanted to solve something innovative and new, also the mathematical challenge from Mecalux was another of our main inspiration. We realized early on that a traditional algorithm was not enough for this problem. We needed a system capable of evaluating millions of options whith a paralelized code in a few seconds to fill as much space as possible.

What it does

It is an optimization engine for complex warehouses. The program evaluates where to place the storage bays depending on the storage input and metrics and mathematically rewards positions that share aisles or are placed back to back. This maximizes the used area and reduces the final Q score.

How we built it

We designed an architecture that combines C and Python: The C Core handles the brute force. It calculates collisions and geometric limits on a massive scale to find valid positions in microseconds. The Python code communicates with C to receive valid positions. Then, it uses a spatial scoring system to choose the best location, giving priority to the most efficient bays and positions that create high density.

Challenges we ran into

-The time limit: Our first code in Python took more than 30 minutes to evaluate large warehouses. We solved this by moving heavy geometric calculations to the C language.

-The exponent problem: The mathematical function of the challenge was very demanding, leaving empty space increased the result drastically. We had to create an aggressive system to use every millimeter of the warehouse to move the exponent closer to 1.0.

Accomplishments that we're proud of

Learning a lot of new methods and forms of optimizing a code by using more than one architecture simmultaneously. Connecting C memory with Python successfully during the limited time of a hackathon. Reducing execution times from more than 30 minutes to just a few seconds. Creating an algorithm that generates realistic warehouse aisles using only mathematical rules.

What we learned

-Connecting C and Python: We learned how to use the ctypes library to link C and Python. This allowed us to run heavy math at maximum speed while keeping the main logic easy to manage in Python.

-Spatial Hashing: We learned how to use a "Collision Grid." Instead of checking every bay against every other bay, the code only looks at the immediate area. This made the collision detection much faster.

-Vectorized Math: We discovered the power of processing data in groups. By using tools like numpy, we could filter thousands of coordinates at the same time instead of one by one.

-Natural Design through Rules: We learned that simple mathematical rewards can create complex layouts. By giving points for shared aisles, the algorithm naturally designed a realistic warehouse without us writing specific drawing rules.

-Performance Balance: We learned to split the work between two worlds. We used C for the fast, "brute force" calculations and Python for the smart, strategic decisions.

What's next for Warehouse solved in seconds

Implement a variable grid. Use multiple processor cores to evaluate more bays in parallel.

Built With

Share this project:

Updates