STORAGE RACK MANAGEMENT SYSTEM

C++ bin-packing cost-minimizer using exhaustive recursive permutation search — guarantees global minimum storage cost and wastage.

ALGORITHMS
Language C++
Algorithm Recursive permutation search (exhaustive)
Input Rack weight limits and per-package costs, read from a text file
Output Global minimum total cost, racks used, and wastage
Context SP Data Structures & Algorithms module — 5-week pair project

1.0 PROBLEM

Given packages of two different weights and a set of storage racks — each with its own weight limit and a cost incurred per package placed on it — find the assignment of packages to racks that minimizes total storage cost. Rack configurations are read from a text file, so the same program solves any rack/package instance.

2.0 APPROACH

The solver runs an exhaustive recursive permutation search over package-to-rack assignments. Because the search space is fully enumerated rather than pruned heuristically, the reported answer is the global minimum — not a greedy approximation. The output reports the optimal assignment per rack, the minimum total cost, the number of racks used, and total storage wastage.

The trade-off is complexity: exhaustive search is exponential in the number of packages, which is acceptable at coursework instance sizes but would need branch-and-bound pruning or a dynamic-programming formulation to scale.

Debug console output showing per-rack package assignments, minimum total cost of $28.30, three racks used, and zero wastage
Figure 1. Solver output — global minimum cost and wastage

3.0 NOTES

Built as a 5-week pair project for the SP Data Structures & Algorithms module. Run Source.cpp from the repository to reproduce the results; the rack configuration is read from Input.txt.