mtspPath


URI

<networkDataName_uri>/mtsppath[.<format>]

Supported methods

GET, HEAD

Parent resource

networkDataName

Introduction

The MTSPPaths resource represents the multiple traveling salesmen analysis function. With parameters properly set, a GET request can be performed on the MTSPPaths resource to retrieve a multiple traveling salesmen analysis result.

A multiple travelling salesmen analysis, also known as logistics analysis, is to find a cost effective delivery scheme given M delivery centers and N destinations (M and N are both integers greater than 0). The corresponding routes are also calculated.

A logistics function is used to reasonably assign delivery order and routes, so that the total delivery cost or the cost for each delivery center is the minimum. A multiple travelling salesmen analysis result includes the delivery destinations for each delivery center, as well as the routes and the order in which each destination is accessed when a delivery center delivers its commodities to its destinations. The delivery scheme is calculated in a way that the costs for the delivery centers are close to each other, or the total cost for all delivery centers is the minimum.

Note that the turning weight of the target point will not be take into consideration when performing multiple travelling salesmen analysis.

For more details about multiple travelling salesmen analysis, see:Multiple travelling salesmen analysis

Supported methods

Supported output formats: rjson, json, html, xml.

GIS Services Resource Hierarchy

resources.htm

HTTP request methods

Below is an example of performing an HTTP request on a URI with rjson as the output format. In the URI: supermapiserver is the name of the server; RoadNet@Changchun is the name of the network data that can be used in network analysis; [2, 50, 100] is an array of nodes representing the locations of the delivery centers; [1,8,9,25,16,36,68,92,58,64,90,123,215,310] is an array of nodes representing the locations of the delivery destinations.

http://supermapiserver:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun/mtsppath.rjson?centers=[2,50,100]&nodes=[1,8,9,25,16,36,68,92,58,64,90,123,215,310]

GET Request

Gets the results of multiple travelling salesmen analysis.

Request parameters

Proper parameters need to be included in the URI when performing a GET request on the mtspPath resource.

Field Type Definition
centers int[]/Point2D[] Required
A set of delivery centers.
nodes int[]/Point2D[] Required
A set of delivery destinations.
hasLeastTotalCost boolean Whether to always select the delivery path with the least total cost.
parameter TransportationAnalystParameter General parameters for transportation network analyst.

Response structure

After the traveling salesman analysis function is performed, the returned representation of the operation result has the following structure (the representation is included in the entity body of the response message):

Name Type Description
pathList List<MTSPPath> A list of delivery path(s) from the delivery center.

Example of response

Performing a GET request on the following URI is to perform a multiple traveling salesmen analysis on the RoadNet@Changchun dataset:

http://supermapiserver:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun/mtsppath.rjson?centers=[2,50,100]&nodes=[1,8,9,25,16,36,68,92,58,64,90,123,215,310]

The returned response content is as follows:

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the mtspPath resource exists, or if the resource can be accessed by clients. It can also determine if the mtspPath resource supports an output format <format> if performed on a URI with .<format> included.

See