@Generated("by gapic-generator-java")
Package com.google.cloud.optimization.v1
The interfaces provided are listed below, along with usage samples.
======================= FleetRoutingClient =======================
Service Description: A service for optimizing vehicle tours.
Validity of certain types of fields:
* `google.protobuf.Timestamp` * Times are in Unix time: seconds since 1970-01-01T00:00:00+00:00. * seconds must be in [0, 253402300799], i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00]. * nanos must be unset or set to 0. * `google.protobuf.Duration` * seconds must be in [0, 253402300799], i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00]. * nanos must be unset or set to 0. * `google.type.LatLng` * latitude must be in [-90.0, 90.0]. * longitude must be in [-180.0, 180.0]. * at least one of latitude and longitude must be non-zero.
Sample for FleetRoutingClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
OptimizeToursRequest request =
OptimizeToursRequest.newBuilder()
.setParent("parent-995424086")
.setTimeout(Duration.newBuilder().build())
.setModel(ShipmentModel.newBuilder().build())
.addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
.setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
.addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
.setInterpretInjectedSolutionsUsingLabels(true)
.setConsiderRoadTraffic(true)
.setPopulatePolylines(true)
.setPopulateTransitionPolylines(true)
.setAllowLargeDeadlineDespiteInterruptionRisk(true)
.setUseGeodesicDistances(true)
.setGeodesicMetersPerSecond(-2129658905)
.setMaxValidationErrors(-1367418922)
.setLabel("label102727412")
.setPopulateTravelStepPolylines(true)
.build();
OptimizeToursResponse response = fleetRoutingClient.optimizeTours(request);
}
-
Class Summary Class Description AggregatedMetrics Aggregated metrics for [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute] (resp.AggregatedMetrics.Builder Aggregated metrics for [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute] (resp.AsyncModelMetadata The long running operation metadata for async model related methods.AsyncModelMetadata.Builder The long running operation metadata for async model related methods.AsyncModelProto BatchOptimizeToursRequest Request to batch optimize tours as an asynchronous operation.BatchOptimizeToursRequest.AsyncModelConfig Information for solving one optimization model asynchronously.BatchOptimizeToursRequest.AsyncModelConfig.Builder Information for solving one optimization model asynchronously.BatchOptimizeToursRequest.Builder Request to batch optimize tours as an asynchronous operation.BatchOptimizeToursResponse Response to a `BatchOptimizeToursRequest`.BatchOptimizeToursResponse.Builder Response to a `BatchOptimizeToursRequest`.BreakRule Rules to generate time breaks for a vehicle (e.g.BreakRule.BreakRequest The sequence of breaks (i.e.BreakRule.BreakRequest.Builder The sequence of breaks (i.e.BreakRule.Builder Rules to generate time breaks for a vehicle (e.g.BreakRule.FrequencyConstraint One may further constrain the frequency and duration of the breaks specified above, by enforcing a minimum break frequency, such as "There must be a break of at least 1 hour every 12 hours".BreakRule.FrequencyConstraint.Builder One may further constrain the frequency and duration of the breaks specified above, by enforcing a minimum break frequency, such as "There must be a break of at least 1 hour every 12 hours".CapacityQuantity Deprecated. CapacityQuantity.Builder Deprecated: Use [Vehicle.LoadLimit.Interval][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval] instead.CapacityQuantityInterval Deprecated. CapacityQuantityInterval.Builder Deprecated: Use [Vehicle.LoadLimit.Interval][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval] instead.DistanceLimit A limit defining a maximum distance which can be traveled.DistanceLimit.Builder A limit defining a maximum distance which can be traveled.FleetRoutingClient Service Description: A service for optimizing vehicle tours.FleetRoutingGrpc A service for optimizing vehicle tours.FleetRoutingGrpc.FleetRoutingBlockingStub A stub to allow clients to do synchronous rpc calls to service FleetRouting.FleetRoutingGrpc.FleetRoutingFutureStub A stub to allow clients to do ListenableFuture-style rpc calls to service FleetRouting.FleetRoutingGrpc.FleetRoutingImplBase Base class for the server implementation of the service FleetRouting.FleetRoutingGrpc.FleetRoutingStub A stub to allow clients to do asynchronous rpc calls to service FleetRouting.FleetRoutingProto FleetRoutingSettings Settings class to configure an instance ofFleetRoutingClient
.FleetRoutingSettings.Builder Builder for FleetRoutingSettings.GcsDestination The Google Cloud Storage location where the output file will be written to.GcsDestination.Builder The Google Cloud Storage location where the output file will be written to.GcsSource The Google Cloud Storage location where the input file will be read from.GcsSource.Builder The Google Cloud Storage location where the input file will be read from.InjectedSolutionConstraint Solution injected in the request including information about which visits must be constrained and how they must be constrained.InjectedSolutionConstraint.Builder Solution injected in the request including information about which visits must be constrained and how they must be constrained.InjectedSolutionConstraint.ConstraintRelaxation For a group of vehicles, specifies at what threshold(s) constraints on visits will be relaxed and to which level.InjectedSolutionConstraint.ConstraintRelaxation.Builder For a group of vehicles, specifies at what threshold(s) constraints on visits will be relaxed and to which level.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation If `relaxations` is empty, the start time and sequence of all visits on `routes` are fully constrained and no new visits may be inserted or added to those routes.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder If `relaxations` is empty, the start time and sequence of all visits on `routes` are fully constrained and no new visits may be inserted or added to those routes.InputConfig The desired input location information.InputConfig.Builder The desired input location information.Location Encapsulates a location (a geographic point, and an optional heading).Location.Builder Encapsulates a location (a geographic point, and an optional heading).OptimizeToursRequest Request to be given to a tour optimization solver which defines the shipment model to solve as well as optimization parameters.OptimizeToursRequest.Builder Request to be given to a tour optimization solver which defines the shipment model to solve as well as optimization parameters.OptimizeToursResponse Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.OptimizeToursResponse.Builder Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.OptimizeToursResponse.Metrics Overall metrics, aggregated over all routes.OptimizeToursResponse.Metrics.Builder Overall metrics, aggregated over all routes.OptimizeToursValidationError Describes an error encountered when validating an `OptimizeToursRequest`.OptimizeToursValidationError.Builder Describes an error encountered when validating an `OptimizeToursRequest`.OptimizeToursValidationError.FieldReference Specifies a context for the validation error.OptimizeToursValidationError.FieldReference.Builder Specifies a context for the validation error.OutputConfig The desired output location.OutputConfig.Builder The desired output location.Shipment The shipment of a single item, from one of its pickups to one of its deliveries.Shipment.Builder The shipment of a single item, from one of its pickups to one of its deliveries.Shipment.Load When performing a visit, a predefined amount may be added to the vehicle load if it's a pickup, or subtracted if it's a delivery.Shipment.Load.Builder When performing a visit, a predefined amount may be added to the vehicle load if it's a pickup, or subtracted if it's a delivery.Shipment.VisitRequest Request for a visit which can be done by a vehicle: it has a geo-location (or two, see below), opening and closing times represented by time windows, and a service duration time (time spent by the vehicle once it has arrived to pickup or drop off goods).Shipment.VisitRequest.Builder Request for a visit which can be done by a vehicle: it has a geo-location (or two, see below), opening and closing times represented by time windows, and a service duration time (time spent by the vehicle once it has arrived to pickup or drop off goods).ShipmentModel A shipment model contains a set of shipments which must be performed by a set of vehicles, while minimizing the overall cost, which is the sum of: * the cost of routing the vehicles (sum of cost per total time, cost per travel time, and fixed cost over all vehicles).ShipmentModel.BreakRule Deprecated. ShipmentModel.BreakRule.BreakRequest The sequence of breaks (i.e.ShipmentModel.BreakRule.BreakRequest.Builder The sequence of breaks (i.e.ShipmentModel.BreakRule.Builder Deprecated: Use top level [BreakRule][google.cloud.optimization.v1.ShipmentModel.BreakRule] instead.ShipmentModel.BreakRule.FrequencyConstraint One may further constrain the frequency and duration of the breaks specified above, by enforcing a minimum break frequency, such as "There must be a break of at least 1 hour every 12 hours".ShipmentModel.BreakRule.FrequencyConstraint.Builder One may further constrain the frequency and duration of the breaks specified above, by enforcing a minimum break frequency, such as "There must be a break of at least 1 hour every 12 hours".ShipmentModel.Builder A shipment model contains a set of shipments which must be performed by a set of vehicles, while minimizing the overall cost, which is the sum of: * the cost of routing the vehicles (sum of cost per total time, cost per travel time, and fixed cost over all vehicles).ShipmentModel.DurationDistanceMatrix Specifies a duration and distance matrix from visit and vehicle start locations to visit and vehicle end locations.ShipmentModel.DurationDistanceMatrix.Builder Specifies a duration and distance matrix from visit and vehicle start locations to visit and vehicle end locations.ShipmentModel.DurationDistanceMatrix.Row Specifies a row of the duration and distance matrix.ShipmentModel.DurationDistanceMatrix.Row.Builder Specifies a row of the duration and distance matrix.ShipmentModel.PrecedenceRule A precedence rule between two events (each event is the pickup or the delivery of a shipment): the "second" event has to start at least `offset_duration` after "first" has started.ShipmentModel.PrecedenceRule.Builder A precedence rule between two events (each event is the pickup or the delivery of a shipment): the "second" event has to start at least `offset_duration` after "first" has started.ShipmentRoute A vehicle's route can be decomposed, along the time axis, like this (we assume there are n visits): ``` | | | | | T[2], | | | | Transition | Visit #0 | | | V[2], | | | | #0 | aka | T[1] | V[1] | ...ShipmentRoute.Break Data representing the execution of a break.ShipmentRoute.Break.Builder Data representing the execution of a break.ShipmentRoute.Builder A vehicle's route can be decomposed, along the time axis, like this (we assume there are n visits): ``` | | | | | T[2], | | | | Transition | Visit #0 | | | V[2], | | | | #0 | aka | T[1] | V[1] | ...ShipmentRoute.Delay Deprecated. ShipmentRoute.Delay.Builder Deprecated: Use [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] instead.ShipmentRoute.EncodedPolyline The encoded representation of a polyline.ShipmentRoute.EncodedPolyline.Builder The encoded representation of a polyline.ShipmentRoute.Transition Transition between two events on the route.ShipmentRoute.Transition.Builder Transition between two events on the route.ShipmentRoute.TravelStep Deprecated. ShipmentRoute.TravelStep.Builder Deprecated: Use [ShipmentRoute.Transition][google.cloud.optimization.v1.ShipmentRoute.Transition] instead.ShipmentRoute.VehicleLoad Reports the actual load of the vehicle at some point along the route, for a given type (see [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]).ShipmentRoute.VehicleLoad.Builder Reports the actual load of the vehicle at some point along the route, for a given type (see [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]).ShipmentRoute.Visit A visit performed during a route.ShipmentRoute.Visit.Builder A visit performed during a route.ShipmentTypeIncompatibility Specifies incompatibilties between shipments depending on their shipment_type.ShipmentTypeIncompatibility.Builder Specifies incompatibilties between shipments depending on their shipment_type.ShipmentTypeRequirement Specifies requirements between shipments based on their shipment_type.ShipmentTypeRequirement.Builder Specifies requirements between shipments based on their shipment_type.SkippedShipment Specifies details of unperformed shipments in a solution.SkippedShipment.Builder Specifies details of unperformed shipments in a solution.SkippedShipment.Reason If we can explain why the shipment was skipped, reasons will be listed here.SkippedShipment.Reason.Builder If we can explain why the shipment was skipped, reasons will be listed here.TimeWindow Time windows constrain the time of an event, such as the arrival time at a visit, or the start and end time of a vehicle.TimeWindow.Builder Time windows constrain the time of an event, such as the arrival time at a visit, or the start and end time of a vehicle.TransitionAttributes Specifies attributes of transitions between two consecutive visits on a route.TransitionAttributes.Builder Specifies attributes of transitions between two consecutive visits on a route.Vehicle Models a vehicle in a shipment problem.Vehicle.Builder Models a vehicle in a shipment problem.Vehicle.DurationLimit A limit defining a maximum duration of the route of a vehicle.Vehicle.DurationLimit.Builder A limit defining a maximum duration of the route of a vehicle.Vehicle.LoadLimit Defines a load limit applying to a vehicle, e.g.Vehicle.LoadLimit.Builder Defines a load limit applying to a vehicle, e.g.Vehicle.LoadLimit.Interval Interval of acceptable load amounts.Vehicle.LoadLimit.Interval.Builder Interval of acceptable load amounts.Waypoint Encapsulates a waypoint.Waypoint.Builder Encapsulates a waypoint. -
Enum Summary Enum Description AsyncModelMetadata.State Possible states of the operation.DataFormat Data formats for input and output files.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level Expresses the different constraint relaxation levels, which are applied for a visit and those that follow when it satisfies the threshold conditions.InputConfig.SourceCase OptimizeToursRequest.SearchMode Mode defining the behavior of the search, trading off latency versus solution quality.OptimizeToursRequest.SolvingMode Defines how the solver should handle the request.OptimizeToursValidationError.FieldReference.IndexOrKeyCase OutputConfig.DestinationCase ShipmentTypeIncompatibility.IncompatibilityMode Modes defining how the appearance of incompatible shipments are restricted on the same route.ShipmentTypeRequirement.RequirementMode Modes defining the appearance of dependent shipments on a route.SkippedShipment.Reason.Code Code identifying the reason type.Vehicle.TravelMode Travel modes which can be used by vehicles.Vehicle.UnloadingPolicy Policy on how a vehicle can be unloaded.Waypoint.LocationTypeCase