Class BreakRule (1.1.2)

BreakRule(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

Attributes

NameDescription
break_requests Sequence[google.cloud.optimization_v1.types.ShipmentModel.BreakRule.BreakRequest]
Sequence of breaks. See the ``BreakRequest`` message.
frequency_constraints Sequence[google.cloud.optimization_v1.types.ShipmentModel.BreakRule.FrequencyConstraint]
Several ``FrequencyConstraint`` may apply. They must all be satisfied by the ``BreakRequest``\ s of this ``BreakRule``. See ``FrequencyConstraint``.

Inheritance

builtins.object > proto.message.Message > BreakRule

Classes

BreakRequest

BreakRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

FrequencyConstraint

FrequencyConstraint(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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