Allocation of limited stock

Stock items individually numbered, though some are same. How to allocate individual items.

Didn't find your answer?

I am selling turkeys(!). the turkeys will have various weights. Customers place their orders according to the weight they want. They may want a rough weight, say 14-16lbs. When the turkeys are ready I number them, so I can then allocate them to the right customer.

How do I set up a table with customer data, including  their desires weights, and another table with the turkeys and their weights, and find a formula which will allocate the available turkeys to the customers?

At the moment I'm stuck where every customer who wants a particular weight has a return in the formula which gives the first number allocated to that weight. How can I factor in (if Turkeys 1-10 all weight 8lbs), that each customer who wants an 8lb turkey is allocated a different number for their turkey.

Sorry to talk turkey, but I'd appreciate any help. I've tried a few things! Thanks!

Replies (3)

Please login or register to join the discussion.

Routemaster image
By tom123
28th Jan 2017 17:16

Sounds a fascinating query (and a change from the usual stuff) - although I can't quite visualise the problem.

Would you not just list the customers in order of order placed, and then allocate the turkeys in order (assuming the correct size)?

Thanks (0)
avatar
By Irune
02nd Feb 2017 11:33

Make a stack of customers and a stack of turkeys, sort it by weight (required vs bird weight) then walk both stacks in parallel assigning turkeys, use a different table for that. When customer requirement mismatch the turkey weight available, move to the next heavier turkey section of the stack. Not sure if the problem is a database problem or a programming problem.

Thanks (0)
avatar
By stephenjenkin
03rd Feb 2017 09:53

Many, many thanks for your advice, both of you. I've followed it and my colleague is very happy with the result.

Thanks (0)