Cargo Optimization in An Airline Using Agent – Based Modeling

Cargo plays a very important role in aviation industry as a supporting revenue. In Airline X, cargo support the revenue by 4% - 6% from the total revenue. There are opportunities to optimize the cargo compartment in Airline X with analyzing every agent involved in purpose to know the optimum cargo loaded into the compartment using Agent - Based Modelling. The method used in this research is Rejection Sampling in Monte Carlo and Agent – Based Modelling. In addition, the supporting theory used in this research is distribution function, to determine what type of distribution that represent the agent behavior. The final result shows that with the predetermined number of iterations, which is 300 iterations, the optimal value was obtained base on the convergent result. On the other hand, the distribution of passenger and baggage described as Gaussian Distribution Function, while the distribution of EBT described as Negative Exponential Distribution Function. This distributions represent the agent behavior.


Introduction
In the aviation world, cargo plays a very important part. Most of businesses run in this world need logistic and need their goods, machine, stuffs, and others to be moved and shipped. That is why air cargo is very crucial to move or ship the cargo in a fast way. Some big players of airlines have their own air cargo line department to optimize their belly freight and cargo, but not all airlines have the same scenario like them. Some regional airlines that operate regional jet and propeller have a different case and situation.
Cargo or freight in Airline X is one of the supporting revenues. Based on the monthly flown revenue report, cargo supported the revenue by 4% -6% of the total revenue monthly. This percentage number of cargo revenue hit a similar percentage number compare to the passenger charter revenue, while passenger charter was the first business model of this airline. This is show that cargo is a good supporting revenue for the company.
Airline X uses ATR for their fleets, that means there is no way to carry the cargo with belly freight, so all the cargo will be loaded in the cargo compartment inside the aircraft. Airline X gives free baggage allowance to all their passengers, to all routes. The fleet loading is prioritized for the passenger flight where passenger is the first priority in terms of loading, followed by baggage and excess baggage. Cargo is the last priority and the last thing will be loaded.
The focus aircrafts in Airline X that will be used in this research are ATR42 and ATR72. This optimization simulation only quantifies the weight of the cargo. Each aircraft has a limitation for the cargo compartment.
Sometimes a problem of cargo loading appears, where the issued cargo that the airline should carry are overload to the aircraft, so the rest of the cargo should be shifted into the next day flight. If the next day flight is also fully loaded, so it will be shifted to the next day and so on. The cargo loading is still can be optimized too as the demand is quite good in some route. To optimize the condition, the writer saw a possible solution to the problem that will be solved using Agent-Based Modeling.
ABM had been applied to solve many problems that emerged in this industry, as aviation industry in one the most complicated and regulated industry in the world. According to several researches and journals, ABM in aviation industry had solved problems in some major fields such as airline [1]- [3] and Air Traffic Management [4], [5]. There is some research also discussed about the cargo distribution [6], [7].
The primary purpose of this research is to know the optimization of the cargo compartment of Airline X with analyzing the behavior of the passengers, baggage allowance, and Excess Baggage Ticket (EBT) using Agent -Based Modelling. This report consists of methodology in chapter 2, result & discussion in chapter 3, and conclusion & recommendation in chapter 4

Methodology
This chapter will discuss about the theory and method that will be used in this research i.e., Monte Carlo, Distribution Function, and Agent -Based Modelling. Each theory and method will be calculated and simulated in Python programming language.

Monte Carlo Simulation
The simulation deals with the imitation of random behavior of a system [8]. One of the famous simulation method is Monte Carlo, which developed in 1940s [9]. It is a modeling scheme that estimate deterministic parameters based on random sampling [8]. Monte Carlo method is a computer-based method. It utilizes sequences of random data or numbers as input into a simulation model. Before Monte Carlo Simulation can be applied, the statistical distribution of the process to be modeled must be determined first. Every Monte Carlo method, all the term covers a wide range of approaches to simulation and all the approaches use a certain pattern, such as [9]: a domain of possible inputs is defined; inputs are randomly generated from the domain; using the inputs, a deterministic computation is performed; from the individual computations to give a final result, the results are aggregated. Monte Carlo sampling is often use in two kinds of related problems [10]. The first one is sampling from a distributor ( ), often a posterior distribution. the second one is computing approximate integrals of the form ∫ ( ) ( ) i.e., computing expectation of ( ) using density ( ). The problems mentioned are related because if ( ) can be sampled, the problem of computer integrals can be solved as well. Suppose the density ( ) want to be sampled as shown in Figure 2.1. If the 2-D region under the curve can be sampled uniformly, then this is the same process as sampling from ( ). In rejection sampling, another density ( ) is considered from which under the restriction that ( ) < ( ) where > 1 can be sampled directly is an appropriate bound on ( ) ( ) .

Distribution Function
Various types of distribution that suitable for agents are needed to determine the distribution in Monte Carlo. In operation research studies, there are four common distributions that encountered in the research, there are, the discrete Binomial and Poisson, and the continuous Gaussian and Exponential [8]. This research focuses on two types of distribution, Gaussian Distribution Function and Exponential Distribution Function.

Gaussian Distribution Function
A random of a variable is said to be normally distributed, or known as Gaussian Distribution Function, with average (µ) and the standard deviation () if its function is governed by Equation (2.1). An example of visualization for this distribution function is shown in Figure 2

Negative Exponential Distribution Function
Negative Exponential Distribution Function is a fundamental distribution with positive support. It is a continuous random variable X with probability density function, and the function is governed by Equation (2.2). An example of visualization for this distribution function is shown in Figure 2

Agent -Based Modeling
Agent Based Modeling (ABM) is an approach to model some systems that considered as complex system or condition composed of interacting a self-supporting agent [11]. In Agent-Based Modeling area, there are agents, relationship, and condition or situated environment. All these elements are connected well and should be connected to create a modeling. Based on Mu'Tamar [12], agent-based modeling is done by the bottom-up approach to get the understanding about a system with design, create, and produce to emulate as a whole system from the attribute and behavior of the agent.

Agents
Michael Wooldridge and Nicholas R. Jennings divided two general usages of the term agent, the first one is weak, which relatively uncontentious, and the second is stronger, which potentially more contentious [13]. In the weak one, the agent is a hardware or software-based computer system that enjoy four kind of properties, such as: autonomy, social ability, reactivity, and pro-activeness. The stronger one is more specific than the weaker one, where all the properties identified in the weak one is implemented using concepts that usually applied to human.
In a modeling, agents can be everything that has autonomous nature. On the other hand, Andrew Crooks stated that agents can be considered as two entities, animate entities and inanimate entities [14]. According to Dwitasari [15], agents in this kind of modeling generally have some characteristics and attributes, such as: Autonomous; Social Ability; Reactive; Intelligence, Reasoning, and Learning; Coordination and Communication Ability; Proactive and Goal Oriented; Mobility and Stationary.

Relationship
Agents are ruled by rules that will affect their relationship and behavior with other agents in an environment [14]. It is the base of agent's behavior. The rules or a set of rules can be applied to the interaction between agents, which leads to a set of specifics outcomes [16]. This interaction will be called as relationship. Relationship can be specified into reactive and goal-directed [14].

Situated Environment
All the explanation about the rules, interaction, and relationship, happen in a situated environment. In agent-based modelling, environment have a role as the space where the agents operate [14]. The agents will operate with the rules and every interaction only in a situated environment. No agents will operate outside the environment. This will impose the limits of the operation of the modeling and simulation by the agents.

Data
In this research, several actual data and information will be used. Rotation diagram, data set, compartment information, and interaction & state diagram will be used as the actual information and data.

Data Set
There are selected aspects of data that are in focus and needed in this simulation as shown in table 2.1. The number of passengers daily, the weight of baggage allowance, EBT revenue, the weight EBT, the weight of cargo, and the total weight of baggage allowance, EBT, and cargo. The weight of baggage allowance from the example of the data set are calculated from the total passenger times the weight baggage allowance per passengers, which 10 Kg in this KOE -LWE route. The reported EBT Kg were recorded from the calculation of EBT Revenue divided by the price per Kg, which is IDR 18,182 per Kg. The data that will be used are from January, February, and March 2020.

Compartment
Cargo compartment in Airline X's ATR are used for the passenger's baggage, excess baggage, and cargo or freight. For PK-X1, which use ATR 72-600 aircraft, the maximum payload for the cargo compartment is 1,200 Kg. For PK-X2, which use ATR 42-500 aircraft, the maximum payload for the cargo compartment is 900 Kg.

Objective Function and Constraint
An objective function attempts to maximize profits or minimize losses based on a set of constraints and the relationship between one or more decision variables. The objective functions of this research is to maximize the cargo weight (C) as calculated:  This optimization simulation only quantify the weight of the cargo. The volume of cargo will be neglected.  All the passengers are assumed to bring 100% allow baggage, in which: for PK-X1 (ATR 72-600)  Number of Pax X 15 Kg = Baggage (Kg) for PK-X1 (ATR 42-500)  Number of Pax X 10 Kg = Baggage (Kg)

Interaction, State Diagram, and Pseudo Code
The Interaction between agents is explained in the figure 2.4. Line A is the interaction between agents. There are three agents: Passenger, Baggage, and EBT. The interaction between passenger and baggage is the total baggage carried by the passenger, the interaction between passenger and EBT is the total EBT carried by the passenger, and the interaction between baggage and EBT is the total of baggage carried by the passenger and EBT carried by the passenger. Line C is the total passenger's excess baggage weight to be loaded. Line D is the total passenger's baggage and excess baggage weight to be loaded. Line E is the total baggage, excess baggage, and cargo to be loaded. The total of baggage carried by the passenger and EBT carried by the passenger will define the total cargo that the aircraft can carry. Line F is if there is no cargo issued in the flight.  The behavior between passenger and baggage will be appeared if the passenger brings and drop some baggage and the baggage fix weight will be known respectively .

Figure 2.5 State Diagram between agents involved
There is no further interaction if the passenger does not bring any checked baggage and the baggage fix weight is smaller or equal to the allowance. The behavior between passengers and Excess Baggage Ticket (EBT) will be appeared if the checked baggage of the passenger is exceeding the allowance and EBT fix weight will be known and the passenger should pay for the EBT respectively. in the MC rejection sampling. Set range x and set range y, which is described as number 4 and 5, is to determine the range of the distribution that will be used. The numbers are accepted if y is smaller than p, described as number 6, and rejected if y is bigger than p. The accepted number will be recorded in "acc", described as number 7.
The fixed parameter will be set, described as number 8. The simulation will be started with giving the number of iterations, described as number 9.
Step number 10 is to set the limitation of the compartment. The sum of Pax, EBT, and Cargo will be calculated, described as number 11. If the sum is smaller than the compartment, described as number 12, the simulation is accepted and the number will be recorded as "total", described as number 13. The simulation will be looping back to number 9, described as number 14, until it finished with the predetermined number of iterations, which is 300. The result will be printed, described as number 15, and stop respectively, described as number 16.

Result and Discussion
This chapter will elaborate step by step how the simulation run from week commencing that used to make the comparison in each day of the week, the distribution determination of each agents, Monte Carlo Rejection Method confirmation, and the simulation result with predetermined iteration number as the flowchart on the  The behavior result here will be reported by using week commencing. Week commencing means a week that begins on the date mentioned. The purpose of using week commencing on this research is to know, calculate, and compare the passenger behavior day to day from each month and week by week by each month.

Trend Line
The line graphs from The graph from Figure 3.4 is the average of passenger's behavior of PK-X2 aircraft on KOE -LWE route on Monday to Sunday in 4 weeks. The number plotted on Monday in the graph is the average from Monday week 1 until week 4. January line, which refer to blue line, has the same trend or pattern with the February line, which refer to orange line, where they go up and down each day respectively. March has a different pattern with January and February. The number is increased in the period of Monday to Thursday and then decrease from Thursday to Saturday and then hit its highest on Sunday.

Distribution Determination
To determine a limitation of this modeling, a review based on its distribution is needed. In this case, it is seen from the distribution of Pax, EBT, and Cargo. The baggage allowance is represented by the pax. Table 3  In the further calculations, Pax value will be converted to the baggage value with the assumption that all the passengers carry checked baggage with the weight of 15 Kg baggage allowance for PK-X1 and 10 Kg baggage allowance for PK-X2.

Result and Discussion
The graph on Figure 3.7 is result of the acceptance number for 300 times iterations in KOE-LWE route on Monday. 300 iterations are enough to produce the optimum numbers and it took ± 3 minutes. In all routes, EBT value is close to 0 with the negative exponential distribution function that cause the mean (µ) and the standard deviation () are close to 0 as well. This fact makes the value of EBT have no effect to the cargo optimization.  On Saturday, as the day that has the biggest value in cargo result in KOE-WGP route, the optimum number of cargo is 667 ± 2 Kg and with this simulation result, the total load in the cargo compartment will not exceed 1,200 Kg. On Saturday, as the day that has the biggest value in cargo result in WGP-KOE route, the optimum number of cargo is 133 ± 1 Kg with this simulation result of 133 ± 1 Kg, the aircraft can load more cargo on it.
On Friday, as the day that has the biggest value in cargo result in KOE-LWE route, the optimum number of cargo is 260 ± 1 Kg and with this simulation result, the total load in the cargo compartment will not exceed 900 Kg. On Tuesday, as the day that has the biggest value in cargo result in LWE-KOE route, the optimum number of cargo is 40 Kg and with this simulation result of 40 Kg, the Aircraft can load more cargo on it.

Conclusion and Recommendation
After we did the simulation of the optimum number for baggage, EBT, and cargo, several conclusions were obtained such as:  The distribution for passenger, that assumed as baggage, and cargo described as Gaussian Distribution Function, while the distribution for EBT described as Negative Exponential Distribution Function.  The optimal value obtained is based on the convergent value that is carried out by this simulation against predetermined iteration number, in which this research uses 300 iterations.  The results of the simulation using Agent -Based Modeling are optimized already with the results give a new target numbers to be used by Airline X without exceeding the limitation in KOE-WGP and KOE-LWE routes and recommend bigger target numbers in WGP-KOE and LWE-KOE routes.  The result of the total and baggage are linear, while the value of cargo is not linear with both value of total and baggage. This result proves that the value of cargo is affected by the value of baggage.  The results of the simulation have not been validated, since the value obtained needs to be compared with result from other methods.
On the other hand, there are some important recommendation for this research that obtained besides the conclusion, such as  The data in this research is in the three months period of time, from January to March, so the data here is not that much. The fact about the quantity of the data produced some recommendation for this research. It will need more data to do the simulation so a better distribution will be obtained.  The optimum value from the cargo result could be the target for the cargo in Airline X, while the maximum value on the cargo can be defined from the calculation of the difference of the baggage, EBT, cargo, and total. If there is a remain kilograms, it can be loaded to the compartment. EBT also can be optimized more and it is the marketing team job of Airline X to see the opportunity on it.  Further research with broader scope in term of flight routes and aircraft types, and the validation of the result will be required.