Class: Google::Cloud::Optimization::V1::BreakRule
- Inherits:
-
Object
- Object
- Google::Cloud::Optimization::V1::BreakRule
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/optimization/v1/fleet_routing.rb
Overview
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
-
#break_requests ⇒ ::Array<::Google::Cloud::Optimization::V1::BreakRule::BreakRequest>
Sequence of breaks.
-
#frequency_constraints ⇒ ::Array<::Google::Cloud::Optimization::V1::BreakRule::FrequencyConstraint>
Several
FrequencyConstraint
may apply.
Instance Attribute Details
#break_requests ⇒ ::Array<::Google::Cloud::Optimization::V1::BreakRule::BreakRequest>
Returns Sequence of breaks. See the BreakRequest
message.
1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1780 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::BreakRule::FrequencyConstraint>
Returns Several FrequencyConstraint
may apply. They must all be satisfied by
the BreakRequest
s of this BreakRule
. See FrequencyConstraint
.
1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1780 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 |