Superior Route Analysis- The Traveling Salesman Problem

“Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?” This is a very common problem among salesmen, called the traveling salesman problem (TSP). The salesmen have to visit their customers in different cities and return back to their origin city everyday. Therefore, they have long been eager to know the answer to the TSP so that they can finish their job earlier.

Now, the salesmen are able to get their answers on the fly! With the help of SuperGIS Desktop and SuperGIS Server, they can simply plot the location of the customers they need to visit on the online map, and the best route for them will automatically be displayed on the map.

FA_20131014_14c677a69-e25c-43fa-a98b-ad4ccb245c29

Here’s how to do it. First, you need to prepare a line layer representing the road network system and a polygon layer representing the cities. Open them in SuperGIS Desktop and then you need to build a superior route analysis using Process Designer. Last, save the project file as a .sgd file, and publish it using SuperGIS Server Manager.

To build the superior route analysis, drag “Superior Route” to the process designer. The analysis need 2 inputs, one is the road network; the other, stops. The road network can be generated from “Generate Network”, so drag it into the process designer and set the road line layer as its input. The stops can be generated from “Create Stops”, so drag it into the designer as well. The input of “Create Stops” is a point layer. Use “Create Feature Class” to create a point layer, and use “Add Points” to allow users to add their stops by clicking on the map. Remember to set “Input Point Coordinates” as a process parameter. The output of the “Superior Route” is not a line feature, so you also need to drag “Export To Line Features” to convert the output into a line feature. Set the “Output Line Features” as process result and add it to the map. Refer to the figure below to build your geo-process. Save the file as a .sgd file and you are ready to publish it!

FA_20131014_2fb1b3bd0-17cc-46e9-bc97-ecd49f84cbaa

To publish the map, open SuperGIS Manager and select ”Publish a map service”. Click Add to add a new service. Enter the name and title, and select the .sgd file. Then click Publish. To activate the geo-processing service, select the service and click Config. Then Select Processing, and check Publish the following processes.

FA2_2013102108ccaf23-7740-458b-beee-d305c5c042eb

Select the service and click Config

FA3_20131021c67f597d-8196-4d11-8746-5308d81893ea

Check Publish the following processes

After publishing the map service, a web application should also be created so that users can perform the analysis online. To create a web application, open SuperGIS Manager and select “Create a Web Application”. Select Ultra and click Create. Then follow the steps to create an ultra website.

FA4_201310212949dd30-3d9e-46db-9b63-e91755b87e51

Select Ultra and click Create

FA5_201310216b820798-588e-4226-af74-9465bc6a4a26

Follow the steps to create an ultra website

Now, you can go to the website, and use the process tool to perform the analysis. Simply add the places you need to visit by clicking on the map, and SuperGIS Server will do the rest for you!

Phone: +886-2-2659-1899
Fax: +886-2-2659-0612
Taipei City, 11493, Taiwan
5F, No.71, Zhouzi Street, Neihu District