Pflegeplanung mit Überstundenvergütung

Dieses Beispiel baut auf dem Beispiel für die Zeitplanung von Krankenpflegern auf, um eine reguläre Vergütung und Überstunden im Rahmen einer Budgetanforderung zu modellieren. Neben den Planungseinschränkungen für die Pflegekräfte gibt es ein Budget von 10.000 $für einen viertägigen Planungszeitraum. Alle Pflegekräfte erhalten einen Basisstundensatz von 50 $/Stunde. Für Schichten, die ab 19 Stunden beginnen, gilt eine Stundendifferenz von 10 $/Stunde. Jede nach 40 Stunden geleistete Stunde wird mit dem 1,5-Fachen des durchschnittlichen Basisstundenpreises (d. h. (50 € + 60 €) ÷ 2=55 €).

Regelmäßige Vergütung und Überstunden

Der Basisstundensatz, die Verschiebedifferenzen und die Gebotsfaktoren für Überstunden werden im Feld hourlyContract in employee dargestellt. Bei einem Stundenvertrag modellieren baseHourlyRate und hourlyRateShiftDifferentials die Vergütung für regelmäßige Arbeit (keine Überstunden). Diese Werte werden auch verwendet, um einen durchschnittlichen Basisstundensatz für Überstundenvergütung zu schätzen, wenn overtimePeriods angegeben werden. In der Regel entspricht ein Überlaufzeitzeitraum einer Woche. Es können mehrere Überlaufzeiten angegeben werden, solange sich diese nicht überschneiden. Der Stundenvertrag für die erste Krankenschwester (Adam) wird so dargestellt:

  {
    "employees": [{
      "id": "Adam",
      "roleIds": ["Registered Nurse"],
      ...
        scheduling constraints
      ...
      "hourlyContract": {
        "baseHourlyRate": 50,
        "hourlyRateShiftDifferentials": {
          "2023-05-01 19hr": 10,
          "2023-05-02 19hr": 10,
          "2023-05-03 19hr": 10,
          "2023-05-04 19hr": 10
        },
        "overtimePeriods": [
          {
            "overtimeMultiplier": 1.5,
            "startDateTime": {
              "year": 2023,
              "month": 5,
              "day": 1
            },
            "endDateTime": {
              "year": 2023,
              "month": 5,
              "day": 5
            },
            "maximumRegularHours": 40
          }
        ]
      }
    }
  }

Beispiel mit allen vier Mitarbeitenden und deren Stundenvertrag


  {
      "employees": [
        {
          "id": "Adam",
          "roleIds": [
            "Registered Nurse"
          ],
          "schedulingConstraints": [
            {
              "priority": "PRIORITY_HIGH",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "minimumRestMinutes": 720
            },
            {
              "priority": "PRIORITY_MEDIUM",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "maximumMinutes": 2160
            }
          ],
          "hourlyContract": {
            "baseHourlyRate": 50,
            "hourlyRateShiftDifferentials": {
              "2023-05-01 19h": 10,
              "2023-05-02 19h": 10,
              "2023-05-03 19h": 10,
              "2023-05-04 19h": 10
            },
            "overtimePeriods": [
              {
                "overtimeMultiplier": 1.5,
                "startDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 1
                },
                "endDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 5
                },
                "maximumRegularHours": 40
              }
            ]
          }
        },
        {
          "id": "Grace",
          "roleIds": [
            "Registered Nurse"
          ],
          "schedulingConstraints": [
            {
              "priority": "PRIORITY_HIGH",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "minimumRestMinutes": 720
            },
            {
              "priority": "PRIORITY_MEDIUM",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "maximumMinutes": 2160
            }
          ],
          "hourlyContract": {
            "baseHourlyRate": 50,
            "hourlyRateShiftDifferentials": {
              "2023-05-01 19h": 10,
              "2023-05-02 19h": 10,
              "2023-05-03 19h": 10,
              "2023-05-04 19h": 10
            },
            "overtimePeriods": [
              {
                "overtimeMultiplier": 1.5,
                "startDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 1
                },
                "endDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 5
                },
                "maximumRegularHours": 40
              }
            ]
          }
        },
        {
          "id": "James",
          "roleIds": [
            "Registered Nurse"
          ],
          "schedulingConstraints": [
            {
              "priority": "PRIORITY_HIGH",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "minimumRestMinutes": 720
            },
            {
              "priority": "PRIORITY_MEDIUM",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "maximumMinutes": 2160
            }
          ],
          "hourlyContract": {
            "baseHourlyRate": 50,
            "hourlyRateShiftDifferentials": {
              "2023-05-01 19h": 10,
              "2023-05-02 19h": 10,
              "2023-05-03 19h": 10,
              "2023-05-04 19h": 10
            },
            "overtimePeriods": [
              {
                "overtimeMultiplier": 1.5,
                "startDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 1
                },
                "endDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 5
                },
                "maximumRegularHours": 40
              }
            ]
          }
        },
        {
          "id": "Alonso",
          "roleIds": [
            "Registered Nurse"
          ],
          "schedulingConstraints": [
            {
              "priority": "PRIORITY_HIGH",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "minimumRestMinutes": 720
            },
            {
              "priority": "PRIORITY_MEDIUM",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "maximumMinutes": 2160
            }
          ],
          "hourlyContract": {
            "baseHourlyRate": 50,
            "hourlyRateShiftDifferentials": {
              "2023-05-01 19h": 10,
              "2023-05-02 19h": 10,
              "2023-05-03 19h": 10,
              "2023-05-04 19h": 10
            },
            "overtimePeriods": [
              {
                "overtimeMultiplier": 1.5,
                "startDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 1
                },
                "endDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 5
                },
                "maximumRegularHours": 40
              }
            ]
          }
        }
    ]
  }
  

Budgetanforderung

Für ein Gesamtbudget von 10.000 $ist eine Budgetanforderung vorhanden. Die Start- und Endzeiten sind optional. Wenn angegeben, werden nur die Schichten und Überlaufzeiten innerhalb dieses Zeitfensters bei der Budgetbeschränkung berücksichtigt. Die entsprechende Darstellung für die erste Krankenschwester (Adam) kann so aktualisiert werden:

  {
    "totalBudget": 10000,
    "priority": "PRIORITY_HIGH"
  }

Beispiel für eine vollständige Anfrage


    {
      "employees": [
        {
          "id": "Adam",
          "roleIds": [
            "Registered Nurse"
          ],
          "schedulingConstraints": [
            {
              "priority": "PRIORITY_HIGH",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "minimumRestMinutes": 720
            },
            {
              "priority": "PRIORITY_MEDIUM",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "maximumMinutes": 2160
            }
          ],
          "hourlyContract": {
            "baseHourlyRate": 50,
            "hourlyRateShiftDifferentials": {
              "2023-05-01 19h": 10,
              "2023-05-02 19h": 10,
              "2023-05-03 19h": 10,
              "2023-05-04 19h": 10
            },
            "overtimePeriods": [
              {
                "overtimeMultiplier": 1.5,
                "startDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 1
                },
                "endDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 5
                },
                "maximumRegularHours": 40
              }
            ]
          }
        },
        {
          "id": "Grace",
          "roleIds": [
            "Registered Nurse"
          ],
          "schedulingConstraints": [
            {
              "priority": "PRIORITY_HIGH",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "minimumRestMinutes": 720
            },
            {
              "priority": "PRIORITY_MEDIUM",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "maximumMinutes": 2160
            }
          ],
          "hourlyContract": {
            "baseHourlyRate": 50,
            "hourlyRateShiftDifferentials": {
              "2023-05-01 19h": 10,
              "2023-05-02 19h": 10,
              "2023-05-03 19h": 10,
              "2023-05-04 19h": 10
            },
            "overtimePeriods": [
              {
                "overtimeMultiplier": 1.5,
                "startDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 1
                },
                "endDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 5
                },
                "maximumRegularHours": 40
              }
            ]
          }
        },
        {
          "id": "James",
          "roleIds": [
            "Registered Nurse"
          ],
          "schedulingConstraints": [
            {
              "priority": "PRIORITY_HIGH",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "minimumRestMinutes": 720
            },
            {
              "priority": "PRIORITY_MEDIUM",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "maximumMinutes": 2160
            }
          ],
          "hourlyContract": {
            "baseHourlyRate": 50,
            "hourlyRateShiftDifferentials": {
              "2023-05-01 19h": 10,
              "2023-05-02 19h": 10,
              "2023-05-03 19h": 10,
              "2023-05-04 19h": 10
            },
            "overtimePeriods": [
              {
                "overtimeMultiplier": 1.5,
                "startDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 1
                },
                "endDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 5
                },
                "maximumRegularHours": 40
              }
            ]
          }
        },
        {
          "id": "Alonso",
          "roleIds": [
            "Registered Nurse"
          ],
          "schedulingConstraints": [
            {
              "priority": "PRIORITY_HIGH",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "minimumRestMinutes": 720
            },
            {
              "priority": "PRIORITY_MEDIUM",
              "startDateTime": {
                "year": 2023,
                "month": 5,
                "day": 1,
                "hours": 7
              },
              "endDateTime": {
                "year": 2023,
                "month": 5,
                "day": 5,
                "hours": 7
              },
              "maximumMinutes": 2160
            }
          ],
          "hourlyContract": {
            "baseHourlyRate": 50,
            "hourlyRateShiftDifferentials": {
              "2023-05-01 19h": 10,
              "2023-05-02 19h": 10,
              "2023-05-03 19h": 10,
              "2023-05-04 19h": 10
            },
            "overtimePeriods": [
              {
                "overtimeMultiplier": 1.5,
                "startDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 1
                },
                "endDateTime": {
                  "year": 2023,
                  "month": 5,
                  "day": 5
                },
                "maximumRegularHours": 40
              }
            ]
          }
        }
      ],
      "shifts": [
        {
          "id": "2023-05-01 7h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 1,
            "hours": 7
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 1,
            "hours": 19
          }
        },
        {
          "id": "2023-05-01 13h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 1,
            "hours": 13
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 2,
            "hours": 1
          }
        },
        {
          "id": "2023-05-01 19h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 1,
            "hours": 19
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 2,
            "hours": 7
          }
        },
        {
          "id": "2023-05-02 7h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 2,
            "hours": 7
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 2,
            "hours": 19
          }
        },
        {
          "id": "2023-05-02 13h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 2,
            "hours": 13
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 3,
            "hours": 1
          }
        },
        {
          "id": "2023-05-02 19h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 2,
            "hours": 19
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 3,
            "hours": 7
          }
        },
        {
          "id": "2023-05-03 7h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 3,
            "hours": 7
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 3,
            "hours": 19
          }
        },
        {
          "id": "2023-05-03 13h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 3,
            "hours": 13
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 4,
            "hours": 1
          }
        },
        {
          "id": "2023-05-03 19h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 3,
            "hours": 19
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 4,
            "hours": 7
          }
        },
        {
          "id": "2023-05-04 7h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 4,
            "hours": 7
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 4,
            "hours": 19
          }
        },
        {
          "id": "2023-05-04 13h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 4,
            "hours": 13
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 5,
            "hours": 1
          }
        },
        {
          "id": "2023-05-04 19h",
          "locationId": "department",
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 4,
            "hours": 19
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 5,
            "hours": 7
          }
        }
      ],
      "coverageRequirements": [
        {
          "startDateTime": {
            "year": 2023,
            "month": 5,
            "day": 1,
            "hours": 7
          },
          "endDateTime": {
            "year": 2023,
            "month": 5,
            "day": 5,
            "hours": 7
          },
          "locationId": "department",
          "roleRequirements": [
            {
              "roleId": "Registered Nurse",
              "targetEmployeeCount": 2,
              "priority": "PRIORITY_MANDATORY"
            }
          ]
        }
      ],
      "roleIds": [
        "Registered Nurse"
      ],
      "locationIds": [
        "department"
      ],
      "budgetRequirements": [
        {
          "totalBudget": 10000,
          "priority": "PRIORITY_HIGH"
        }
      ]
    }
    

Antwortbeispiel

Die Antwort des Matherechners enthält die Zuweisung der Krankenschwestern zu den Schichten und den Status des Optimierungsverfahrens. Die dem ersten Mitarbeiter zugewiesenen Schichten werden beispielsweise so zurückgegeben:

  {
    "solutionStatus": "OPTIMAL",
    "shiftAssignments": [
      {
        "employeeId": "Adam",
        "shiftId": "2023-05-01 7hr",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Adam",
        "shiftId": "2023-05-02 7hr",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Adam",
        "shiftId": "2023-05-03 7hr",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Adam",
        "shiftId": "2023-05-04 7hr",
        "roleId": "Registered Nurse"
      },
      ... ]
  }

Beispiel für eine vollständige Antwort


  {
    "solutionStatus": "OPTIMAL",
    "shiftAssignments": [
      {
        "employeeId": "Adam",
        "shiftId": "2023-05-01 7h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Adam",
        "shiftId": "2023-05-02 7h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Adam",
        "shiftId": "2023-05-03 7h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Adam",
        "shiftId": "2023-05-04 7h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Grace",
        "shiftId": "2023-05-01 19h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Grace",
        "shiftId": "2023-05-02 19h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Grace",
        "shiftId": "2023-05-03 19h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "Grace",
        "shiftId": "2023-05-04 19h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "James",
        "shiftId": "2023-05-01 19h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "James",
        "shiftId": "2023-05-02 19h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "James",
        "shiftId": "2023-05-03 19h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "James",
        "shiftId": "2023-05-04 19h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "We",
        "shiftId": "2023-05-01 7h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "We",
        "shiftId": "2023-05-02 7h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "We",
        "shiftId": "2023-05-03 7h",
        "roleId": "Registered Nurse"
      },
      {
        "employeeId": "We",
        "shiftId": "2023-05-04 7h",
        "roleId": "Registered Nurse"
      }
    ]
  }