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
FrequencyConstraintmay apply.
Instance Attribute Details
#break_requests ⇒ ::Array<::Google::Cloud::Optimization::V1::BreakRule::BreakRequest>
Returns Sequence of breaks. See the BreakRequest message.
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1643 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 BreakRequests of this BreakRule. See FrequencyConstraint.
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1643 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 |