Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Challenging AI Problem in VFP
Message
De
05/08/1997 20:26:06
 
 
À
04/08/1997 12:04:52
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00043064
Message ID:
00043279
Vues:
28
I've run into the same problem a few years ago. The project was never finished (the client decided is too expensive :)), but from the analysis, tests, prototypes we did and from the long discussions we had with the client:

1. I couldn't find an algorithm to calculate directly the best solution. This doesn't mean there's none, it means only I couldn't find it. So, the method was: try as many combinations as you can in a limited time and minimize the lost space.
2. Don't do it in VFP. If you want to have a good solution in a reasonable time, do it in a fast language like C or Pascal. Usually the amount of data is not very big, the calculations are. So, if you want VFP, export data and import results to/from a fast language routine.
3. Use just integers in your calculations.
4. Make clear how you can rotate the cartons. Usually you can rotate only on a vertical axis. If this is true for you, you're lucky! :)
5. If it's possible to modify the cartons' standard dimensions: set the minimum dimensions: x, y, z. All other sizes must be Ax by By by Cz, where A, B and C are integers. Also, since you can rotate on a vertical axis, make x = Dy where D is an integer. (If you can set x, y and z so each type of carton can fill exactly a container is even better. This will save you from problems of cartons that can move inside the container, etc.)
This will also save you a lot of problems:
a) When arranging on the vertical (Because you can work on levels of height z. You can use a bidimensional algorithm and call it recursively, ie: divide et impera!). This is also important because, otherwise, you must take care of other problems: which is the minimum support area for each type of carton, how do you insure that each carton has a stable position, etc.
b) You can work with cartons types, not cartons individually. Ie: N1 cartons of type C1, N2 cartons of type C2, ... This will cut seriously your calculations.
In fact, this works also when you have standard cartons.
6. Try to see how the cartons are arranged manually. The one who's doing it might have some experience. If you have somebody really good at it, stay with him and watch. Even if he can't give you rules, you may observe and deduct his rules. Use them to optimize your algorithm. (Ie: this can help you in choosing the better combinations first.) I noticed that the best solution is found faster if bigger cartons have a higher priority.
7. Make clear if you must optimize the solution for one container or for N containers. If you are lucky and you can do what I said at point 5, you can work for one container at a time (if I remember correctly :)).

HTH,
Vlad

>I have a very complex prob..
>
>Our co. being a export firm is having a requirement, the details of which are as follows :-
>
>we are shipping goods in various carton sizes which goes into containers of 40ft, 20 ft etc.
>
>We try to fill as much goods as possible in a container..(saving each inch of space)
>
>Our goods carton size varies from order to order.. what we want is the user should give input of carton sizes i.e.
>
>Length X Breadth X Width & in which container (i.e. 40 or 20) wants to put those goods..
>
>Program should show a graphical presentation, how goods will be loaded, i.e. how can rows, in which direction horizontal or vertical....so that we can utilize maximum space...
>
>This Prob. is so complex that I don't know from where to start it...
>
>Any Help/ideas/suggestions are welcome...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform