Show / Hide Table of Contents

Class Vehicle.Types.DurationLimit

A limit defining a maximum duration of the route of a vehicle. It can be either hard or soft.

When a soft limit field is defined, both the soft max threshold and its associated cost must be defined together.

Inheritance
object
Vehicle.Types.DurationLimit
Implements
IMessage<Vehicle.Types.DurationLimit>
IEquatable<Vehicle.Types.DurationLimit>
IDeepCloneable<Vehicle.Types.DurationLimit>
IBufferMessage
IMessage
Inherited Members
object.GetHashCode()
object.GetType()
object.ToString()
Namespace: Google.Maps.RouteOptimization.V1
Assembly: Google.Maps.RouteOptimization.V1.dll
Syntax
public sealed class Vehicle.Types.DurationLimit : IMessage<Vehicle.Types.DurationLimit>, IEquatable<Vehicle.Types.DurationLimit>, IDeepCloneable<Vehicle.Types.DurationLimit>, IBufferMessage, IMessage

Constructors

DurationLimit()

Declaration
public DurationLimit()

DurationLimit(DurationLimit)

Declaration
public DurationLimit(Vehicle.Types.DurationLimit other)
Parameters
Type Name Description
Vehicle.Types.DurationLimit other

Properties

CostPerHourAfterSoftMax

Cost per hour incurred if the soft_max_duration threshold is violated. The additional cost is 0 if the duration is under the threshold, otherwise the cost depends on the duration as follows:

  cost_per_hour_after_soft_max * (duration - soft_max_duration)

The cost must be nonnegative.

Declaration
public double CostPerHourAfterSoftMax { get; set; }
Property Value
Type Description
double

CostPerSquareHourAfterQuadraticSoftMax

Cost per square hour incurred if the quadratic_soft_max_duration threshold is violated.

The additional cost is 0 if the duration is under the threshold, otherwise the cost depends on the duration as follows:

  cost_per_square_hour_after_quadratic_soft_max *
  (duration - quadratic_soft_max_duration)^2

The cost must be nonnegative.

Declaration
public double CostPerSquareHourAfterQuadraticSoftMax { get; set; }
Property Value
Type Description
double

HasCostPerHourAfterSoftMax

Gets whether the "cost_per_hour_after_soft_max" field is set

Declaration
public bool HasCostPerHourAfterSoftMax { get; }
Property Value
Type Description
bool

HasCostPerSquareHourAfterQuadraticSoftMax

Gets whether the "cost_per_square_hour_after_quadratic_soft_max" field is set

Declaration
public bool HasCostPerSquareHourAfterQuadraticSoftMax { get; }
Property Value
Type Description
bool

MaxDuration

A hard limit constraining the duration to be at most max_duration.

Declaration
public Duration MaxDuration { get; set; }
Property Value
Type Description
Duration

QuadraticSoftMaxDuration

A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration. This cost adds up to other costs defined in the model, with the same unit.

If defined, quadratic_soft_max_duration must be nonnegative. If max_duration is also defined, quadratic_soft_max_duration must be less than max_duration, and the difference must be no larger than one day:

max_duration - quadratic_soft_max_duration <= 86400 seconds

Declaration
public Duration QuadraticSoftMaxDuration { get; set; }
Property Value
Type Description
Duration

SoftMaxDuration

A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost. This cost adds up to other costs defined in the model, with the same unit.

If defined, soft_max_duration must be nonnegative. If max_duration is also defined, soft_max_duration must be less than max_duration.

Declaration
public Duration SoftMaxDuration { get; set; }
Property Value
Type Description
Duration
In this article
Back to top Generated by DocFX