# Human-Centered Dynamic Service Scheduling Approach in Multi-Agent Environments
## 3 Human-Centered Dynamic Service Scheduling Approach
### Multi-Agent Scheduler
#### 3.2.3 Operation Allocator  
The operation allocator allocates operations according to the order specified by the operation manager. The operation allocator allocates operations from the candidate queue to available agents. In this study, the problem of allocating operations to each agent is addressed by solving the following optimization problem (1):  
\[\min_{x}(\max_{a_{k}}\sum_{i=1}^{M}\sum_{j=1}^{N}\big{(}w_{ij_{k}}\cdot x_{ij_{k} }\big{)}) \tag{1}\]  
subject to  
\[a_{k}\ \forall k\in\{1,\ldots,{\rm K}\}\]  
```
**Algorithm 3**DynamicAllocator()
``` \(S_{A}\leftarrow\)AgentMonitoring(\(A\)) \(A_{\textit{fin}}\leftarrow\)getFinishedAgents(\(S_{A}\)) \(A_{\textit{sit}}\leftarrow\)getIdleAgents(\(S_{A}\)) if\(A_{\textit{fin}}\
eq\mathcal{O}\mid\mid\) (Can(\(S_{A}\) is Updated \(\mathcal{E}\)\(A_{\textit{sit}}\
eq\mathcal{O}\))then for\(a_{k}\in A_{\textit{fin}}\)do \(O_{\textit{sit}}\leftarrow\mathcal{O}\) \(S_{\textit{sit}}\leftarrow\)Idle;  end while while\(O\
eq\mathcal{O}\)do \(A_{\textit{sit}}\leftarrow\)getIdleAgents(\(S_{A}\)) if\(CanQ\
eq\mathcal{O}\)do \(X_{\textit{sit}}\leftarrow\)CostCalculator(\(x\), \(w\)) for\(a_{k}\in A_{\textit{sit}}\)do \(O_{\textit{sit}}\leftarrow\)AllocateOperation(\(X_{\textit{sit}}\)) if\(O_{\textit{sit}}\
eq\mathcal{O}\)then \(S_{\textit{sit}}\leftarrow\)Execute; break; else \(S_{\textit{sit}}\leftarrow\)Idle; break;  end while  end while  end while ```
**Algorithm 3**DynamicAllocator()
``` \(S_{A}\leftarrow\)AgentMonitoring(\(A\)) \(A_{\textit{fin}}\leftarrow\)getFinishedAgents(\(S_{A}\)) \(A_{\textit{sit}}\leftarrow\)getIdleAgents(\(S_{A}\)) if\(A_{\textit{sit}}\
eq\mathcal{O}\mid\) (CanQ is Updated \(\mathcal{E}\)\(A_{\textit{sit}}\
eq\mathcal{O}\)) then for\(a



## 4 Experiments and Results

To evaluate the proposed scheduler, we built a virtual reality (VR) smart office for simulation (Figure 2) and used it to experiment with four service scenarios. ### Smart Office Prototype

A VR smart office, in which multiple robots provide daily services to a user, consists of a user sitting at a table and three agents with different functions. For the active agents, KINOVA Jaco (2018), a robotic arm capable of object manipulation (e.g., pick-up, transfer, put down), and a simulated mobile robot were used. A smart lamp, an integration of an IoT system, was used as the passive agent. The operations used in this experiment are listed in Table 1.

### System Setup

The simulated environment for providing services to a user in a VR smart office is illustrated in Figure 3a. The VR smart office was displayed on a 55-inch flat 3D display with full HD (1920 \(\times\) 1080). An RGBD camera was mounted on the top to track the user's hand and show that the user received a service from the agent (Figure 3b). The experimental system was implemented in Openframeworks from OpenGL to C++ and Bullet Physics 2.82 for the physics simulation. The robotic arm was planned and simulated on the ROS Moveit and the simulated mobile robot on Bullet Physics. The experiments were performed on an Intel Core i7-3770 3.5 GHz computer with 16 GB memory. ### Experimental Scenarios

We designed four service scenarios to demonstrate the proposed scheduling method in dynamic situations of our daily life environment. The dynamic situation that occurs when a user requests and receives services is composed of the following scenarios. First, the user requests a new task while the agents are still performing the previous task (Scenario 1). The second scenario includes a delay situation. Agents interact with humans in real service situations, and although we can estimate the average execution time of the agents, it is very difficult to predict it accurately; therefore, delays cannot be avoided (Scenario 2). The

Figure 3: VR smart office: (**a**) robots provide service to user and (**b**) experimental setup. Figure 2: VR smart office setting. following are additional dynamic situations caused by a user. A user may request a service, including specific requirements regarding when it should be provided.