Interface DistanceLimitOrBuilder (1.52.0)

public interface DistanceLimitOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getCostPerKilometerAboveSoftMax()

public abstract 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: <code><code> (distance_meters - soft_max_meters) / 1000.0 * cost_per_kilometer_above_soft_max. </code></code> The cost must be nonnegative.

optional double cost_per_kilometer_above_soft_max = 3;

Returns
Type Description
double

The costPerKilometerAboveSoftMax.

getCostPerKilometerBelowSoftMax()

public abstract double getCostPerKilometerBelowSoftMax()

Cost per kilometer incurred, increasing up to soft_max_meters, with formula: <code><code> min(distance_meters, soft_max_meters) / 1000.0 * cost_per_kilometer_below_soft_max. </code></code><code> This cost is not supported in </code>route_distance_limit.

optional double cost_per_kilometer_below_soft_max = 4;

Returns
Type Description
double

The costPerKilometerBelowSoftMax.

getMaxMeters()

public abstract 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
Type Description
long

The maxMeters.

getSoftMaxMeters()

public abstract 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
Type Description
long

The softMaxMeters.

hasCostPerKilometerAboveSoftMax()

public abstract 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: <code><code> (distance_meters - soft_max_meters) / 1000.0 * cost_per_kilometer_above_soft_max. </code></code> The cost must be nonnegative.

optional double cost_per_kilometer_above_soft_max = 3;

Returns
Type Description
boolean

Whether the costPerKilometerAboveSoftMax field is set.

hasCostPerKilometerBelowSoftMax()

public abstract boolean hasCostPerKilometerBelowSoftMax()

Cost per kilometer incurred, increasing up to soft_max_meters, with formula: <code><code> min(distance_meters, soft_max_meters) / 1000.0 * cost_per_kilometer_below_soft_max. </code></code><code> This cost is not supported in </code>route_distance_limit.

optional double cost_per_kilometer_below_soft_max = 4;

Returns
Type Description
boolean

Whether the costPerKilometerBelowSoftMax field is set.

hasMaxMeters()

public abstract 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
Type Description
boolean

Whether the maxMeters field is set.

hasSoftMaxMeters()

public abstract 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
Type Description
boolean

Whether the softMaxMeters field is set.