초과 근무 수당이 제공되는 간호사 일정 예약

이 예시에서는 간호사 일정 예를 바탕으로 예산 요건에 따라 정규 및 초과 근무 수당을 모델링합니다. 간호사의 스케줄링 제약 조건 외에도 4일의 계획 기간에는 $10,000의 예산이 있습니다. 모든 간호사에게 시간당 $50의 기본 임금이 지급되며 19시간 교대 근무 시 시간당 $10의 교대 근무 차액이 적용됩니다. 40시간 이후에 작업한 시간은 평균 기본 시간당 요금의 1.5배로 지급됩니다 (예: (50,000원+60,000원)/2=55,000원).

일반 및 초과 근무 보상

기본 시간당 요금, 교대 근무 차등, 초과 근무 승수는 EmployeeeehourlyContract 필드로 표시됩니다. 시간별 계약에서 baseHourlyRatehourlyRateShiftDifferentials는 정규 (과도하지 않은) 업무에 대한 보상을 모델링합니다. overtimePeriods가 제공되면 이 값은 초과 근무 수당의 평균 기본 시간당 임금을 추정하는 데도 사용됩니다. 초과 근무 기간은 일반적으로 1주와 일치하며, 초과 근무 기간이 겹치지 않는다면 여러 개의 초과 근무 기간을 제공할 수 있습니다. 첫 번째 간호사 (Adam)의 시간당 계약은 다음과 같이 표현됩니다.

  {
    "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
          }
        ]
      }
    }
  }

직원 4명 및 이들의 시간당 계약 예시


  {
      "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
              }
            ]
          }
        }
    ]
  }
  

예산 요건

총 예산 $10,000는 예산 요구사항으로 표시됩니다. 시작 및 종료 시간은 선택사항이며, 지정된 경우 이 기간 내의 교대 근무 및 초과 기간만 예산 제약조건에 고려됩니다. 첫 번째 간호사 (Adam)에 대한 해당 표현을 다음과 같이 업데이트할 수 있습니다.

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

전체 요청의 예


    {
      "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"
        }
      ]
    }
    

응답 예

문제 해결사의 응답에는 교대 근무 간호사 할당과 최적화 절차의 상태가 포함됩니다. 예를 들어 첫 번째 직원에게 할당된 교대 근무는 다음과 같이 반환됩니다.

  {
    "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"
      },
      ... ]
  }

완전 응답의 예


  {
    "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"
      }
    ]
  }