- 1.53.0 (latest)
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.14
- 0.1.2
public final class ShipmentRoute extends GeneratedMessageV3 implements ShipmentRouteOrBuilder
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] | ... | V[n-1] | T[n] |
| aka T[0] | V[0] | | | V[n-2],| | |
| | | | | T[n-1] | | |
^ ^ ^ ^ ^ ^ ^ ^
vehicle V[0].start V[0].end V[1]. V[1]. V[n]. V[n]. vehicle
start (arrival) (departure) start end start end end
Note that we make a difference between:
- "punctual events", such as the vehicle start and end and each visit's start and end (aka arrival and departure). They happen at a given second.
"time intervals", such as the visits themselves, and the transition between visits. Though time intervals can sometimes have zero duration, i.e. start and end at the same second, they often have a positive duration.
Invariants:
If there are n visits, there are n+1 transitions.
- A visit is always surrounded by a transition before it (same index) and a transition after it (index + 1).
- The vehicle start is always followed by transition #0.
The vehicle end is always preceded by transition #n.
Zooming in, here is what happens during a
and a
Visit:
---+-------------------------------------+-----------------------------+-->
| TRANSITION[i] | VISIT[i] |
| | |
| * TRAVEL: the vehicle moves from | PERFORM the visit: |
| VISIT[i-1].departure_location to | |
| VISIT[i].arrival_location, which | * Spend some time: |
| takes a given travel duration | the "visit duration". |
| and distance | |
| | * Load or unload |
| * BREAKS: the driver may have | some quantities from the |
| breaks (e.g. lunch break). | vehicle: the "demand". |
| | |
| * WAIT: the driver/vehicle does | |
| nothing. This can happen for | |
| many reasons, for example when | |
| the vehicle reaches the next | |
| event's destination before the | |
| start of its time window | |
| | |
| * DELAY: right before the next | |
| arrival. E.g. the vehicle and/or | |
| driver spends time unloading. | |
| | |
---+-------------------------------------+-----------------------------+-->
^ ^ ^
V[i-1].end V[i].start V[i].end
Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged
during a transition.
They don't overlap.
The DELAY is unique and must be a contiguous period of time right
before the next visit (or vehicle end). Thus, it suffice to know the
delay duration to know its start and end time.
The BREAKS are contiguous, non-overlapping periods of time. The
response specifies the start time and duration of each break.
TRAVEL and WAIT are "preemptable": they can be interrupted several times
during this transition. Clients can assume that travel happens "as soon as
possible" and that "wait" fills the remaining time.
A (complex) example:
TRANSITION[i]
--++-----+-----------------------------------------------------------++-->
|| | | | | | | ||
|| T | B | T | | B | | D ||
|| r | r | r | W | r | W | e ||
|| a | e | a | a | e | a | l ||
|| v | a | v | i | a | i | a ||
|| e | k | e | t | k | t | y ||
|| l | | l | | | | ||
|| | | | | | | ||
--++-----------------------------------------------------------------++-->
`
Protobuf type google.cloud.optimization.v1.ShipmentRoute
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > ShipmentRouteImplements
ShipmentRouteOrBuilderStatic Fields
BREAKS_FIELD_NUMBER
public static final int BREAKS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
DELAY_BEFORE_VEHICLE_END_FIELD_NUMBER
public static final int DELAY_BEFORE_VEHICLE_END_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
END_LOADS_FIELD_NUMBER
public static final int END_LOADS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
HAS_TRAFFIC_INFEASIBILITIES_FIELD_NUMBER
public static final int HAS_TRAFFIC_INFEASIBILITIES_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
METRICS_FIELD_NUMBER
public static final int METRICS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
ROUTE_COSTS_FIELD_NUMBER
public static final int ROUTE_COSTS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
ROUTE_POLYLINE_FIELD_NUMBER
public static final int ROUTE_POLYLINE_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
ROUTE_TOTAL_COST_FIELD_NUMBER
public static final int ROUTE_TOTAL_COST_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
TRANSITIONS_FIELD_NUMBER
public static final int TRANSITIONS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
TRAVEL_STEPS_FIELD_NUMBER
public static final int TRAVEL_STEPS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
VEHICLE_DETOUR_FIELD_NUMBER
public static final int VEHICLE_DETOUR_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
VEHICLE_END_TIME_FIELD_NUMBER
public static final int VEHICLE_END_TIME_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
VEHICLE_INDEX_FIELD_NUMBER
public static final int VEHICLE_INDEX_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
VEHICLE_LABEL_FIELD_NUMBER
public static final int VEHICLE_LABEL_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
VEHICLE_START_TIME_FIELD_NUMBER
public static final int VEHICLE_START_TIME_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
VISITS_FIELD_NUMBER
public static final int VISITS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static ShipmentRoute getDefaultInstance()
Returns | |
---|---|
Type | Description |
ShipmentRoute |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static ShipmentRoute.Builder newBuilder()
Returns | |
---|---|
Type | Description |
ShipmentRoute.Builder |
newBuilder(ShipmentRoute prototype)
public static ShipmentRoute.Builder newBuilder(ShipmentRoute prototype)
Parameter | |
---|---|
Name | Description |
prototype | ShipmentRoute |
Returns | |
---|---|
Type | Description |
ShipmentRoute.Builder |
parseDelimitedFrom(InputStream input)
public static ShipmentRoute parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input | InputStream |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ShipmentRoute parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static ShipmentRoute parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data | byte[] |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ShipmentRoute parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static ShipmentRoute parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data | ByteString |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ShipmentRoute parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static ShipmentRoute parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input | CodedInputStream |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ShipmentRoute parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static ShipmentRoute parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input | InputStream |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ShipmentRoute parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static ShipmentRoute parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data | ByteBuffer |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ShipmentRoute parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ShipmentRoute |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<ShipmentRoute> parser()
Returns | |
---|---|
Type | Description |
Parser<ShipmentRoute> |
Methods
containsRouteCosts(String key)
public boolean containsRouteCosts(String key)
Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.
map<string, double> route_costs = 17;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
boolean |
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj | Object |
Returns | |
---|---|
Type | Description |
boolean |
getBreaks(int index)
public ShipmentRoute.Break getBreaks(int index)
Breaks scheduled for the vehicle performing this route.
The breaks
sequence represents time intervals, each starting at the
corresponding start_time
and lasting duration
seconds.
repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ShipmentRoute.Break |
getBreaksCount()
public int getBreaksCount()
Breaks scheduled for the vehicle performing this route.
The breaks
sequence represents time intervals, each starting at the
corresponding start_time
and lasting duration
seconds.
repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;
Returns | |
---|---|
Type | Description |
int |
getBreaksList()
public List<ShipmentRoute.Break> getBreaksList()
Breaks scheduled for the vehicle performing this route.
The breaks
sequence represents time intervals, each starting at the
corresponding start_time
and lasting duration
seconds.
repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;
Returns | |
---|---|
Type | Description |
List<Break> |
getBreaksOrBuilder(int index)
public ShipmentRoute.BreakOrBuilder getBreaksOrBuilder(int index)
Breaks scheduled for the vehicle performing this route.
The breaks
sequence represents time intervals, each starting at the
corresponding start_time
and lasting duration
seconds.
repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ShipmentRoute.BreakOrBuilder |
getBreaksOrBuilderList()
public List<? extends ShipmentRoute.BreakOrBuilder> getBreaksOrBuilderList()
Breaks scheduled for the vehicle performing this route.
The breaks
sequence represents time intervals, each starting at the
corresponding start_time
and lasting duration
seconds.
repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentRoute.BreakOrBuilder> |
getDefaultInstanceForType()
public ShipmentRoute getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
ShipmentRoute |
getDelayBeforeVehicleEnd() (deprecated)
public ShipmentRoute.Delay getDelayBeforeVehicleEnd()
Deprecated. google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2219
Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.
.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];
Returns | |
---|---|
Type | Description |
ShipmentRoute.Delay | The delayBeforeVehicleEnd. |
getDelayBeforeVehicleEndOrBuilder()
public ShipmentRoute.DelayOrBuilder getDelayBeforeVehicleEndOrBuilder()
Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.
.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];
Returns | |
---|---|
Type | Description |
ShipmentRoute.DelayOrBuilder |
getEndLoads(int index)
public CapacityQuantity getEndLoads(int index)
Deprecated: Use
Transition.vehicle_loads
instead. Vehicle loads upon arrival at its end location, for each type
specified in
Vehicle.capacities,
start_load_intervals
, end_load_intervals
or demands. Exception: we omit
loads for quantity types unconstrained by intervals and that don't have any
non-zero demand on the route.
repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
CapacityQuantity |
getEndLoadsCount()
public int getEndLoadsCount()
Deprecated: Use
Transition.vehicle_loads
instead. Vehicle loads upon arrival at its end location, for each type
specified in
Vehicle.capacities,
start_load_intervals
, end_load_intervals
or demands. Exception: we omit
loads for quantity types unconstrained by intervals and that don't have any
non-zero demand on the route.
repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];
Returns | |
---|---|
Type | Description |
int |
getEndLoadsList()
public List<CapacityQuantity> getEndLoadsList()
Deprecated: Use
Transition.vehicle_loads
instead. Vehicle loads upon arrival at its end location, for each type
specified in
Vehicle.capacities,
start_load_intervals
, end_load_intervals
or demands. Exception: we omit
loads for quantity types unconstrained by intervals and that don't have any
non-zero demand on the route.
repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];
Returns | |
---|---|
Type | Description |
List<CapacityQuantity> |
getEndLoadsOrBuilder(int index)
public CapacityQuantityOrBuilder getEndLoadsOrBuilder(int index)
Deprecated: Use
Transition.vehicle_loads
instead. Vehicle loads upon arrival at its end location, for each type
specified in
Vehicle.capacities,
start_load_intervals
, end_load_intervals
or demands. Exception: we omit
loads for quantity types unconstrained by intervals and that don't have any
non-zero demand on the route.
repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
CapacityQuantityOrBuilder |
getEndLoadsOrBuilderList()
public List<? extends CapacityQuantityOrBuilder> getEndLoadsOrBuilderList()
Deprecated: Use
Transition.vehicle_loads
instead. Vehicle loads upon arrival at its end location, for each type
specified in
Vehicle.capacities,
start_load_intervals
, end_load_intervals
or demands. Exception: we omit
loads for quantity types unconstrained by intervals and that don't have any
non-zero demand on the route.
repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder> |
getHasTrafficInfeasibilities()
public boolean getHasTrafficInfeasibilities()
When OptimizeToursRequest.consider_road_traffic, is set to true, this field indicates that inconsistencies in route timings are predicted using traffic-based travel duration estimates. There may be insufficient time to complete traffic-adjusted travel, delays, and breaks between visits, before the first visit, or after the last visit, while still satisfying the visit and vehicle time windows. For example,
`
start_time(previous_visit) + duration(previous_visit) +
travel_duration(previous_visit, next_visit) > start_time(next_visit)
Arrival at next_visit will likely happen later than its current
time window due the increased estimate of travel time
travel_duration(previous_visit, next_visit)` due to traffic. Also, a break
may be forced to overlap with a visit due to an increase in travel time
estimates and visit or break time window restrictions.
bool has_traffic_infeasibilities = 9;
Returns | |
---|---|
Type | Description |
boolean | The hasTrafficInfeasibilities. |
getMetrics()
public AggregatedMetrics getMetrics()
Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.
.google.cloud.optimization.v1.AggregatedMetrics metrics = 12;
Returns | |
---|---|
Type | Description |
AggregatedMetrics | The metrics. |
getMetricsOrBuilder()
public AggregatedMetricsOrBuilder getMetricsOrBuilder()
Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.
.google.cloud.optimization.v1.AggregatedMetrics metrics = 12;
Returns | |
---|---|
Type | Description |
AggregatedMetricsOrBuilder |
getParserForType()
public Parser<ShipmentRoute> getParserForType()
Returns | |
---|---|
Type | Description |
Parser<ShipmentRoute> |
getRouteCosts()
public Map<String,Double> getRouteCosts()
Use #getRouteCostsMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,Double> |
getRouteCostsCount()
public int getRouteCostsCount()
Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.
map<string, double> route_costs = 17;
Returns | |
---|---|
Type | Description |
int |
getRouteCostsMap()
public Map<String,Double> getRouteCostsMap()
Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.
map<string, double> route_costs = 17;
Returns | |
---|---|
Type | Description |
Map<String,Double> |
getRouteCostsOrDefault(String key, double defaultValue)
public double getRouteCostsOrDefault(String key, double defaultValue)
Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.
map<string, double> route_costs = 17;
Parameters | |
---|---|
Name | Description |
key | String |
defaultValue | double |
Returns | |
---|---|
Type | Description |
double |
getRouteCostsOrThrow(String key)
public double getRouteCostsOrThrow(String key)
Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.
map<string, double> route_costs = 17;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
double |
getRoutePolyline()
public ShipmentRoute.EncodedPolyline getRoutePolyline()
The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;
Returns | |
---|---|
Type | Description |
ShipmentRoute.EncodedPolyline | The routePolyline. |
getRoutePolylineOrBuilder()
public ShipmentRoute.EncodedPolylineOrBuilder getRoutePolylineOrBuilder()
The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;
Returns | |
---|---|
Type | Description |
ShipmentRoute.EncodedPolylineOrBuilder |
getRouteTotalCost()
public double getRouteTotalCost()
Total cost of the route. The sum of all costs in the cost map.
double route_total_cost = 18;
Returns | |
---|---|
Type | Description |
double | The routeTotalCost. |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
getTransitions(int index)
public ShipmentRoute.Transition getTransitions(int index)
Ordered list of transitions for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ShipmentRoute.Transition |
getTransitionsCount()
public int getTransitionsCount()
Ordered list of transitions for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;
Returns | |
---|---|
Type | Description |
int |
getTransitionsList()
public List<ShipmentRoute.Transition> getTransitionsList()
Ordered list of transitions for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;
Returns | |
---|---|
Type | Description |
List<Transition> |
getTransitionsOrBuilder(int index)
public ShipmentRoute.TransitionOrBuilder getTransitionsOrBuilder(int index)
Ordered list of transitions for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ShipmentRoute.TransitionOrBuilder |
getTransitionsOrBuilderList()
public List<? extends ShipmentRoute.TransitionOrBuilder> getTransitionsOrBuilderList()
Ordered list of transitions for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentRoute.TransitionOrBuilder> |
getTravelSteps(int index)
public ShipmentRoute.TravelStep getTravelSteps(int index)
Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ShipmentRoute.TravelStep |
getTravelStepsCount()
public int getTravelStepsCount()
Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];
Returns | |
---|---|
Type | Description |
int |
getTravelStepsList()
public List<ShipmentRoute.TravelStep> getTravelStepsList()
Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];
Returns | |
---|---|
Type | Description |
List<TravelStep> |
getTravelStepsOrBuilder(int index)
public ShipmentRoute.TravelStepOrBuilder getTravelStepsOrBuilder(int index)
Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ShipmentRoute.TravelStepOrBuilder |
getTravelStepsOrBuilderList()
public List<? extends ShipmentRoute.TravelStepOrBuilder> getTravelStepsOrBuilderList()
Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.
repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentRoute.TravelStepOrBuilder> |
getVehicleDetour() (deprecated)
public Duration getVehicleDetour()
Deprecated. google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2215
Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit level.
This field is the extra detour time due to the shipments visited on the route.
It is equal to vehicle_end_time
- vehicle_start_time
- travel duration
from the vehicle's start_location to its end_location
.
.google.protobuf.Duration vehicle_detour = 15 [deprecated = true];
Returns | |
---|---|
Type | Description |
Duration | The vehicleDetour. |
getVehicleDetourOrBuilder()
public DurationOrBuilder getVehicleDetourOrBuilder()
Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit level.
This field is the extra detour time due to the shipments visited on the route.
It is equal to vehicle_end_time
- vehicle_start_time
- travel duration
from the vehicle's start_location to its end_location
.
.google.protobuf.Duration vehicle_detour = 15 [deprecated = true];
Returns | |
---|---|
Type | Description |
DurationOrBuilder |
getVehicleEndTime()
public Timestamp getVehicleEndTime()
Time at which the vehicle finishes its route.
.google.protobuf.Timestamp vehicle_end_time = 6;
Returns | |
---|---|
Type | Description |
Timestamp | The vehicleEndTime. |
getVehicleEndTimeOrBuilder()
public TimestampOrBuilder getVehicleEndTimeOrBuilder()
Time at which the vehicle finishes its route.
.google.protobuf.Timestamp vehicle_end_time = 6;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getVehicleIndex()
public int getVehicleIndex()
Vehicle performing the route, identified by its index in the source
ShipmentModel
.
int32 vehicle_index = 1;
Returns | |
---|---|
Type | Description |
int | The vehicleIndex. |
getVehicleLabel()
public String getVehicleLabel()
Label of the vehicle performing this route, equal to
ShipmentModel.vehicles(vehicle_index).label
, if specified.
string vehicle_label = 2;
Returns | |
---|---|
Type | Description |
String | The vehicleLabel. |
getVehicleLabelBytes()
public ByteString getVehicleLabelBytes()
Label of the vehicle performing this route, equal to
ShipmentModel.vehicles(vehicle_index).label
, if specified.
string vehicle_label = 2;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for vehicleLabel. |
getVehicleStartTime()
public Timestamp getVehicleStartTime()
Time at which the vehicle starts its route.
.google.protobuf.Timestamp vehicle_start_time = 5;
Returns | |
---|---|
Type | Description |
Timestamp | The vehicleStartTime. |
getVehicleStartTimeOrBuilder()
public TimestampOrBuilder getVehicleStartTimeOrBuilder()
Time at which the vehicle starts its route.
.google.protobuf.Timestamp vehicle_start_time = 5;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getVisits(int index)
public ShipmentRoute.Visit getVisits(int index)
Ordered sequence of visits representing a route. visits[i] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.
repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ShipmentRoute.Visit |
getVisitsCount()
public int getVisitsCount()
Ordered sequence of visits representing a route. visits[i] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.
repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;
Returns | |
---|---|
Type | Description |
int |
getVisitsList()
public List<ShipmentRoute.Visit> getVisitsList()
Ordered sequence of visits representing a route. visits[i] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.
repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;
Returns | |
---|---|
Type | Description |
List<Visit> |
getVisitsOrBuilder(int index)
public ShipmentRoute.VisitOrBuilder getVisitsOrBuilder(int index)
Ordered sequence of visits representing a route. visits[i] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.
repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ShipmentRoute.VisitOrBuilder |
getVisitsOrBuilderList()
public List<? extends ShipmentRoute.VisitOrBuilder> getVisitsOrBuilderList()
Ordered sequence of visits representing a route. visits[i] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.
repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentRoute.VisitOrBuilder> |
hasDelayBeforeVehicleEnd() (deprecated)
public boolean hasDelayBeforeVehicleEnd()
Deprecated. google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2219
Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.
.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];
Returns | |
---|---|
Type | Description |
boolean | Whether the delayBeforeVehicleEnd field is set. |
hasMetrics()
public boolean hasMetrics()
Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.
.google.cloud.optimization.v1.AggregatedMetrics metrics = 12;
Returns | |
---|---|
Type | Description |
boolean | Whether the metrics field is set. |
hasRoutePolyline()
public boolean hasRoutePolyline()
The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;
Returns | |
---|---|
Type | Description |
boolean | Whether the routePolyline field is set. |
hasVehicleDetour() (deprecated)
public boolean hasVehicleDetour()
Deprecated. google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2215
Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit level.
This field is the extra detour time due to the shipments visited on the route.
It is equal to vehicle_end_time
- vehicle_start_time
- travel duration
from the vehicle's start_location to its end_location
.
.google.protobuf.Duration vehicle_detour = 15 [deprecated = true];
Returns | |
---|---|
Type | Description |
boolean | Whether the vehicleDetour field is set. |
hasVehicleEndTime()
public boolean hasVehicleEndTime()
Time at which the vehicle finishes its route.
.google.protobuf.Timestamp vehicle_end_time = 6;
Returns | |
---|---|
Type | Description |
boolean | Whether the vehicleEndTime field is set. |
hasVehicleStartTime()
public boolean hasVehicleStartTime()
Time at which the vehicle starts its route.
.google.protobuf.Timestamp vehicle_start_time = 5;
Returns | |
---|---|
Type | Description |
boolean | Whether the vehicleStartTime field is set. |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter | |
---|---|
Name | Description |
number | int |
Returns | |
---|---|
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public ShipmentRoute.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
ShipmentRoute.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ShipmentRoute.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent | BuilderParent |
Returns | |
---|---|
Type | Description |
ShipmentRoute.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused | UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public ShipmentRoute.Builder toBuilder()
Returns | |
---|---|
Type | Description |
ShipmentRoute.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output | CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |