2.18 Maintenance

The optimiser can schedule the servicing of vehicles, such as oil changes and inspections, that falls due as the vehicles accumulate distance. It does this by inserting maintenance visits into the vehicles’ routes. Maintenance visits are not orders: they are planned by the optimiser to meet each vehicle’s maintenance requirements.

2.18.1 Odometer Readings and Maintenance Schemes

A vehicle is subject to maintenance if it has both of the following:

  1. Odometer Reading

    The reading of the vehicle’s odometer at the start of its first shift.

  2. Maintenance Scheme

    The identifier of the scheme that gives the vehicle’s maintenance events. Several vehicles may use the same scheme.

A vehicle must have either both of these or neither of them.

A maintenance scheme is a list of maintenance events.

2.18.2 Maintenance Events

A maintenance event is either fixed, falling due once, or periodic, falling due at regular distances. (See Periodic Maintenance Events below.) Each maintenance event consists of the following:

  1. Id

    An identifier for the event, unique within its scheme. Optional, unless another event supersedes it.

  2. Interval

    For a periodic event only: the distance between its due points. Must be positive.

  3. Minimum Distance

    For a fixed event, the odometer reading from which the event may be performed. For a periodic event, the offset from each due point from which an occurrence may be performed.

  4. Maximum Distance

    For a fixed event, the odometer reading by which the event must be performed. For a periodic event, the offset from each due point by which an occurrence must be performed.

  5. Duration

    The time the event takes at the maintenance location. Must be positive.

  6. Attributes

    The attributes of the event, which determine the locations at which it can be performed. (See Maintenance Locations below.)

  7. Fixed Penalty

    The penalty incurred once if the event overruns its maximum distance. Optional; must be nonnegative.

  8. Distance Penalty

    The penalty per kilometre by which the event overruns its maximum distance. Optional; must be nonnegative.

  9. Supersedes

    For a periodic event only: the identifiers of the periodic events of the same scheme that it supersedes. Optional.

An event that has either penalty, even a penalty of 0, is soft; an event that has neither is hard. A missing penalty of a soft event counts as 0, and a soft event whose penalties are both 0 may overrun its maximum distance at no cost. The minimum distance must not exceed the maximum distance. The minimum and maximum distances of a fixed event are odometer readings, not distances along the route, and must be nonnegative; the distance ranges of a scheme’s fixed events may share an endpoint but must not otherwise overlap. Those of a periodic event are offsets, and may be negative.

Odometer readings and event distances are in kilometres.

2.18.3 Periodic Maintenance Events

A periodic event with interval I falls due at the odometer readings I, 2I, 3I, … (its due points). Its k-th occurrence is due at kI, and may be performed while the odometer reading lies between kI + m and kI + M, where m and M are its minimum and maximum distances: offsets from the due point, which may be negative. M − m must not exceed I, so that the ranges of successive occurrences share at most an endpoint. Everything said in this section about an event applies to each occurrence of a periodic event, its range taking the place of the event’s distances. Only the occurrences that a route reaches are considered, however long it is.

Example: A service due every 30,000 km that may be performed up to 1,000 km early has interval 30000, minimum distance -1000 and maximum distance 0. For a vehicle with an odometer reading of 58200, its next occurrence is due at 60000, and may be performed between 59000 and 60000; the following one is due at 90000.

The due points are always multiples of the interval, whenever (or whether) the previous occurrence was in fact performed.

2.18.4 Superseding Maintenance Events

A periodic event may supersede other periodic events of its scheme, as a major service includes a minor one. Where an occurrence of an event is due at the same point as an occurrence of an event that supersedes it, only the latter is performed, with its own range, duration and penalties; the superseded occurrence is not performed and incurs no penalty. The superseded event’s later occurrences are due as before. Supersession is transitive: if C supersedes B and B supersedes A, then C also supersedes A. An event must not supersede itself, directly or through other events.

Example: A scheme has a 30,000 km service and a 90,000 km service that supersedes it. At 90000, 180000, … only the 90,000 km service is performed; at 30000, 60000, 120000, … the 30,000 km service is.

2.18.5 When a Maintenance Event Is Required

Consider a vehicle with odometer reading O at the start of one of its shifts, and one of its maintenance events, with minimum distance m and maximum distance M (for an occurrence of a periodic event, the odometer readings bounding its range).

  • If O > M, then the event is taken to have been performed already, and it is ignored.
  • If the vehicle’s route on the shift does not take its odometer past M, then the event is not required.
  • Otherwise, the vehicle must visit a location at which the event can be performed, and perform the event there, while its odometer reading lies between m and M.

For a hard event, a route that requires the event but on which the optimiser cannot schedule it within its distances (for example, because no location is compatible with the event, or no such location can be visited within the event’s distances and the location’s operating times) is not allowed. A soft event may instead overrun its maximum distance. (See Overrunning Maintenance Events below.)

Example: A vehicle has an odometer reading of 87500 and an event with minimum distance 91000, maximum distance 94000 and duration 4:00. If its route is less than 6500 km long, then the event is not required. Otherwise, the vehicle must spend four hours at a compatible location after it has travelled at least 3500 km and no more than 6500 km of its route.

2.18.6 Vehicles with Several Shifts

The odometer reading of a vehicle is its reading at the start of its first shift. When a vehicle subject to maintenance has several shifts, the shifts are solved in order of their start times: each shift starts from the odometer reading at the end of the previous one, and a fixed event performed on an earlier shift is not required again.

2.18.7 Maintenance Locations

A maintenance event can be performed at any location in the scenario that is compatible with it under maintenance-location compatibility. (See Section 2.23.) The event’s attributes are its requirements and the locations’ attributes are their features, and the Null, Disjunction and Conjunction rules apply. In particular:

  • An event attribute that is not part of the compatibility relationship imposes no restriction, so an event with no such attributes can be performed at any location.
  • Since a location’s identifier is one of its attributes, an event can be restricted to particular locations by giving the event an attribute that is compatible with those locations’ identifiers.
  • An event that has an attribute with no compatible location cannot be performed anywhere. For a hard event, a route must then not take the vehicle’s odometer past the event’s maximum distance; a soft event then overruns it instead.

Maintenance locations need not be the pickup or delivery locations of any order.

2.18.8 Maintenance Visits

The optimiser performs each required maintenance event during a maintenance visit between two consecutive stops of the route: the vehicle makes a detour to the maintenance location, performs the event there, and continues to the next stop. A visit to the location of either of the two stops involves no extra distance. Several visits may lie between the same two stops. Of the possible places for a visit (the stops it lies between and the location), the optimiser chooses the one that adds the least cost, given by the vehicle’s cost per kilometre and cost per hour.

A maintenance visit must lie wholly within one of the operating times of its location. If the vehicle arrives before the location opens, then it waits. Arrival Only in Time Window does not apply to maintenance visits.

A maintenance visit appears in the solution as a MAINTENANCE stop at the maintenance location. Its arrival and departure times are the start and end of the event. A maintenance visit involves no site, load or unload time, and it does not change the vehicle’s load.

2.18.9 Overrunning Maintenance Events

A required soft maintenance event may be performed after its maximum distance (late), or not at all on the route. The event then overruns its maximum distance:

  • by the distance from its maximum distance to the stop at which it is performed, if it is performed late;
  • by the distance from its maximum distance to the end of the route, if it is not performed on the route.

An overrun incurs the event’s fixed penalty plus its distance penalty times the overrun distance. Like other penalties, these are considered by the optimiser but are not included in the costs reported in the solution.

For each required soft event, the optimiser chooses the cheapest of performing it on time, performing it late, and not performing it on the route, counting the cost of the detour and the penalty for any overrun. In particular, a soft event whose penalties are both 0 is only performed if doing so adds no cost. A soft event that is not compatible with any location is not performed, and the route incurs its penalty.

Soft events are useful in finding out whether, and by how much, maintenance is limiting the work that vehicles can do: the overruns in the solution show how far each vehicle would have to go past its maintenance limits.

2.18.10 Breaks During Maintenance

For a vehicle with a fatigue management scheme (its own or its driver’s), a driver break that falls due during a maintenance visit may be taken during the visit. The break starts no earlier than the vehicle’s arrival at the maintenance location (so it may start while the vehicle waits for the location to open) and ends no later than the end of the visit, so it adds no time to the route. In the solution, the BREAK stop then lies within the MAINTENANCE stop. Only the breaks that fall due are taken in this way: the rest of the visit counts as work.

This can be forbidden for a vehicle. A break that falls due during a visit is then taken before the event starts, and the event follows it.

If loaded breaks are forbidden, then a break is not taken during a maintenance visit while the vehicle is loaded.

2.18.11 Maintenance in the Solution

The solution reports the following for each vehicle shift, each load, each driver and the solution as a whole:

  • Maintenance time: the time spent on maintenance visits. This is not included in the idle time. A break taken during a maintenance visit counts as both break time and maintenance time.
  • Maintenance detour distance: the distance added by travelling to maintenance visits.
  • Maintenance detour time: the transit time added by travelling to maintenance visits. This does not include the maintenance time.

These are only reported if the scenario has a vehicle subject to maintenance.

Each shift of a vehicle that is subject to maintenance also has a maintenance summary. This lists each fixed event, and each occurrence of a periodic event, that is performed on the shift or that the shift requires (because it takes the odometer past the maximum), other than superseded occurrences. Each entry gives the event, the occurrence (for a periodic event), its range of odometer readings, the stop at which it is performed and the odometer reading on arrival there (if it is performed on the shift), and its overrun.