Interesting - seems like you might just be able to throw an multi-ILP solver at it?
(maximize individual ingredient weights given ordering on package must be in weight order, must add up to total end weight, and must be in the following rough proportions in order to be anything like the end product)
Curious what you did.