Class: Google::Cloud::Optimization::V1::ShipmentModel::BreakRule

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

Deprecated: Use top level [BreakRule][] instead. Rules to generate time breaks for a vehicle (e.g. lunch breaks). A break is a contiguous period of time during which the vehicle remains idle at its current position and cannot perform any visit. A break may occur:

  • during the travel between two visits (which includes the time right before or right after a visit, but not in the middle of a visit), in which case it extends the corresponding transit time between the visits,
  • or before the vehicle start (the vehicle may not start in the middle of a break), in which case it does not affect the vehicle start time.
  • or after the vehicle end (ditto, with the vehicle end time).

Defined Under Namespace

Classes: BreakRequest, FrequencyConstraint

Instance Attribute Summary collapse

Instance Attribute Details

#break_requests::Array<::Google::Cloud::Optimization::V1::ShipmentModel::BreakRule::BreakRequest>

Returns Sequence of breaks. See the BreakRequest message.

Returns:



663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 663

class BreakRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The sequence of breaks (i.e. their number and order) that apply to each
  # vehicle must be known beforehand. The repeated `BreakRequest`s define
  # that sequence, in the order in which they must occur. Their time windows
  # (`earliest_start_time` / `latest_start_time`) may overlap, but they must
  # be compatible with the order (this is checked).
  # @!attribute [rw] earliest_start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Required. Lower bound (inclusive) on the start of the break.
  # @!attribute [rw] latest_start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Required. Upper bound (inclusive) on the start of the break.
  # @!attribute [rw] min_duration
  #   @return [::Google::Protobuf::Duration]
  #     Required. Minimum duration of the break. Must be positive.
  class BreakRequest
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # One may further constrain the frequency and duration of the breaks
  # specified above, by enforcing a minimum break frequency, such as
  # "There must be a break of at least 1 hour every 12 hours". Assuming that
  # this can be interpreted as "Within any sliding time window of 12h, there
  # must be at least one break of at least one hour", that example would
  # translate to the following `FrequencyConstraint`:
  # ```
  # {
  #    min_break_duration { seconds: 3600 }         # 1 hour.
  #    max_inter_break_duration { seconds: 39600 }  # 11 hours (12 - 1 = 11).
  # }
  # ```
  #
  # The timing and duration of the breaks in the solution will respect all
  # such constraints, in addition to the time windows and minimum durations
  # already specified in the `BreakRequest`.
  #
  # A `FrequencyConstraint` may in practice apply to non-consecutive breaks.
  # For example, the following schedule honors the "1h every 12h" example:
  # ```
  #   04:00 vehicle start
  #    .. performing travel and visits ..
  #   09:00 1 hour break
  #   10:00 end of the break
  #    .. performing travel and visits ..
  #   12:00 20-min lunch break
  #   12:20 end of the break
  #    .. performing travel and visits ..
  #   21:00 1 hour break
  #   22:00 end of the break
  #    .. performing travel and visits ..
  #   23:59 vehicle end
  # ```
  # @!attribute [rw] min_break_duration
  #   @return [::Google::Protobuf::Duration]
  #     Required. Minimum break duration for this constraint. Nonnegative.
  #     See description of `FrequencyConstraint`.
  # @!attribute [rw] max_inter_break_duration
  #   @return [::Google::Protobuf::Duration]
  #     Required. Maximum allowed span of any interval of time in the route that does not
  #     include at least partially a break of `duration >=
  #     min_break_duration`. Must be positive.
  class FrequencyConstraint
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#frequency_constraints::Array<::Google::Cloud::Optimization::V1::ShipmentModel::BreakRule::FrequencyConstraint>

Returns Several FrequencyConstraint may apply. They must all be satisfied by the BreakRequests of this BreakRule. See FrequencyConstraint.

Returns:



663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 663

class BreakRule
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The sequence of breaks (i.e. their number and order) that apply to each
  # vehicle must be known beforehand. The repeated `BreakRequest`s define
  # that sequence, in the order in which they must occur. Their time windows
  # (`earliest_start_time` / `latest_start_time`) may overlap, but they must
  # be compatible with the order (this is checked).
  # @!attribute [rw] earliest_start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Required. Lower bound (inclusive) on the start of the break.
  # @!attribute [rw] latest_start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Required. Upper bound (inclusive) on the start of the break.
  # @!attribute [rw] min_duration
  #   @return [::Google::Protobuf::Duration]
  #     Required. Minimum duration of the break. Must be positive.
  class BreakRequest
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # One may further constrain the frequency and duration of the breaks
  # specified above, by enforcing a minimum break frequency, such as
  # "There must be a break of at least 1 hour every 12 hours". Assuming that
  # this can be interpreted as "Within any sliding time window of 12h, there
  # must be at least one break of at least one hour", that example would
  # translate to the following `FrequencyConstraint`:
  # ```
  # {
  #    min_break_duration { seconds: 3600 }         # 1 hour.
  #    max_inter_break_duration { seconds: 39600 }  # 11 hours (12 - 1 = 11).
  # }
  # ```
  #
  # The timing and duration of the breaks in the solution will respect all
  # such constraints, in addition to the time windows and minimum durations
  # already specified in the `BreakRequest`.
  #
  # A `FrequencyConstraint` may in practice apply to non-consecutive breaks.
  # For example, the following schedule honors the "1h every 12h" example:
  # ```
  #   04:00 vehicle start
  #    .. performing travel and visits ..
  #   09:00 1 hour break
  #   10:00 end of the break
  #    .. performing travel and visits ..
  #   12:00 20-min lunch break
  #   12:20 end of the break
  #    .. performing travel and visits ..
  #   21:00 1 hour break
  #   22:00 end of the break
  #    .. performing travel and visits ..
  #   23:59 vehicle end
  # ```
  # @!attribute [rw] min_break_duration
  #   @return [::Google::Protobuf::Duration]
  #     Required. Minimum break duration for this constraint. Nonnegative.
  #     See description of `FrequencyConstraint`.
  # @!attribute [rw] max_inter_break_duration
  #   @return [::Google::Protobuf::Duration]
  #     Required. Maximum allowed span of any interval of time in the route that does not
  #     include at least partially a break of `duration >=
  #     min_break_duration`. Must be positive.
  class FrequencyConstraint
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end