Package com.google.cloud.optimization.v1
Interface DistanceLimitOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
DistanceLimit,DistanceLimit.Builder
@Generated
public interface DistanceLimitOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptiondoubleCost per kilometer incurred if distance is above `soft_max_meters` limit.doubleCost per kilometer incurred, increasing up to `soft_max_meters`, with formula: ``` min(distance_meters, soft_max_meters) / 1000.0 * cost_per_kilometer_below_soft_max. ``` This cost is not supported in `route_distance_limit`.longA hard limit constraining the distance to be at most max_meters.longA soft limit not enforcing a maximum distance limit, but when violated results in a cost which adds up to other costs defined in the model, with the same unit.booleanCost per kilometer incurred if distance is above `soft_max_meters` limit.booleanCost per kilometer incurred, increasing up to `soft_max_meters`, with formula: ``` min(distance_meters, soft_max_meters) / 1000.0 * cost_per_kilometer_below_soft_max. ``` This cost is not supported in `route_distance_limit`.booleanA hard limit constraining the distance to be at most max_meters.booleanA soft limit not enforcing a maximum distance limit, but when violated results in a cost which adds up to other costs defined in the model, with the same unit.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
hasMaxMeters
boolean hasMaxMeters()A hard limit constraining the distance to be at most max_meters. The limit must be nonnegative.
optional int64 max_meters = 1;- Returns:
- Whether the maxMeters field is set.
-
getMaxMeters
long getMaxMeters()A hard limit constraining the distance to be at most max_meters. The limit must be nonnegative.
optional int64 max_meters = 1;- Returns:
- The maxMeters.
-
hasSoftMaxMeters
boolean hasSoftMaxMeters()A soft limit not enforcing a maximum distance limit, but when violated results in a cost which adds up to other costs defined in the model, with the same unit. If defined soft_max_meters must be less than max_meters and must be nonnegative.
optional int64 soft_max_meters = 2;- Returns:
- Whether the softMaxMeters field is set.
-
getSoftMaxMeters
long getSoftMaxMeters()A soft limit not enforcing a maximum distance limit, but when violated results in a cost which adds up to other costs defined in the model, with the same unit. If defined soft_max_meters must be less than max_meters and must be nonnegative.
optional int64 soft_max_meters = 2;- Returns:
- The softMaxMeters.
-
hasCostPerKilometerBelowSoftMax
boolean hasCostPerKilometerBelowSoftMax()Cost per kilometer incurred, increasing up to `soft_max_meters`, with formula: ``` min(distance_meters, soft_max_meters) / 1000.0 * cost_per_kilometer_below_soft_max. ``` This cost is not supported in `route_distance_limit`.
optional double cost_per_kilometer_below_soft_max = 4;- Returns:
- Whether the costPerKilometerBelowSoftMax field is set.
-
getCostPerKilometerBelowSoftMax
double getCostPerKilometerBelowSoftMax()Cost per kilometer incurred, increasing up to `soft_max_meters`, with formula: ``` min(distance_meters, soft_max_meters) / 1000.0 * cost_per_kilometer_below_soft_max. ``` This cost is not supported in `route_distance_limit`.
optional double cost_per_kilometer_below_soft_max = 4;- Returns:
- The costPerKilometerBelowSoftMax.
-
hasCostPerKilometerAboveSoftMax
boolean hasCostPerKilometerAboveSoftMax()Cost per kilometer incurred if distance is above `soft_max_meters` limit. The additional cost is 0 if the distance is under the limit, otherwise the formula used to compute the cost is the following: ``` (distance_meters - soft_max_meters) / 1000.0 * cost_per_kilometer_above_soft_max. ``` The cost must be nonnegative.
optional double cost_per_kilometer_above_soft_max = 3;- Returns:
- Whether the costPerKilometerAboveSoftMax field is set.
-
getCostPerKilometerAboveSoftMax
double getCostPerKilometerAboveSoftMax()Cost per kilometer incurred if distance is above `soft_max_meters` limit. The additional cost is 0 if the distance is under the limit, otherwise the formula used to compute the cost is the following: ``` (distance_meters - soft_max_meters) / 1000.0 * cost_per_kilometer_above_soft_max. ``` The cost must be nonnegative.
optional double cost_per_kilometer_above_soft_max = 3;- Returns:
- The costPerKilometerAboveSoftMax.
-