scolty1985
Board Regular
- Joined
- Sep 16, 2009
- Messages
- 88
Hi,
I have a problem at work which I'm trying to solve and was hoping someone could give me some pointers. I have simplified the problem below:
I have varying sizes of pipe and varying sizes of baskets which I need to fill. I would like to be able to step through all of my baskets and check how many of the products I can fit in them before I need to start using the next basket, or until I run out of baskets.
IE I have 2 baskets and 4 products, if product 1 and half of product 2 fits in box 1, then I would fill the remainder of product 2 into box 2 and then put product 3 and 4 in box 2 assuming they fit.
I originally though about having a for loop for the baskets and a nest for loop for the products but I'm not sure this will work.
Any idea?
Thanks for your help.
I have a problem at work which I'm trying to solve and was hoping someone could give me some pointers. I have simplified the problem below:
I have varying sizes of pipe and varying sizes of baskets which I need to fill. I would like to be able to step through all of my baskets and check how many of the products I can fit in them before I need to start using the next basket, or until I run out of baskets.
IE I have 2 baskets and 4 products, if product 1 and half of product 2 fits in box 1, then I would fill the remainder of product 2 into box 2 and then put product 3 and 4 in box 2 assuming they fit.
I originally though about having a for loop for the baskets and a nest for loop for the products but I'm not sure this will work.
Any idea?
Thanks for your help.