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.
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.
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.
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.
Whether the costPerKilometerAboveSoftMax field is set.
hasCostPerKilometerBelowSoftMax()
publicbooleanhasCostPerKilometerBelowSoftMax()
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]