Select to view content in your preferred language

Route Task - Problem Delivery Sequence

2196
5
03-15-2016 06:55 AM
Luiz_CarlosRomani_Filho
New Contributor

Hi!

I'm using RouteTask to solve and return the best sequence delivery but there is a problem in sequence , as shown in the attached image.

I'm doing something wrong on call or missing some parameter or a tool problem?

To simulate the problem I send html page. Open the file, copy and paste html in ArcGIS Sandbox and click in Start:

http://developers.arcgis.com/javascript/sandbox/sandbox.html

Thank's

Luiz

0 Kudos
5 Replies
TomSellsted
MVP Regular Contributor

Luiz,

When the routeParams.findBestSequence is set to false the stops in your image will be 2, 3 & 4 as you are expecting.  When the parameter is set to true, the solver will choose an optimum sequence for all the stops considered.  Here is a screenshot of the parameters set to false:

When set to true, it looks like the image you have.

Regards,

Tom

0 Kudos
Luiz_CarlosRomani_Filho
New Contributor

Tom,

How are you?

When set to false, the sequence is correct because i'm defined sequence manually, but the purpose of the software is it determine the best sequence , which did not occur in this and other cases I have.

I believe this to be a problem of the tool, but how can I be sure? Deliveries must be made first, because as soon as the vehicle is lighter and uses less fuel, reducing the cost of delivery.

Follows another example.

Thank's.

0 Kudos
TomSellsted
MVP Regular Contributor

Luiz,

I am doing well.  I hope you are doing well too!

In your sample, you may need to experiment with the routeParameters to get the result you are looking for.  When you request an optimal path using the findBestSequence parameter, the routeTask as you have it, knows nothing about weight.  It is calculating the smallest impedance to make the fastest trip through all of the stops.  You will need to add other parameters to your routeParameters setting and more information to your stops to change the outcome.

Regards,

Tom

Luiz_CarlosRomani_Filho
New Contributor

Hi Tom!

I'm fine thank's and you?

Ok, I got it.

Sorry my ignorance that subjects, but you know what parameter can use the stop point to return the expected result?

Could not find a better documentation to this point in ARCGIS Online - Javascript.

Thank's

0 Kudos
TomSellsted
MVP Regular Contributor

Luiz,

No apologies necessary!  I am very happy to help.

The findBestSequence would work best on a unsorted (geographically) list of stops.  Since your list is already put into a fairly logical sequence, you may see very little difference in the travel time whether using findBestSequence or not. 

The documentation even states, "The heuristics do not guarantee the optimal sequence (as there is no good/fast way to prove optimality for large number of stops), it returns a solution that is close to optimal if not the optimal.".  You may have additional knowledge about setting the sequence that cannot be easily modeled.

Compare the results between the two.  If they are close in travel time, your additional knowledge of sequence may work better.  If the findBestSequence is substantially better, it may be the best way to set your route.

Regards,

Tom

0 Kudos