{
  "jobs": [
    {
      "name": "installation-project",
      "location": {"latitude": 52.520, "longitude": 13.405},
      "duration": 14400,  // 4 hours
      "resumable": true   // Can be interrupted by breaks
    },
    {
      "name": "quick-repair",
      "location": {"latitude": 52.523, "longitude": 13.401},
      "duration": 1800,   // 30 minutes
      "resumable": false  // Must be completed without interruption (default)
    }
  ],
  "resources": [
    {
      "name": "technician-1",
      "shifts": [{
        "from": "2024-03-15T08:00:00Z",
        "to": "2024-03-15T17:00:00Z",
        "breaks": [{
          "type": "WINDOWED",
          "from": "2024-03-15T12:00:00Z",
          "to": "2024-03-15T13:00:00Z",
          "duration": 3600  // 1-hour lunch break
        }]
      }]
    }
  ]
}

Resumable Jobs

Resumable jobs allow long-duration tasks to be interrupted by scheduled breaks and then resumed, ensuring both task completion and compliance with break requirements. This feature is essential for managing lengthy service appointments alongside mandatory rest periods.

Overview

The resumable jobs feature enables:

  • Jobs to be paused during resource breaks
  • Automatic resumption after breaks complete
  • Better utilization of available working time
  • Compliance with break regulations without sacrificing long jobs

Basic Configuration

Making Jobs Resumable

Set the resumable flag on jobs that can be interrupted:

{
  "jobs": [
    {
      "name": "installation-project",
      "location": {"latitude": 52.520, "longitude": 13.405},
      "duration": 14400,  // 4 hours
      "resumable": true   // Can be interrupted by breaks
    },
    {
      "name": "quick-repair",
      "location": {"latitude": 52.523, "longitude": 13.401},
      "duration": 1800,   // 30 minutes
      "resumable": false  // Must be completed without interruption (default)
    }
  ],
  "resources": [
    {
      "name": "technician-1",
      "shifts": [{
        "from": "2024-03-15T08:00:00Z",
        "to": "2024-03-15T17:00:00Z",
        "breaks": [{
          "type": "WINDOWED",
          "from": "2024-03-15T12:00:00Z",
          "to": "2024-03-15T13:00:00Z",
          "duration": 3600  // 1-hour lunch break
        }]
      }]
    }
  ]
}

Default Behavior: Jobs are non-resumable by default (resumable: false). Only explicitly mark jobs as resumable when interruption is acceptable.

How Resumable Jobs Work

Break Interruption Process

1

Job Starts

Technician begins the resumable job at scheduled time

2

Break Time Arrives

When break window is reached, current job is paused

3

Break Taken

Resource takes the scheduled break (at depot or current location)

4

Job Resumes

After break completion, job automatically resumes where it left off

5

Job Completes

Remaining duration is completed after the break

Example Timeline

For a 4-hour resumable job with a 1-hour lunch break:

08:00 - Arrive at job location
08:00 - Start 4-hour installation (resumable)
12:00 - Pause job for lunch break (4 hours completed)
12:00 - Take lunch break
13:00 - Resume installation
13:00 - Complete installation
13:00 - Available for next job

Use Cases

Long Service Appointments

Handle extended service calls with mandatory breaks:

{
  "jobs": [
    {
      "name": "server-room-upgrade",
      "duration": 21600,  // 6 hours
      "resumable": true,
      "windows": [{
        "from": "2024-03-15T08:00:00Z",
        "to": "2024-03-15T18:00:00Z"
      }]
    }
  ],
  "resources": [{
    "name": "it-specialist",
    "shifts": [{
      "from": "2024-03-15T08:00:00Z",
      "to": "2024-03-15T18:00:00Z",
      "breaks": [
        {
          "type": "WINDOWED",
          "from": "2024-03-15T10:00:00Z",
          "to": "2024-03-15T10:30:00Z",
          "duration": 900  // 15-min morning break
        },
        {
          "type": "WINDOWED",
          "from": "2024-03-15T12:00:00Z",
          "to": "2024-03-15T13:00:00Z",
          "duration": 3600  // 1-hour lunch
        },
        {
          "type": "WINDOWED",
          "from": "2024-03-15T15:00:00Z",
          "to": "2024-03-15T15:30:00Z",
          "duration": 900  // 15-min afternoon break
        }
      ]
    }]
  }]
}

Construction and Installation

Manage multi-hour installations with regulated breaks:

{
  "jobs": [
    {
      "name": "kitchen-installation",
      "duration": 18000,  // 5 hours
      "resumable": true,
      "tags": [{"name": "installation", "hard": true}]
    },
    {
      "name": "appliance-delivery",
      "duration": 1200,   // 20 minutes
      "resumable": false  // Quick task, don't interrupt
    }
  ]
}

Healthcare Services

Extended patient care with mandatory rest periods:

{
  "jobs": [
    {
      "name": "home-care-visit",
      "duration": 10800,  // 3 hours
      "resumable": true,
      "priority": 100
    }
  ],
  "resources": [{
    "name": "caregiver",
    "shifts": [{
      "from": "2024-03-15T08:00:00Z",
      "to": "2024-03-15T16:00:00Z",
      "breaks": [{
        "type": "WINDOWED",
        "from": "2024-03-15T11:00:00Z",
        "to": "2024-03-15T12:00:00Z",
        "duration": 1800  // 30-min break
      }]
    }]
  }]
}

Interaction with Break Types

Windowed Breaks

Most flexible - solver optimizes when to interrupt:

{
  "breaks": [{
    "type": "WINDOWED",
    "from": "2024-03-15T11:00:00Z",
    "to": "2024-03-15T14:00:00Z",
    "duration": 3600
  }]
}

Drive Breaks

Interrupts based on accumulated driving time:

{
  "breaks": [{
    "type": "DRIVE",
    "driveTime": 16200,  // After 4.5 hours driving
    "duration": 2700     // 45-minute break
  }]
}

Unavailability Breaks

Resource completely unavailable - resumable jobs pause:

{
  "breaks": [{
    "type": "UNAVAILABILITY",
    "from": "2024-03-15T13:00:00Z",
    "to": "2024-03-15T14:00:00Z"
  }]
}

Best Practices

1

Identify Interruptible Work

Only mark jobs resumable if the work can actually be paused safely

2

Consider Customer Impact

Ensure customers are aware that service may include break periods

3

Set Realistic Durations

Account for any setup/cleanup time needed when resuming

4

Combine with Time Windows

Use time windows to ensure resumable jobs fit within acceptable hours

Common Scenarios

Mixed Job Types

Combine resumable and non-resumable jobs:

{
  "jobs": [
    {
      "name": "emergency-repair",
      "duration": 2700,
      "resumable": false,  // Cannot interrupt emergency work
      "priority": 100
    },
    {
      "name": "preventive-maintenance",
      "duration": 14400,
      "resumable": true,   // Can pause for breaks
      "priority": 50
    }
  ]
}

Multiple Break Interruptions

Long jobs interrupted by multiple breaks:

08:00 - Start 8-hour project (resumable)
10:00 - First break (15 min)
10:15 - Resume project
12:30 - Lunch break (1 hour)  
13:30 - Resume project
15:30 - Afternoon break (15 min)
15:45 - Resume project
17:45 - Complete project

Constraints and Behavior

Important Considerations:

  • Non-resumable jobs cannot be scheduled if they would conflict with mandatory breaks
  • Break travel time (if returning to depot) is added to the total time
  • Jobs can be resumed multiple times if interrupted by multiple breaks

Solver Behavior:

  • Automatically calculates optimal break placement for resumable jobs
  • Ensures breaks don’t violate job time windows
  • Minimizes total completion time including break interruptions

Performance Impact

Resumable jobs add complexity to route optimization:

FactorImpact
Few resumable jobsMinimal impact
Many resumable jobsModerate impact
Complex break patternsHigher impact
Tight time windowsHighest impact

Troubleshooting

Integration Examples

With Job Complexity

Balance complex resumable work:

{
  "jobs": [
    {
      "name": "complex-installation",
      "duration": 14400,
      "resumable": true,
      "complexity": 8  // High complexity work
    }
  ]
}

With Rankings

Assign resumable jobs to preferred resources:

{
  "jobs": [
    {
      "name": "vip-service",
      "duration": 10800,
      "resumable": true,
      "rankings": [
        {"name": "senior-tech", "ranking": 1}
      ]
    }
  ]
}