직원 수요를 충당할 수 있도록 교대 근무를 생성하려는 고객센터를 생각해 보세요. 고객센터는 연중무휴로 운영되며 필요한 직원 수는 시간에 따라 달라집니다. 고객센터는 정규직 및 시간제 직원을 모두 고용합니다.
정규직 직원은 교대 근무 시간이 9시간이고 교대 근무가 시작된 후 4시간 또는 5시간 후에 1시간의 휴식이 있으며 오전 5시부터 오후 12시 사이에 언제든지 교대 근무를 시작할 수 있습니다. 비정규직 직원은 두 번째 근무 시간이 끝날 때 15분 휴식을 취하며 4시간 교대 근무를 하고 언제든지 교대 근무를 시작할 수 있습니다. 두 경우 모두 가능한 이동 시작 시간은 15분 단위로 간주됩니다.
고객센터는 최대 20명의 정규직 직원과 40명의 비정규직 직원이 있을 수 있다는 점을 고려하여 다음 이틀의 운영에 필요한 인력 요구사항을 계획하는 데 관심이 있습니다.
정규직 및 시간제 직원을 위한 교대 근무 템플릿
유효한 근무 일정을 결정하는 규칙은 교대 근무 템플릿으로 표현할 수 있습니다. Shift 템플릿 내에서 시점의 개념은 이벤트 템플릿으로 표현할 수 있습니다. 예를 들어 정규직 교대 근무의 교대 근무 템플릿은 다음과 같이 표현됩니다.
{
"id": "full-time",
"earliestStartTime": {
"hours": 5
},
"latestStartTime": {
"hours": 12
},
"durationMinutes": 540,
"startTimeIncrementMinutes": 15,
"eventTemplates": [
{
"id": "full-time-break",
"minimumMinutesAfterShiftStart": 240,
"maximumMinutesAfterShiftStart": 300,
"durationMinutes": 60,
"startTimeIncrementMinutes": 60
}
],
"maximumEmployeeCount": 20
}
마찬가지로 시간제 직원 교대 근무의 교대 근무 템플릿은 다음과 같이 표현됩니다.
{
"id": "part-time",
"earliestStartTime": {},
"latestStartTime": {
"hours": 23,
"minutes": 59
},
"durationMinutes": 240,
"startTimeIncrementMinutes": 15,
"eventTemplates": [
{
"id": "part-time-break",
"minimumMinutesAfterShiftStart": 120,
"maximumMinutesAfterShiftStart": 120,
"durationMinutes": 15,
"startTimeIncrementMinutes": 0
}
],
"maximumEmployeeCount": 40
}
시간 경과에 따른 직원 수요
직원 수요는 EmployeeDemand
목록으로 표현되며, 여기서 각 요소는 시간 간격과 직원 수를 특징으로 합니다. 이 예시에서 직원 4~13명의 수요는 이틀 동안 변동하며 다음과 같이 표현됩니다.
{
...
"employeeDemands": [
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 20
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 20,
"hours": 12
},
"employeeCount": 8
},
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 20,
"hours": 12
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 20,
"hours": 20
},
"employeeCount": 12
},
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 20,
"hours": 20
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 21,
"hours": 6
},
"employeeCount": 4
},
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 21,
"hours": 6
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 22,
"hours": 0
},
"employeeCount": 13
}
]
}
전체 요청의 예
{
"solverConfig": {
"timeLimit": "30s"
},
"shiftTemplates": [
{
"id": "full-time",
"earliestStartTime": {
"hours": 5
},
"latestStartTime": {
"hours": 12
},
"durationMinutes": 540,
"startTimeIncrementMinutes": 15,
"eventTemplates": [
{
"id": "full-time-break",
"minimumMinutesAfterShiftStart": 240,
"maximumMinutesAfterShiftStart": 300,
"durationMinutes": 60,
"startTimeIncrementMinutes": 60
}
],
"maximumEmployeeCount": 20
},
{
"id": "part-time",
"earliestStartTime": {},
"latestStartTime": {
"hours": 23,
"minutes": 59
},
"durationMinutes": 240,
"startTimeIncrementMinutes": 15,
"eventTemplates": [
{
"id": "part-time-break",
"minimumMinutesAfterShiftStart": 120,
"maximumMinutesAfterShiftStart": 120,
"durationMinutes": 15,
"startTimeIncrementMinutes": 0
}
],
"maximumEmployeeCount": 40
}
],
"employeeDemands": [
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 20
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 20,
"hours": 12
},
"employeeCount": 8
},
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 20,
"hours": 12
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 20,
"hours": 20
},
"employeeCount": 12
},
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 20,
"hours": 20
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 21,
"hours": 6
},
"employeeCount": 4
},
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 21,
"hours": 6
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 22,
"hours": 0
},
"employeeCount": 13
}
]
}
응답 예
문제 해결사의 응답에 필요한 직원 수와 함께 직원 일정 목록이 포함됩니다. 수요를 정확하게 처리할 수 없는 경우 응답에 관련 시간 간격마다 위반사항이 나열됩니다.
다음 예시는 정규직 직원을 위해 생성된 직원 일정 중 하나를 보여줍니다.
{
"solutionStatus": "SHIFT_GENERATION_SOLVED",
"employeeSchedules": [
{
"shiftTemplateId": "full-time",
"shifts": [
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 21,
"hours": 7,
"minutes": 30
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 21,
"hours": 16,
"minutes": 30
},
"events": [
{
"startDateTime": {
"year": 2024,
"month": 5,
"day": 21,
"hours": 12,
"minutes": 30
},
"endDateTime": {
"year": 2024,
"month": 5,
"day": 21,
"hours": 13,
"minutes": 30
},
"eventTemplateId": "full-time-break"
}
]
}
],
"employeeCount": 1
},
...
]
...
}