1. A computer-implemented method for optimizing a distribution, comprising: receiving, using one or more data processors, inner pack definition data identifying a number of items within an inner pack, wherein each item is available in one or more varieties, and wherein the inner pack definition data includes a number of each variety in the inner pack; receiving, using the one or more data processors, outer pack definition data associating a number of inner packs with an outer pack; receiving, using the one or more data processors, demand data identifying a predicted demand for each variety of an item at one or more stores; receiving, using the one or more data processors, one or more constraint values, wherein each constraint value identifies one or more limitations on a planned distribution of packs; generating, using the one or more data processors, a pack optimization problem using the inner pack definition data, the outer pack definition data, the demand data, and the one or more constraints; generating, using the one or more data processors, a revised pack optimization problem using one or more heuristics, wherein a heuristic performs a linear programming relaxation upon the pack optimization problem, and wherein solving the revised pack optimization problem requires less computation time than solving the pack optimization problem; and generating, using the one or more data processors, the planned distribution of packs by solving the revised pack optimization problem, wherein solving includes using a mixed-integer linear programming solver to determine the number of inner packs and the number of outer packs that best fulfill the predicted demand for each of the one or more stores, and wherein solving further includes subtracting an inner pack from a particular store and adding the subtracted inner pack to another store based on a particular constraint value.