Author: | Rolf | Posted: | Mar 20, 2012 16:23 | Subject: | Re: Wanted List Update from Shopping Cart | Viewed: | 32 times | Topic: | Suggestions | |
|
| In Suggestions, Brettj666 writes:
| It's like the traveling salesman conundrum.. How does a salesmen visit a set
of cities in minimal time/distance becomes what's the minimum # of stores you
have to shop at to cover off your wanted list and how to you minimize cost while
you're at it.
|
Indeed. Both problems is NP hard. Basically very hard to code solution finder.
It's easier if you go for good enough solution than best possible solution. For
example if you select good enough solution of less than say 5 stores.
There is "good enough" solution to traveling saleman by sorting array of points
and making sure saleman only go right then turn back left towards back to source
only once. Now the problem is just finding shortest route around though all points.
Still very hard but much easier than best solution period.
I'm not sure how to go around building function that finds good enough group
of stores matching wanted list but it is possible.
|
|
Message is in Reply To: 9 Messages in this Thread: Msg 1 - bb295435 (10) 149 months ago Mar 19, 2012 to Suggestions Msg 2 - Brickwilbo (1534) 149 months ago Mar 19, 2012 to Suggestions Msg 3 - Brettj666 (1112) 149 months ago Mar 19, 2012 to Suggestions Msg 4 - bb295435 (10) 149 months ago Mar 19, 2012 to Suggestions Msg 5 - Brettj666 (1112) 149 months ago Mar 19, 2012 to Suggestions Msg 6 - bb295435 (10) 149 months ago Mar 20, 2012 to Suggestions Msg 7 - Brettj666 (1112) 149 months ago Mar 20, 2012 to Suggestions Msg 8 « - Rolf (339) 149 months ago Mar 20, 2012 to Suggestions Msg 9 - bb295435 (10) 149 months ago Mar 20, 2012 to Suggestions
Entire thread on one page This message and all its replies on one page
|
|