Skip to content

How Binacle.Net Works

Chris Mavrommatis edited this page Mar 26, 2025 · 8 revisions

Contents

Binacle.Net employs specialized algorithms and techniques to address different aspects of the bin packing problem. Below are the key sections:


🧠 Algorithms

In order to solve the Bin Packing problem in real time Binacle.Net employs heuristic algorithms.

While heuristic algorithms like FFD are not guaranteed to always find the perfect solution (i.e., 100% accuracy), Binacle.Net is designed to ensure that when it identifies that a bin is suitable, it will invariably accommodate all items. However, it's worth noting that due to its heuristic nature, there are instances where items might technically fit into a bin, but the algorithm may not recognize it as the best option.

⚡ This trade-off enables faster, real-time calculations while maintaining a high success rate for practical use cases.

⚖️ First Fit Decreasing (FFD)

Binacle.Net implements a hybrid variant of the First Fit Decreasing (FFD) algorithm, a widely adopted heuristic for bin packing problems. This algorithm sorts items in decreasing order of size and places each item into the first available space within a single bin that can accommodate it.

Why FFD?

  • ✅ Balances efficiency and speed
  • ✅ Outperforms WFD & BFD in computational speed
  • ⚖️ Not always optimal, may leave gaps

⚠️ Worst Fit Decreasing (WFD) (Experimental)

The Worst Fit Decreasing (WFD) algorithm is a hybrid heuristic currently in the experimental stage, accessible via the v3 API endpoint. Like FFD and BFD, it sorts items in decreasing order of size but deliberately places each item in the least optimal (worst) available space within a single bin—specifically, where it leaves the most unused space after placement.

  • ✅ Can have better packing efficiency in niche scenarios
  • ⚖️ Spreads items out, which may or may not be ideal
  • ❌ Slower than FFD & WFD, with generally weaker efficiency

⚠️ Best Fit Decreasing (BFD) (Experimental)

The Best Fit Decreasing (BFD) algorithm, also in the experimental stage and available via the v3 API endpoint, is another hybrid heuristic. Like FFD and WFD, it sorts items in decreasing order of size but aims to place each item in the most optimal (best) available space within a single bin—specifically, where it leaves the least remaining space after placement.

Why BFD?

  • ✅ Packing efficiency is usually better compared to FFD and WFD
  • ⚖️ Falls between FFD and WFD in computational performance

🛠️ Functions

Binacle.Net provides two core functions to address different packing needs:

  • 🎯 Fitting – Determines if a given set of items can fit inside a bin
  • 📦 Packing – Determines not only if items fit but also their precise placement within the bin

🎯 Fitting

The Fitting function checks whether a specific set of items can fit into a predefined bin.

🚀 Why use Fitting?

  • ✅ Ideal for pre-checks before checkout or shipping
  • ✅ Returns a result indicating which items fit and which do not
  • ✅ Provides a fast, real-time assessment of bin suitability

📦 Packing

The Packing function goes beyond Fitting, determining exactly where each item is placed within the bin. If all items don’t fit, the function attempts to optimize placement to pack as many items as possible.

📌 Why use Packing?

  • ✅ Tracks item positions inside the bin
  • ✅ Optimizes space usage for better packing efficiency
  • ✅ Helps fulfillment teams with step-by-step packing instructions

Note

Both the Fitting and Packing functions support multiple bins in a single request.

The API will return results for each bin in one response, reducing the need for multiple API calls and improving overall efficiency in your packing workflow.

Clone this wiki locally