यह उदाहरण, मॉडल के लिए नर्स शेड्यूलिंग के उदाहरण पर आधारित होता है नियमित और ओवरटाइम मुआवज़ा, बजट की ज़रूरत पर निर्भर करता है. इसके अलावा नर्सों के लिए शेड्यूल तय करने की सीमा. चार दिन के लिए 10,000 डॉलर का बजट है लक्ष्य तय करने में मदद मिलती है. सभी नर्सों को हर घंटे के हिसाब से 50 डॉलर/घंटा के हिसाब से पेमेंट किया जाता है. 19 घंटे से शुरू होने वाली शिफ़्ट के लिए, हर घंटे के हिसाब से 10 डॉलर/घंटा का अंतर. किसी भी समय 40 घंटे के बाद काम करने पर मिलने वाले पेमेंट की तुलना में, हर घंटे की औसत दर से 1.5 गुना ज़्यादा पेमेंट किया जाता है (यानी, (50 डॉलर+60 डॉलर)/2=55 डॉलर).
नियमित और ओवरटाइम मुआवज़ा
आधार घंटे के हिसाब से दर, शिफ़्ट के अंतर, और ओवरटाइम के मल्टीप्लायर
कर्मचारी में hourlyContract
फ़ील्ड के साथ दिखाया जाता है. इस
घंटे के हिसाब से कानूनी समझौता, baseHourlyRate
और
hourlyRateShiftDifferentials
सामान्य (नॉन-ओवरटाइम) के लिए मुआवज़े का मॉडल बनाएं
काम. इन वैल्यू का इस्तेमाल, इन मेट्रिक के लिए हर घंटे के औसत आधार का अनुमान लगाने के लिए भी किया जाता है
overtimePeriods
दिए जाने पर ओवरटाइम मुआवज़ा. आम तौर पर, ओवरटाइम
अवधि एक सप्ताह से मेल खाती है और कई ओवरटाइम अवधियों को
ये ओवरलैप नहीं होते हैं. पहली नर्स (एडम) के लिए घंटे के हिसाब से किया गया अनुबंध इतना है
यह इस तरह दिखाया जाता है:
{
"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
}
]
}
}
}
सभी चार कर्मचारियों और उनके घंटे के हिसाब से किए गए समझौते का उदाहरण
{
"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 के कुल बजट को बजट की ज़रूरत हो. शुरू और खत्म होने का समय है वैकल्पिक और अगर दिया गया हो, तो इस समयावधि में सिर्फ़ शिफ़्ट और ओवरटाइम पीरियड होते हैं को इस बजट की सीमा के लिए माना जाता है. इसके हिसाब से पहली नर्स (ऐडम) के लिए अपडेट किया जा सकता है:
{
"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"
}
]
}