Cloud Optimization v1 API - Class DistanceLimit (2.1.0)

Stay organized with collections Save and categorize content based on your preferences.
public sealed class DistanceLimit : IMessage<DistanceLimit>, IEquatable<DistanceLimit>, IDeepCloneable<DistanceLimit>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Optimization v1 API class DistanceLimit.

A limit defining a maximum distance which can be traveled. It can be either hard or soft.

If a soft limit is defined, both soft_max_meters and cost_per_kilometer_above_soft_max must be defined and be nonnegative.

Inheritance

Object > DistanceLimit

Namespace

Google.Cloud.Optimization.V1

Assembly

Google.Cloud.Optimization.V1.dll

Constructors

DistanceLimit()

public DistanceLimit()

DistanceLimit(DistanceLimit)

public DistanceLimit(DistanceLimit other)
Parameter
NameDescription
otherDistanceLimit

Properties

CostPerKilometerAboveSoftMax

public double CostPerKilometerAboveSoftMax { get; set; }

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:

(distance_meters - soft_max_meters) / 1000.0 *
cost_per_kilometer_above_soft_max.

The cost must be nonnegative.

Property Value
TypeDescription
Double

HasCostPerKilometerAboveSoftMax

public bool HasCostPerKilometerAboveSoftMax { get; }

Gets whether the "cost_per_kilometer_above_soft_max" field is set

Property Value
TypeDescription
Boolean

HasMaxMeters

public bool HasMaxMeters { get; }

Gets whether the "max_meters" field is set

Property Value
TypeDescription
Boolean

HasSoftMaxMeters

public bool HasSoftMaxMeters { get; }

Gets whether the "soft_max_meters" field is set

Property Value
TypeDescription
Boolean

MaxMeters

public long MaxMeters { get; set; }

A hard limit constraining the distance to be at most max_meters. The limit must be nonnegative.

Property Value
TypeDescription
Int64

SoftMaxMeters

public long SoftMaxMeters { get; set; }

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.

Property Value
TypeDescription
Int64