Packing Algorithm Demo

Based on the article: "Solution of Bin Packing Instances in Falkenauer T Class: Not So Hard"

🧠 About the Algorithm

This project demonstrates an implementation of the Triplet Packing Problem, a constrained variant of bin packing where items must be grouped into triplets whose total weight equals a fixed bin size.

The core algorithm is implemented using triplet_algo from the prtpy library.

Two solving strategies are supported:

  • Backtracking – an exhaustive recursive approach.
  • Local Search – a heuristic method to improve solutions iteratively.

The underlying approach is based on the paper:
"Solution of Bin Packing Instances in Falkenauer T Class: Not So Hard"
by György Dósa, András Éles, Angshuman Robin Goswami, István Szalkai, Zsolt Tuza (2025)
Article link

📘 How to Use
  1. Enter a list of positive integers as items, separated by commas (e.g., 300, 250, 450).
  2. Enter a bin size that each triplet should sum to (e.g., 1000).
  3. Choose a method: Backtracking or Local Search.
  4. Optionally select a log level to control the verbosity of the internal algorithm trace.
  5. Click Run Algorithm to see the result.
  6. To try a random valid instance, click Use Random Example Input. You can also first input the number of items you want to randomly generate and then click Use Random Example Input to generate that exact number of items.

Errors (e.g., if triplet grouping is not possible) will be displayed with a detailed message.

👩‍💻 About the Developer

Hi! I'm Miriam Nagar, a computer science student at Ariel University. This website is part of a final project I created for the Research Algorithms course, where we explored algorithmic strategies for solving complex real-world problems.

My project focuses on the Triplet Packing Problem — a constrained variation of bin packing where items must be grouped into triplets such that each group exactly fills a bin. I implemented and demonstrated both a backtracking-based solver and a local search heuristic.

The project builds on the algorithmic framework proposed in the paper:
"Solution of Bin Packing Instances in Falkenauer T Class: Not So Hard"
by György Dósa, András Éles, Angshuman Robin Goswami, István Szalkai, Zsolt Tuza
📄 Link to article

I integrated my implementation into a fork of the open-source Python library prtpy, which provides flexible tools for modeling and solving packing and partitioning problems.

You can view the full project code and this interactive demo site here:
🔗 github.com/MiriamNagar/triplet_packing_site

Thanks for visiting and happy packing! 📦