Class: Google::Cloud::Optimization::V1::DistanceLimit

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/optimization/v1/fleet_routing.rb

Overview

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.

Instance Attribute Summary collapse

Instance Attribute Details

#cost_per_kilometer_above_soft_max::Float

Returns 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:

  (distance_meters - soft_max_meters) / 1000.0 *
  cost_per_kilometer_above_soft_max.

The cost must be nonnegative.

Returns:

  • (::Float)

    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:

      (distance_meters - soft_max_meters) / 1000.0 *
      cost_per_kilometer_above_soft_max.
    

    The cost must be nonnegative.



1665
1666
1667
1668
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1665

class DistanceLimit
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#cost_per_kilometer_below_soft_max::Float

Returns Cost per kilometer incurred, increasing up to soft_max_meters, with formula:

  min(distance_meters, soft_max_meters) / 1000.0 *
  cost_per_kilometer_below_soft_max.

This cost is not supported in route_distance_limit.

Returns:

  • (::Float)

    Cost per kilometer incurred, increasing up to soft_max_meters, with formula:

      min(distance_meters, soft_max_meters) / 1000.0 *
      cost_per_kilometer_below_soft_max.
    

    This cost is not supported in route_distance_limit.



1665
1666
1667
1668
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1665

class DistanceLimit
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#max_meters::Integer

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

Returns:

  • (::Integer)

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



1665
1666
1667
1668
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1665

class DistanceLimit
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#soft_max_meters::Integer

Returns 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.

Returns:

  • (::Integer)

    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.



1665
1666
1667
1668
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1665

class DistanceLimit
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end