Balancing workload

Sometimes balancing the workload for everyone is as important as minimizing the total distance. In this example, we will
show you how to do that. Balancing workload is about creating fair schedules.

You should set

{
  "options": {
    "fairWorkloadPerResource": true
  }
}

to true to enable this feature in the solver.

Or you can set fairness per trip which will ensure that the workload is balanced per trip over all days in the planning
period:

{
  "options": {
    "fairWorkloadPerTrip": true
  }
}
{
  "resources": [
    {
      "name": "R-1"
    },
    {
      "name": "R-2"
    }
  ],
  "jobs": [
    {
      "name": "JOB-1",
      "duration": 3600
    },
    {
      "name": "JOB-2",
      "duration": 3600
    },
    {
      "name": "JOB-3",
      "duration": 3600
    },
    {
      "name": "JOB-4",
      "duration": 3600
    },
    {
      "name": "JOB-5",
      "duration": 3600
    },
    {
      "name": "JOB-6",
      "duration": 3600
    },
    {
      "name": "JOB-7",
      "duration": 3600
    },
    {
      "name": "JOB-8",
      "duration": 3600
    },
    {
      "name": "JOB-9",
      "duration": 3600
    },
    {
      "name": "JOB-10",
      "duration": 3600
    }
  ],
  "options": {
    "fairWorkloadPerResource": true
  }
}