Heheh... Nice problem :)

But the approach I would take (ALERT PERSONAL OPINION)

step one:
Check in which row an item order by row desc (C first L last) is located
(ROW C,F,I,L in your Xcel sheet)
step two:
Loop in list of row. And let him always start at the first row!
step three:
Three options!
option a: Next Item is in same row
option b: Next Item is the next row and the item is more then half way the
row,
option c: Next Item is in the next row and the item is less than half way
the row.
actions:
a. Walk on
b. Walk on and let him go to the other row  at the top 
c. Walk back and go to the next row.
step 4.
Get Item
step 5.
two options.
a: More items available
b: no more items
actions:
a. Goto step 3
b. -
step 6.
Go back to start point

HTH

Jerry Verhoef



-----Original Message-----
From: hamish [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 5:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php help needed, is there a bright spark out there!



Hello All,
I have been asked to do a project that seems to be baffling me. It's not
really the php which is the hard part, but the mathematical problem behind
the project that is causing me to have a headache!
 
 
Imagine an ecommerce site where a user can pick 5 products (it must be 5)
from a possible 60. That's the easy bit. The project that I have to do is to
do with the way the order is dealt with. Imagine the company has a warehouse
(the attached layout) where the yellow boxes are bins of 1 product in each
(A1 would be the bin with all products A1 in). P1, P2, and P3 are stations
where pickers (people who pack each order) receive the order. I have to
build some PHP that shows the picker the optimum way around the warehouse to
pick up all the 5 products, and then return him to the starting station. 
 
 
 I hope there is a bright spark out there that can solve this easier than I
have (my way requires calculating all the possible ways of picking up the 5
products and then calculating the shortest route from a stored database, but
it would require 780 sql statements, that just isn't going to work!)

Here are the rules that I have to follow:
An Order Picking slip for a complete order is printed at 1 of 3 packing
locations (P1, P2, or P3).
A picker must start at one of these packing locations, collect all products
required for that order then return back to the start position to deposit
all items for packing.
Note:
A picker can only move one square at a time (& not diagonally) 
Pickers cannot walk through bin locations! 
A picker can only access a bin location when standing directly at the side. 
e.g.
A picker standing at 'X' can access locations B8 or C8 from this position.
A picker standing at 'Y' cannot access any locations.

I live in hope!
Hamish


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to