Asynchronous agent-based simulation and optimization of parallel business

A Port Container Terminal (PCT) involves complex business processes which are carried out by at least four organizations, namely PCT Operator, Customer, Quarantine and Customs. Each organization produces event log data from the activities. The event log data from the four organizations contain synchronous and asynchronous activities. In this research, the four organizations are represented by four agents. By simulating this log data using agent based simulation, we get the performance of the current business process. The performance indicators gathered are time and cost which are needed to do the activity (task). After the simulation is complete, we found Asynchronous Waiting Time (AWT). AWT is waiting time which happens because the agent in the simulation cannot do the newly assigned task because the agent is still working on the other task. Therefore, we parallelize the task performed by the agent so that the agent can do multiple tasks at a time. After we parallelize the task, we perform an optimization process using Stochastic Multicriteria Adaptability Analysis 2 (SMAA-2). Thus, the optimal amount of task an agent can do simultaneously is analyzed. This study result shows that parallelization can reduce AWT of the current system and the optimization process using SMAA-2 shows the most optimal number of multiple tasks an agent can do simultaneously.

In our previous study [6], we simulate the business process using both DES and ABS. DES shows that the current business process has no problem aside from some activity or task that needs a very long time to execute. Therefore, the results of DES only shows which task that needs more time to execute than the others. Meanwhile, ABS gives the same results but with more insight into its communication process. This is due to the characteristics of the agent in ABS which are Autonomous, Proactive, Reactive, and has Social ability [9].
Each agent in ABS can communicate with one another regardless of the task of the target agent is still doing. Thus, ABS gives clarity to the asynchronous communication process of the agents. Because of the asynchronous communication process, ABS shows waiting time which is the product of the communication process called Asynchronous Waiting Time (AWT). AWT made the total waiting time for a task longer since the task cannot be executed until the agent finishes the previous task. By reducing AWT, the cost of the task is different compared to the cost before reducing it. Figure 1 show AWT in details.

Figure 1. AWT details
Different from the previous researches which did not account the communication process [10][11][12][13], in this study we will be focused on reducing AWT using task parallelization and optimizing the number of tasks an agent can do simultaneously. To reduce AWT, we propose parallelization of task for each agent. If an agent can do multiple tasks at once, the total AWT for each task will be reduced. A study on parallelization of the process to reduce the waiting time of the process has been done [14,15]. In the study, if a task cannot fulfill the assigned deadline, the parallel process can take over the work for the next task. Thus, reducing the waiting time of the task to be executed.
The results of the parallelization are the performance indicator of the system which are time and cost of each task [16,17]. Based on the parallelization results, we need to know how many parallel tasks that a system needs to produce the most optimal outcome. Since the problem we need to find is the alternative with the most optimal time and cost, we need multicriteria decision making (MCDM) method to solve the problem [18][19][20]. The MCDM method we used to solve this problem is Stochastic Multicriteria Adaptability Analysis 2 (SMAA-2).
SMAA-2 is an improvement of Stochastic Multicriteria Adaptability Analysis (SMAA). SMAA does not mean to directly rank the alternatives, but to classify the alternatives to more acceptable results or less acceptable one. SMAA-2 give rank to each alternative based on the sets of weight vectors [21,22]. SMAA-2 has been used by some researchers; such as for evaluating 16 combined heat and power (CHP) units based on efficiency, investment cost, maintenance cost, electricity cost, heat cost, carbon dioxide production, and footprint [23]; for handling dependent uncertainties assessed by experts in a strategic forest planning application, which gives decision recommendation based on the assessments [24].

Research Method
The framework is composed by the following steps: (1) gathering log data; (2) agent based simulation; (3) performance evaluation; (4) parallelization; (5) simulation of parallel task; (6) optimization process; (7) the results of the optimized parallel task. Figure 2 shows the research method in detail.

Simulation
The simulation performed on this study is based on the log data we got from Surabaya PCT Operator in the period of January 2016 to March 2016. Figure 3 shows the structure of the log data. From the log data, there are 4 organizations that are involved in the business process. Each organization involved have several task that must be done in the business process. Those organizations involved are: Since the simulation is done using an agent based simulation, each organization is assigned with an agent. Each assigned agent will do the task of the given organization. For example, an agent which represent PCT Operator will do the task of PCT Operator in real world such as the berthing process of the vessel ship and preparing the container to be transported to the designated place. To build the model, we use the Standard Operating Procedures (SOP) that was used by Surabaya PCT.

Performance Evaluation
To evaluate the performance of the simulation, we refer to the previous study on evaluating the performance of a discrete event simulation [2]. The performance of the simulation is based on waiting time, execution time, and the cost of each task [15]. a. Waiting time Waiting time refers to the time each task spent on the ready queue. In this study, AWT is waiting time that occurs because of the asynchronous communication process and it is part of the waiting time of the activity. The longer the waiting time for an activity to be executed, the lower the performance of the system. b. Execution time Execution time refers to the time needed for each task to do its process from the start time to its end time. A system with sojourn time equal to its execution time means that the system has good performance. c. Cost The cost of each task is based on both waiting time and execution time of the task. While waiting for the execution process, the task already using the available resources. Thus, if the AWT of the task can be reduced, the cost of the task with reduced AWT will be cheaper. The use of resources while in the waiting queue and when the task is executed is different. Therefore, the cost of the task while it is executed will be different from when it is in the waiting queue.

Task Parallelization
From the previous study, AWT as the waiting time which occurs because of the asynchronous process has been discovered using agent based simulation [6]. To reduce AWT parallelization of the task is needed. By parallelizing task, each agent can do task simultaneously thus reducing the total dwelling time of the container. For this phase, we will parallelize the tasks until there are tasks that have the AWT reduced to zero. Figure 4 shows how AWT affects the execution of tasks.
The task is done by the order of the arrival of tasks. The results of this parallelization process will reduce the AWT of tasks. Figure 5 shows the expected results of the parallel process. With the reduced AWT, the cost of each task will change according to the duration of its total waiting time and execution time. To address this issue, we assume that the cost for each task that we got from the log data is the cost relative to the task sojourn time. To separate the cost of the waiting time and execution time, we have done a curve fitting process on the cost of the tasks. The results of the curve fitting process show that the distribution suitable for the cost of tasks is the Gaussian Distribution. The (1) shows the equation of Gaussian distribution.
where, = execution cost  ISSN: 1693-6930 = minimal cost of tasks Since we have got the execution cost of the tasks, we can calculate the total waiting cost of the tasks. This total waiting cost is caused by both AWT and the task waiting time. Thus, we use (3) to calculate the cost of the tasks after AWT is reduced.
where, = Task waiting time = AWT = Total waiting time = waiting cost = execution cost

Parallel Task Optimization
After parallelizing the tasks, we simulate the parallel task with agent based simulation. The performance results will be the input of the optimization process. Since the input parameter is more than one parameter, the optimization method we used is multicriteria decision making (MCDM) method. In this case, we used SMAA-2 as the MCDM method. This method comprised of several steps [25].
The decision problem is represented as a set of alternatives { 1 , 2 , 3 , … , } that is evaluated based on criteria. Then, value function ( , ) is used to represents the decision maker preference with as the variable for quantifying the decision maker preferences. The decision maker can specify the weights and priority order of the criteria based on Feasible Weight Space (FWS) . Normally, the weights are non negative and normalized. In (4) define the FWS in dimension.

= { ∈ :
( , , ) = } The descriptive measure of SMAA-2 is rank acceptability index , which measure the different weights which gives alternative rank . The share of weights gives the alternative an acceptability index for a particular rank. The rank acceptability index is computed using (7).
The best alternatives are the one with the highest acceptability index for the best ranks. The acceptability index is in the range of 0 to 1, where 0 means that the alternative will never get the given rank while 1 means that the alternative will always get the given rank with any weight preference.

Results and Discussion
The first step in this research is simulating the log data we got from Surabaya PCT Operator. The log data we used are as shown in Table 1. Using the log data in Table 1, the simulation is performed on the model created. After the simulation process is finished, and then we evaluate the performance of the system. Table 2 shows the performance of the system which is currently running based on the log data we got from Surabaya PCT Operator. Some tasks that were evaluated are Verification Document Quarantine (VDQ), Check Goods Quarantine (CGQ), Create Document KH/KT (CDK), Verification Document Behandle (VDB), and Create Document SPPB (CDS). The next step is to parallelize the number of tasks an agent can perform simultaneously. Table 3 and Table 4 shows the performance of the simulation with 2 task and 3 task respectively.  From the performance results of the simulation on Table 3 and Table 4, we know that there are some tasks such as VDQ with the same time and cost after we added the number of tasks an agent can perform simultaneously. This means that the activity is no longer has AWT. Thus, giving the agent which perform VDQ 2 parallel task is enough to reduce the AWT of the task. Meanwhile, for the task with longer sojourn time such as CGQ, parallelizing task reduces the sojourn time of the task significantly while increasing the cost of the task.
Since we have evaluated the performance of each task involved in the business process after parallelizing the tasks, we perform the optimization process to determine how many parallel tasks which is the most optimal for the given tasks. Using SMAA-2, the alternatives will be the number of parallel tasks, while the criteria are the time and cost of the tasks. Figure 5 and Figure 6 shows the optimization results using SMAA-2. Figure 7 shows that for CGQ, using only 1 task is the best approach compared to the parallel counterpart. The use of only 1 task gives 0.82 acceptability index to be firstly ranked. Thus, it shows the most optimal number of tasks to perform CGQ. Meanwhile, for CDS the most optimal result is when it is performed in 3 tasks simulation. The results of CDS is shown in Figure 8.

Conclusion
On this research, we gathered a log data from Surabaya Port Container Terminal (PCT) Operator for the period of January 2016 to March 2016. The log data is then simulated using agent based simulation model created based on the SOP of Surabaya PCT Operator. By using agent based simulation, we can evaluate the performance of the business process since it gives more insight into the waiting time of the tasks proven by the discovered AWT. This AWT needs to be reduced to give better performance for the business process. To reduce AWT, we parallelize the tasks that can be performed by agents involved in the business process. The result of tasks parallelization is then optimized using SMAA-2 as the multicriteria decision making (MCDM) method.