Contoh ini dibangun berdasarkan contoh penjadwalan perawat untuk membuat model kompensasi reguler dan lembur, tunduk pada persyaratan anggaran. Selain kendala penjadwalan untuk perawat, ada anggaran $10.000 untuk tugas 4 hari cakrawala perencanaan. Semua perawat dibayar dengan tarif dasar per jam sebesar $50/jam dan ada diferensial shift per jam sebesar $10/jam untuk shift yang dimulai dari 19 jam. Kapan saja bekerja setelah 40 jam dibayar dengan 1,5x tarif per jam dasar rata-rata (yaitu, ($50+$60)/2=$55).
Kompensasi reguler dan lembur
Tarif per jam dasar, diferensial
shift, dan pengali lembur adalah
diwakili dengan kolom hourlyContract
di employee. Di
kontrak per jam, baseHourlyRate
, dan
hourlyRateShiftDifferentials
membuat model kompensasi untuk reguler (non-lembur)
Anda. Nilai-nilai ini juga digunakan untuk memperkirakan
tarif dasar per jam rata-rata untuk
kompensasi lembur jika overtimePeriods
diberikan. Biasanya lembur
pertandingan dalam seminggu, dan beberapa periode lembur dapat diberikan selama
tidak tumpang tindih. Kontrak per jam untuk perawat pertama (Adam), adalah
direpresentasikan sebagai:
{
"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
}
]
}
}
}
Contoh dengan keempat karyawan dan kontrak per jamnya
{
"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
}
]
}
}
]
}
Persyaratan anggaran
Total anggaran sebesar $10.000 diwakili dengan persyaratan anggaran. Waktu mulai dan berakhir opsional, dan jika diberikan, hanya shift dan periode lembur dalam jangka waktu ini dipertimbangkan terhadap batasan anggaran ini. Representasi yang sesuai untuk perawat pertama (Adam) dapat diperbarui menjadi:
{
"totalBudget": 10000,
"priority": "PRIORITY_HIGH"
}
Contoh permintaan lengkap
{
"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"
}
]
}
Contoh respons
Respons pemecah masalah berisi penugasan perawat untuk shift dan prosedur pengoptimalan. Misalnya, shift yang ditetapkan ke karyawan pertama dikembalikan sebagai:
{
"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"
},
... ]
}
Contoh respons lengkap
{
"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"
}
]
}