Class RouteOptimization.RouteOptimizationBase
Base class for server-side implementations of RouteOptimization
Namespace: Google.Maps.RouteOptimization.V1
Assembly: Google.Maps.RouteOptimization.V1.dll
Syntax
[BindServiceMethod(typeof(RouteOptimization), "BindService")]
public abstract class RouteOptimization.RouteOptimizationBase
Methods
BatchOptimizeTours(BatchOptimizeToursRequest, ServerCallContext)
Optimizes vehicle tours for one or more OptimizeToursRequest
messages as a batch.
This method is a Long Running Operation (LRO). The inputs for optimization
(OptimizeToursRequest
messages) and outputs (OptimizeToursResponse
messages) are read from and written to Cloud Storage in user-specified
format. Like the OptimizeTours
method, each OptimizeToursRequest
contains a ShipmentModel
and returns an OptimizeToursResponse
containing ShipmentRoute
fields, which are a set of routes to be
performed by vehicles minimizing the overall cost.
The user can poll operations.get
to check the status of the LRO:
If the LRO done
field is false, then at least one request is still
being processed. Other requests may have completed successfully and their
results are available in Cloud Storage.
If the LRO's done
field is true, then all requests have been processed.
Any successfully processed requests will have their results available in
Cloud Storage. Any requests that failed will not have their results
available in Cloud Storage. If the LRO's error
field is set, then it
contains the error from one of the failed requests.
Declaration
public virtual Task<Operation> BatchOptimizeTours(BatchOptimizeToursRequest request, ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
BatchOptimizeToursRequest | request | The request received from the client. |
ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
Task<Operation> | The response to send back to the client (wrapped by a task). |
OptimizeTours(OptimizeToursRequest, ServerCallContext)
Sends an OptimizeToursRequest
containing a ShipmentModel
and returns an
OptimizeToursResponse
containing ShipmentRoute
s, which are a set of
routes to be performed by vehicles minimizing the overall cost.
A ShipmentModel
model consists mainly of Shipment
s that need to be
carried out and Vehicle
s that can be used to transport the Shipment
s.
The ShipmentRoute
s assign Shipment
s to Vehicle
s. More specifically,
they assign a series of Visit
s to each vehicle, where a Visit
corresponds to a VisitRequest
, which is a pickup or delivery for a
Shipment
.
The goal is to provide an assignment of ShipmentRoute
s to Vehicle
s that
minimizes the total cost where cost has many components defined in the
ShipmentModel
.
Declaration
public virtual Task<OptimizeToursResponse> OptimizeTours(OptimizeToursRequest request, ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
OptimizeToursRequest | request | The request received from the client. |
ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
Task<OptimizeToursResponse> | The response to send back to the client (wrapped by a task). |