Interface DistanceLimitOrBuilder (1.3.0)

public interface DistanceLimitOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getCostPerKilometerAboveSoftMax()

public abstract double getCostPerKilometerAboveSoftMax()

Cost per kilometer incurred if soft_max_meters limit is violated. 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
TypeDescription
double

The costPerKilometerAboveSoftMax.

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
TypeDescription
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
TypeDescription
long

The softMaxMeters.

hasCostPerKilometerAboveSoftMax()

public abstract boolean hasCostPerKilometerAboveSoftMax()

Cost per kilometer incurred if soft_max_meters limit is violated. 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
TypeDescription
boolean

Whether the costPerKilometerAboveSoftMax 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
TypeDescription
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
TypeDescription
boolean

Whether the softMaxMeters field is set.