# Human-Centered Dynamic Service Scheduling Approach in Multi-Agent Environments
## 3 Human-Centered Dynamic Service Scheduling Approach
### Multi-Agent Scheduler
#### 3.2.2 Operation Manager  
The operation manager is responsible for carefully sequencing the order of operations based on the operation list created by the job composer. The operation manager also reorganizes the order of operations by considering the user requirements. In environments \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Job** & **Op Seq.** & **Op Type** & **Description** & **Obj** & **Capable Agent** & **Arm Time** & **Mobile Time** & **Light Time** \\ \hline Bring cube & 1 & Move & \begin{tabular}{c} Bring cube to the table \\ from the shelf \\ Get coffee from the \\ coffee machine \\ \end{tabular} & Cube & A & 75 & \(\infty\) & \(\infty\) \\ Bring coffee & 1 & Fetch & \begin{tabular}{c} Get coffee from the \\ coffee machine \\ from the coffee machine \\ \end{tabular} & Cube1 & M & \(\infty\) & 50 & \(\infty\) \\ Bring water & 1 & Fetch & \
\begin{tabular}{c} Bring water to the table \\ Take empty cup \\ from the table \\ \end{tabular} & Cube & A, M & 50 & 35 & \(\infty\) \\ Throw away trash & 1 & Move &
\begin{tabular}{c} Take trach from the table \\ and throw it away \\ in the biu \\ Turn on light \\ \end{tabular} & Trash & M & \(\infty\) & 50 & \(\infty\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Example of an operation list. in which multiple agents perform sequential operations simultaneously, it is important to consider the relationships among operations in terms of overall execution. This implies that the scheduler must monitor all executions to avoid possible failures. The order of operations determined by the operation manager affects how agents are utilized. For example, delivering coffee to a person involves two separate and sequential operations: pouring coffee into a cup and delivering the cup full of coffee to the person. Two different agents may be assigned to perform each operation; therefore, to avoid failure to complete the job, it is very important that the second agent does not deliver the cup before the first pours the coffee into the cup. To monitor these sequential correlations between operations, the operations are managed by queue types to prevent them from mixing. To sequence and organize operations from the original order in which jobs were requested, we created two types of operation queues: candidate and incoming. The candidate queue represents operations that can be executed immediately and do not require waiting for other existing operations. By contrast, the incoming queue is a bundle of subsequent operations that must be held waiting until the previous queue is executed or user-specific conditions are met. The candidate queue is created by enqueuing the first operation of each job in the order in which they are requested. The remaining operations are then stacked on top of the candidate queue and named the incoming queue because they are waiting to enter the candidate queue. The operation manager also rearranges the queues to be rescheduled according to the dynamic requests of a user. If a job is canceled before execution, all related operations are removed from the candidate and incoming queues. The user requirement for the order of service is resolved by three functions of the operation manager that adjust the stacked queue: freezing, stacking, and combining. The freezing function is used when a user wants the service to be provided first or last. To perform the job first, the remaining jobs are frozen until the requested job is completed. If a job needs to be completed last, it will be frozen until all other jobs have been completed. The stacking function is used to insert related operations into the requested position when a user wants to receive the service in a specific order. For example, if a user wants job J4 performed immediately after job J1, the operation manager stacks the operations of J4 on top of J1 so that J4 can be executed immediately after J1 is completed. The combining function is used when a user wants to receive multiple services simultaneously.