## Solution Implementation
### Holonic Control Architecture Implementation  
Figure 6 shows the GUI for the implemented case-study. While Figure 7 shows the interaction and the behaviors of those holons. Four holons exist in this implementation. The first holon is the PH with a GUI shown in Figure 6a. The PH is generating the pump order by choosing the pump size and quantity. By pressing send order button, the product agent which is shown in Figure 7a triggers a one shot behavior which sends the job via an ACL-message to the OH. The ACL-message contains the job details and it has an AGREE communication act as can be seen in Figure 6b. The OH GUI is shown in Figure 6b. The order agent implements a cyclic behavior which continuously receives the jobs from the pump agent. The AGREE-message sending/receiving operation is shown in line-1 of Figure 7b. When the order agent receives a new job, it fires a new Drools reasoning session. The reasoning engine will perform a FCFS or Johnson scheduling based on the overall status of the cooperative workcell. The rules that control the scheduling decision making can be seen in details in Table 3. IF the cobot is free, the scheduled pump job will be assigned to it as it can be seen via the Robot Holon (RH) GUI in Figure 6c. A one shot behavior is triggered by Drools reasoning engine to send a REQUST-message to the robot agent as it can be seen in line 2 of Figure 7b. The robot agent has a cyclic behavior which continuously receives the job assignments. Figure 6: (a) Product Holon Interface; (b) Order Holon Interface; (c) Robot Holon Interface; (d) Worker Holon Interface. When the robot agent receives a new job assignment, it initializes a timer with a value of n\({}_{\text{i}}\) multiplied by RTC. In our case-study we assumed that RTC value equals to 2.0 s. When the timer is elapses, the robot agent sends an INFORM message to the order agent to inform it has picked and placed the assigned task. This INFORM-message can be seen in line 3 of Figure 7b. When the order agent receives a robot done event, it fires a new Drools reasoning session. Drools will reschedule the existing standing jobs due to the decision table rules. Moreover, IF the worker is free, the scheduled jobs will be assigned to the worker as it can be seen via the Worker Holon (WH) GUI in Figure 6d. A one shot behavior is triggered by the Drools reasoning engine to send a REQUST-WHEN-message to the worker agent as it can be seen in line 4 of Figure 7b. The worker agent has a cyclic behavior which is continuously receiving the order assignments. When the worker finishes assembling all the pump orders, he presses a task done button via his GUI. By pressing the worker task done, the worker agent triggers a one shot behavior which sends an INFORM-IF-message to the order agent. The INFORM-IF-message can be seen in line 5 of Figure 7b. When the order agent receives a worker done event, it fires a new Drools reasoning session. Drools will calculate the WMTV every time the OH receives a worker done event. Therefore, the rest of the scheduling will be based on the current WMTV. Figure 7: **(a)** Case-study holons interaction and behaviors; **(b)** Case-study communication model. Figures 8 and 9 show the scheduling results due to the calculation of the WMTV and the decision rules which are well-explained in Table 3. There are eight received jobs in Figure 8 which start with order-ID (CP:1) and end with order-ID (CP:8). Every pump order has a different customization level and a specific required quantity. However, the pump customization is out of the focus of this article (refer to [3]). The jobs scheduling is based on the previously mentioned Johnson algorithm for our case-study. By starting the production execution, the first two jobs (CP:1, CP:2) are scheduled based on FCFS. The reason behind selecting FCFS as a scheduling method is that the worker had not finished assembling CP:1 till CP:2 has been scheduled.