Application of Cargo Distribution Computation in Airbus A330 Cargo Aircraft with Optimization Algorithms

: Weight and balance problems are one of the main reasons for cargo aircraft accidents including around 30% of accidents that are due to Center of Gravity (CG). Because the pilots often calculate CG index using Load & Trim Sheets manually or use a set of simple formulas, in these calculations, it is only checked whether CG index is within the safe zone instead of determining the ideal value. In order for the safety and fuel economy to be maximized in an aircraft, CG index should be calculated at the ideal value given in the Aircraft Handling Manual. Due to safety and cost concerns, airline companies prefer non-commercial optimization solutions. Therefore, we proposed new heuristic approaches that have been motivated by a real-world application for a major airline company. First, we applied standard GA, WSA, PSO algorithms to obtain a solution that is as close as possible to the ideal CG index in an Airbus A330 cargo plan. Then, we modified standard WSA and PSO algorithms to decrease the error value and to better achieve the ideal CG index. These proposed heuristic solutions have the potential to help the pilots flying cargo aircraft with maximum safety and minimum fuel consumption.


INTRODUCTION
Increasing number of aviation accidents in the recent years have made it necessary to review safety conditions in aviation and air transportation.There had been 250 accidents in civil aviation worldwide between 2002 and 2011 including cargo and passenger planes above 5.7 ton resulting with 7,148 casualties in passengers and crew members [1].The number of fatalities in the aviation accidents between 2012 and 2019 was 2939 and the highest risk in these accidents was due to runway safety and loss of control during flight [2].In order to reduce the risk of accidents and to save fuel in cargo planes, Weight & Balance (W & B) measurements should be conducted ideally.Unfortunately, most airlines determine Weight & Balance measurements manually with the help of pilot experience and Load & Trim Sheet.In this manual procedure, the pilot checks whether the Center of Gravity (CG) index is within the safe range.If not, by rearranging the amount and location of loads, the pilot aims to bring this index to the safe range.However, this method may never achieve the ideal CG index which is presented in the AHM document.
Because the cargo planes have many sections, loading cargo to these sections to achieve the ideal CG index is a complicated problem which cannot be solved manually.The ideal CG of the aircraft for weight and balance calculations is an imaginary point where the aircraft will not tend to turn upside or downside by the forward and aft sides when assumed that the aircraft is suspended from this point.The CG of an aircraft can be moved forward or backward within the limits defined during the flight test, depending on the aircraft type.These limits refer to the furthest or closest CG locations which meet the performance and flight conditions identified by the qualified civil aviation authorities [3].A loading where the aircraft's center of gravity goes beyond the specified limits severely disrupts the pilot's ability to control the aircraft [4].For example, it is more difficult to take off and raise the altitude in a forward-cg aircraft.When the pilot slows down the gas, the nose of aircraft tends to lower down.Also, it requires a higher speed to land safely.An aft-cg aircraft more tends to stop at low speed and hit its aft to the ground during landing.For large or small aircrafts, the ideal CG location is defined as a certain inch distance from the reference point.The ideal CG is typically identified by wing width from private commercial jets of all sizes to jumbo jets.For each aircraft, there is an Aircraft Handling Manual (AHM) document prepared by the aircraft manufacturer and then customized to the conditions of use [5].
The CG index of the aircraft is found by calculating the index values for different sections in the aircraft and adding them to Dry Operating Index (DOI).These sections are basically cockpit, cabin, fuel and cargo.Since weights are constant in cockpit, cabin and fuel loading for operational purposes, there is no sufficient flexibility.Therefore, the remaining thing to do for achieving ideal cargo index (CI) is cargo arrangement.Nowadays, load distribution can be calculated by using loading charts called as Load & Trim sheet or by using a computer software which leverages only from formulas.In this calculation, it is only checked whether the cargo index is within the safe zone.For moving the cargo index to the exactly desired point on the load sheet, the location of the loads on the aircraft is changed based on estimates and moved closer to the desired point.Even if this method is generally used in passenger aircrafts which have up to 2 -6 loading sections, the location can never be moved to the desired point with nearly zero error.Besides, it is impossible to use this method for cargo aircrafts, which have up to 15 -40 different loading sections, with nearly zero error.Therefore, the structure which particularly has 15 -40 loading sections such as the structure of cargo aircrafts turns the ideal load distribution into an optimization problem that needs to be solved.While the problem could be formulated as a nonlinear model, it is possible to reach an exact solution by linearizing the objective function.Use of commercial optimization solvers in this problem is not desired because it would be costly and software applications are restricted in on-board computers for safety reasons.Therefore, it needs to be solved by a simple, fast, good real-world application for a major airline company.Solution methodology should be chosen considering cost, computational time -particularly for larger size problems and client needs.
The proposed heuristic algorithms of this study do not have any complex arithmetic operations and it is possible to code these algorithms to be used in mobile devices.Compared to the exact solution methods of linear programming, the heuristics proposed in this study is simple, reliable and possible to use in several platforms for this problem based on our customer request.As a result, we preferred exploring metaheuristic approaches and developed standard Genetic Algorithm (GA), Weighted Superposition Attraction (WSA), Particle Swarm Optimization (PSO) algorithms as well as modified WSA and PSO to obtain ideal CG index.The reason we selected these metaheuristics is that the problem is for a fixed load and the difference in the distributed load should be zero.In these algorithms, it is structurally easier to equal the sum of the difference in the distributed load to zero.Modified WSA and PSO achieved better results than the standard algorithms.With the help of metaheuristic methods, we obtained quick and good results with very small error values that could be determined without requiring any complex arithmetic operations and state-of-art optimization software and the suggested algorithms could be applied in portable and mobile devices.As presented in the experimental setup section of this study, we utilized a real-life operation and a Load & Trim Sheet filled by a pilot for this operation.Assessment done by the pilot does not achieve the ideal CG index, in result minimizes the accident risks and maximizes fuel savings.In this study, we developed algorithms to allocate cargo loads so that the ideal CG index of the AHM document is achieved with minimum error.

LITERATURE REVIEW
Most of the literature on the airplane loading problem is about maximizing the cargo load, how the center of gravity would affect the fuel consumption and problems on load configurations.To the best of our knowledge, there are no studies on the allocation of cargo loads to achieve the ideal CG index.The loading problem refers to the ability of distributing homogeneous blocks of certain length and weight close to a point that does not change the center of gravity [6].The load can be distributed equally in vehicles by using different algorithms and targeting high space usage.In this way, the center of gravity will be balanced, and the vehicle will stay balanced [7].For this reason, numerous studies are carried out to increase optimization and profitability in every field of transportation [8].As the strategy of receiving load from different centers where there is load exists, there can be optimization regarding the route where loads are received from as well [9].It is possible to save from fuel/time through optimization of the space where the load is unloaded [10].Or this can be done by including the most efficient vehicles in the model after a model is created that determines the routes where all kinds of water and land vehicles are used [11].For freight shipping on aircrafts, first safety and then fuel consumption must be observed.Overloading just to make more profit can entirely put the plane at risk.This risk is much less in land and sea transportation.It is absolutely necessary to make a Weight & Balance calculation to minimize the risk, provide security and reduce fuel consumption on aircrafts [12].Load balance is extremely important, especially in cargo aircrafts.When the accidents caused by Weight and Balance on aircrafts are reviewed, it is observed that the risk of accident on cargo aircrafts is 8.5 times higher than on passenger aircraft.The factors in play on the accidents caused by Weight and Balance are usually errors in the load table, load shifting, and incorrect loading [13].CG index value can be found by calculating Weight & Balance.The safety risk and fuel consumption of a flight on the ideal CG index position is at the optimum point.Ideal CG index or ideal % MAC values can be found in AHM documents of airlines [14].The Air Cargo Load Planning Problem faced by the airlines engaged in cargo business can be defined under four headings.These are aircraft configuration, build-up scheduling, palletization, and weight and balance [15].Studies usually look for the answer to the question of how to put the maximum load onto the aircrafts in the best way and aim to carry the maximum cargo and make more profit and to load different types of loads to the aircraft using different algorithms, provided that the CG index value remains in the safe zone [16,17].Or they aim to achieve profitability and fuel savings through using heuristic algorithms to place the total load by selecting priority loads [18].In some studies, engine emission per flight was examined and the impact of CG index on fuel consumption and the cost was analysed [19].In these studies, only the loadings where CG index is in the safe zone on the CG envelope chart were recommended.In Weight & Balance calculation, it is not the optimum solution to have the CG index in the safe zone.The optimum solution is to distribute the cargo weight in line with the ideal CG index value specified in the AHM document.The problem that should be solved to make the required cargo distribution in a way to get the ideal CG index value is a non-linear problem [20][21][22].In this respect, the solution is to use evolutionary genetic algorithm GA [23,24], PSO based on particle swarm methodology [25,26], or swarm based (WSA) algorithms based on overlapping and motions attracted by agents [27,28].With this study, not mentioned in the literature, the problem of load distribution in line with the ideal CG index value will be resolved in n heuristic way, and by extension, fuel consumption and safety will reach the top point on cargo aircrafts.

MATERIAL METHOD 3.1 Problem Description
Before a take-off for a cargo plane, the center of gravity index value is checked on the Load & Trim sheet.If the CG index is not in the safe range highlighted as red region in Fig. 1, the plane is not allowed to take-off.Center of Gravity Index equation showing the position of the center of gravity of the aircraft obtained by adding Crew Index, Dry Operating Index, Crew Index and Fuel Index is shown in Eq. (1).The CG index (I CG ) is the summation of four indices in Eq. (1).
Dry operating index is fixed and fuel index (FI) stays constant during the flight with the help of trim tank.Similarly, crew index (CRWI) could be determined before the take-off and it stays same during the flight.Therefore, the only way to bring the CG index to the safe range is to change cargo index.To do so, cargo loads in the airplane should be relocated.The pilot based on the experience puts the CG index into the safe range by changing the location of cargo loads.However, the ideal CG index is at the point where specific range is zero.The ideal CG index is the safest value for the flight and corresponding CG position value, i.e.MAC% value could be determined from the AHM document.In other words, the aim of this exercise is to reach the ideal CG index value or ideal MAC% value, even though it is nearly impossible to determine these values ideally in a manual process.In this study, we applied our method for the Airbus A30 Cargo Aircraft and the section configuration of this aircraft is presented in Fig. 2.

Figure 2 The sections of the Airbus A330 type cargo aircraft
There exists a maximum load capacity for cargo sections.Total load should not exceed total capacity and each cargo section can be loaded between 0 ≤ Section Load ≤ Max Load.The benefit of load allocation to reach the ideal CG index is two fold: (i) it will reduce the accident risk and maximize the flight safety and (ii) it will save fuel.As a result, it will decrease carbon emission to reduce environmental problems.

Matematical Model
The objective function of our optimization model presented in Eq. ( 2) is to minimize the absolute difference between the target cargo index and total cargo index.Total cargo index measured as total effect of cargo loads in all sections which is the multiplication of load amount in each section with index influence reported in the AHM.The model aims to reach the ideal cargo index with this nonlinear objective function.The absolute value of the difference between the Target index and the calculated cargo index is to be minimized.Eq. ( 3) is it means the requirement that all loads must be greater than zero.Eq. ( 4) is it means that the total weight of the loads should not exceed the maximum capacity of the aircraft.Eq. ( 5) is it states that the weight of each load should not exceed the maximum capacity of its section.Eq. ( 5) is it states that the distributed load should be equal to the total load to be distributed.
Indices, n Cargo section; Sets, n = 1, ..., k, k∈N; Decision variables, L n ; the amount of load (kg) in the cargo section n ∀n, L n ∈ R; Parameters, In Index influence for 1 kg of each cargo section.∀n, In ∈ R; TI Target cargo index value to be reached TI ∈ R; M n Maximum capacity of each cargo section ∀n, M n ∈ R; TCL Total Cargo Load ∀n ,TCL ∈ R Constraint 3 ensures that total cargo loaded in the aircraft do not exceed the maximum capacity of the aircraft in the AHM.Constraint 4 ensures that cargo load in every section do not exceed the maximum capacity of each section.Constraint 5 ensures that total amount of cargo loaded in the aircraft is equal to total intended cargo load (TCL).Constraint 6 is the non-negativity constraint.Furthermore, the optimization problem can be linearized and provided an equivalent linear programming model of above formulations.

Weight & Balance Calculation Steps
The center of gravity is calculated as follows; all of the loads and load arms on the aircraft are identified.All loads are multiplied by the load arm distance to calculate moments.All load moments are summed up.The total load arm is divided by the total mass of the aircraft.The center of gravity calculations for an aircraft are carried out only on the dimension representing the longitudinal axis of the aircraft.No calculation is performed for the center of gravity on the other axes.The weight, moment and arm lengths values of fixed parts on the aircraft (e.g.motors, wings, electronic components and etc.) do not change and these values are given by the manufacturer on the Aircraft Equipment List.The manufacturer also provides information that will facilitate the calculation of fuel load moments.Removable load elements (crew members, passengers, baggage) must be properly taken into account by the aircraft operator for the calculation of weight & balance.

Index Influence Calculation
Weight and balance are calculated based on the index influence value.Index influence value could be obtained using the formulas and coefficients that are reported in the AHM document.For the Airbus A330 type cargo aircraft addressed in this study, the index influence formula is shown in Eq. (7).Calculates the effect of weight on the CG index at a position of the aircraft.
In this equation, W represents weight, Station represents the distance from point Zero in inch, Ref. Sta. represents the selected location where all index values are calculated (33,156 m for the aircraft used in this study), C represents the constant used as denominator to transform moment values to index values (2500 for the Airbus A330 type cargo aircraft), K represents the constant used as surplus value to avoid from negative index numbers (100 for the aircraft used in this study).The values given for the aircraft cockpit of Airbus A330 cargo in the AHM document are shown in Tab. 1 [2].For example the index influence, defined as the impact of 1 kilogram change in seats 1 and 2 in the cockpit and for each cargo section are calculated as in Eq. ( 8), Eq. ( 9) using by Eq. ( 7).

 
24 2836 0 00971344 1   17 400 0 0069600 1 K constant is not used here since index change is calculated.K constant is a value used to shift the aircraft's envelope graph to the positive axis.By large aircrafts, moments are big figures (~105).The index change created by 1 kg load in each section of the aircraft on the overall aircraft is given in the AHM document of the relevant aircraft.It is ensured that the calculation is more practical by using these values instead of moment in the calculations.

CG and %MAC relation
Calculation formula generally shows similarity in different aircrafts, however only constants are different.%MAC is calculated by Eq. (10).It expresses the mathematical relation between CG index and %MAC.

The Impact of CG on Fuel Consumption
The graph in Fig. 5 shows the SR(specific range) variations for 27% medium, 20% forward and 35% aft CG position, that is to say the change in fuel consumption described in nautical miles per kg.Fig. 5 is from AirBus Fuel Economy document for A310-203 type aircraft [13].Aft-CG is more advantageous in terms of fuel consumption.In addition, the red line shown in the graph is the optimum altitude line.When CG remains between these lines, its impact on fuel consumption is described as percentage for 140 t, 130 t and 110 t constant aircraft weight.For aircrafts with similar characteristics (except for A320 family), the impact of CG on fuel consumption is shown in Tab. 3.

Table 3 The effect of CG on fuel consumption Aircraft Type
Aft CG (35 -37%) It is found in the Airbus fuel economy manual that the CG reference optimal for A300/A310 is 27%, and 35 for Aft-CG%, the CG reference for A330/A340 is 28%, and 37% for aft-CG by referring to Fig. 5 and Tab. 3 for A310-203 type aircraft.Fuel consumption increases by up to 1% at the maximum flight level.On the other hand, at maximum flight level, the change in fuel consumption given in Tab. 3 is greater up to 1%, and a SR (specific range) below the optimum point (less than 27%) has no positive impact on fuel consumption and it is not preferable.

Cargo Load Distribution with Optimization Algorithms
Today, pilots manually fill in the load chart, called the Load&Trim sheet given in the appendix, to see if the point at which Weight and CG index intersect is in the safe zone [20].If referred to Fig. 5, Fig. 9 and Tab. 3, the identified ideal trim line point of Airbus A330 type cargo aircraft under our review, corresponds to %MAC 28.So, it is important how much cargo weight is in which section.Two points should be considered here.First, the cargo load distributed cannot be more than or less than the total load.Second, the weight to be loaded into any cargo compartment cannot be more than the maximum capacity of that compartment.Considering that the cargo plane has 17 sections, it is not possible to manually carry the error-free MAC% over the 28% line on Load & Trim sheet.But the ideal CG index can be captured by moving over the MAC% 28% line using optimization algorithms.
In this study, 3 different algorithms were used to reach the target Cargo Index value.First, the ideal cargo index was targeted with genetic algorithm, but the desired result was not reached in non-integer cargo values.WSA (Weighted Superposition Attraction) and PSO (Particle Swarm Optimization) algorithms were tried to solve this problem.However, since WSA and PSO algorithms do not include constraint functions, the algorithm structure has been changed and the ideal cargo index value CI was achieved with the modified WSA and PSO algorithm.

Genetic Algorithm
Genetic algorithms simulate the evolutionary process for solving problems in a computer environment.As with other optimization methods, a cluster is formed consisting of such structures instead of developing a single structure for a solution.This cluster, which represents many possible solutions for the problem, is called "population" in genetic algorithm terminology.Populations consist of number sequences called vectors, chromosomes, or individuals.Each element in the individual is called a gene.Individuals in the population are identified by genetic algorithm processors in the evolutionary process [26].The concepts used in genetic algorithms are used in a similar way to the theory of evolution in biology.In nature, populations emerge with the coexistence of individuals.
In the genetic algorithm, initially individuals are randomly generated, but this is not a requirement.Particularly in restrictive optimization problems, the best solutions can be generated by considering a part of the defined restrictions to create an initial population.After populations are subject to fitness function process, the fitness value is determined to evaluate how close the solution is to the optimal result.The genetic algorithm, for which initial population has been generated, operates with three genetic operators.These are selection, crossover and mutation operators.In general, each of these operators is applied to each individual in the population that will be formed in the new generation.

Weighted Superposition Attraction, WSA
It is a new swarm-based optimization algorithm which can be observed in many systems and which is based on the superposition and movements of the matters.In most of swarm-based algorithms, it is assumed that an artificial agent can identify the effective artificial agent in the population and can adjust its direction towards that agent.However, in fact, it is impossible to accurately define the effective source due to many interventions and it is not easy for artificial agents to identify superposition.However, the superposition mechanism is successfully implemented in the WSA.Within this framework, the WSA algorithm identifies a target point in the search area by the superposition principle and directs the agent of population to that point.This means that the target point refers to the agent of population's overlapping on the current discovered points of the search area.Once the target point is identified, the agents will investigate whether they are moving to the target point or in a randomly selected direction [28,29].
The advantage of Weighted Superposition Attraction (WSA) method is that it is structure-wise simple and superposition method is successful in problem types such as cargo index calculation.In the standard WSA algorithm, during CI calculations, there are no constraint functions in the calculation of new solutions resulting from optimization.In this study, the algorithm has been changed to ensure that step length, that is to say, the total change amount of variables is equal to zero in the standard WSA algorithm, shown in Fig. 6a and Fig. 6b.While calculating new values of solutions in WSA, it is leveraged from target point towards direction (D (i,j) , +1 or −1) and s/step length.In this respect, change amount of variables will be as below at the end of iteration in Eq. (11).New values result from addition of change amounts to previous values.The Eq. ( 12) must be ensured as the total load to be distributed for cargo and should be constant.If Eq. ( 12) is put in its place in Eq. ( 13), it is acquired.If the equation is refined and Eq. ( 11) is put in its place, Eq. ( 15) is achieved.
Eq. ( 15) must be equal to zero.Since Eq. ( 15) cannot be guaranteed to be zero, the total load changes as cargo function's parameters change.For this reason, the algorithm structure as in Eq. ( 16), Eq. ( 17), Eq. ( 18) and Eq. ( 19) has been changed in this study in a way that total of ∆x elements is equal to 0 in each iteration.New ∆x values are calculated with Eq. ( 19).
  ,n 1 0 Parameters; sl User-defined step length initial parameter; fi User-defined step length constant parameter; t User-defined rank weight parameter; AAc Used Artificial agent count; Vc The count of variables to be optimized; x(i, j) Artificial agent variables.Initially, it is randomly selected; Fv(i) Fitness value of each solution; MsV(j), Fmsv Cluster vector, fitness value of target point; MinL(j), MaxL(j) Minimum and maximum limits of variables; Wgt(i) The weight of each solution rank; MaxIter, C_Iter Maximum number of iterations, active iteration number Thus, Eq. ( 15) is checked and Eq. ( 19) is guaranteed to be zero.In other words, total cargo load is fixed.Since the problem in Standard WSA algorithm is solved in this way, total cargo load will not change even if iteration number is infinite.For this reason, the step of updating the variables of the solutions in the determination of target direction for each solution in the Standard WSA algorithm, shown in Fig. 6a, becomes as in Fig. 6b and the code changes as follows.

Particle Swarm Optimization
Particle swarm optimization (PSO) is basically an algorithm based on the co-development of individuals in the swarm.Each individual is called a particle, and the population of these particles is called a swarm.The aim is to locate the particle with the best position in the swarm and allow the other particles to move in that direction.Particles aim to optimize their next position based on their past experience and the effective position in the swarm [30].PSO similarly has the advantages and disadvantages of WSA.The difference of PSO is that velocity level (v (i,j) ) is calculated based on the swarm direction for each individual.However, since the sum of velocities cannot be guaranteed to be 0 in this standard PSO algorithm, the total load changes as the parameters of the cargo function change.For this reason, the new PSO algorithm has been recommended by changing the algorithm structure in a way to re-calculate velocities.Shown in Fig. 7a and Fig. 7b.
For the PSO algorithm, we selected parameters values experimentally as the following: Vc is the number of cargo sections n, c 1 and c 2 are 2,2, w max is 0,9, w min is 0,4, v (i,j) is L n for each m.The starting particles and their velocities are randomly generated based on the determined swarm size.Fitness value is calculated for each particle as it is in Eq. ( 29).The selection of the best fitness value based on the fitness value of the initial conditions is as follows as it is in Eq. ( 21) and Eq. ( 22).Updating velocity for each particle is given in Eq. (24).The new position for each particle is calculated through Eq. (25).
The standard PSO algorithm used in the study is given below.PSO similarly has the advantages and disadvantages of WSA.The difference of PSO is that velocity level (v (i,j) ) is calculated based on the swarm direction for each individual.The value of variables at the end of iteration is as it is in Eq. ( 26).As shown in Eq. ( 27), the sum of new values calculated must be equal to the sum of previous values.As the total load to be distributed for cargo should be constant, total velocity level must be zero as shown in Eq. (28).
However, since the sum of v (i,n) cannot be guaranteed to be 0 in this standard PSO algorithm, the total load changes as the parameters of the cargo function change.For this reason, the new PSO algorithm has been recommended by changing the algorithm structure in a way to re-calculate velocities (v (i,j) ) as follows.The sum of existing velocities in Eq. ( 29), the sum of existing velocities' absolute values in Eq. ( 30) and velocities are recalculated through Eq. ( 31).The sum of new velocities becomes equal to zero with Eq. (32).32) is written like the way in Eq. (33), our total cargo load becomes fixed.The problem with the standard PSO algorithm is thus solved.Even if the number of iterations is considered infinite, the total cargo load amount will not change.For this reason, the step of updating the variables of the solutions in the Update velocities of each particle block in the Standard PSO algorithm, shown in Fig. 7a, becomes as in Fig. 7b and the code changes as follows.

RESULTS AND DISCUSSION 4.1 Experimental Setup
The values in Tab. 4 refer to values of a real operation.Crew and fuel index calculations have been added to the flight operation in Tab. 4. Dry Operating weight is the aircraft's empty weight and the Dry Operating index is the index in aircraft's empty weight.As shown in the Load&Trim Sheet in Fig. 1, cargo distribution, which is manually performed by the Aircraft pilots nowadays, is as follows and airlines require pilots to complete this chart consisting of flight safety and fuel savings.By manually filling in the Pilot Load & Trim Sheet as in Fig. 10, the pilot aims to stay in the range which is highlighted red in Fig. 8.This range is the safe zone for the flight.Based on the load & trim sheet filled by the pilot in real life as documented in Tab. 4 and Tab. 5, the CG index and MAC% are calculated as 98,475 and 24,72%, respectively.With the manual method, it is nearly impossible to achieve the ideal MAC%.The ideal MAC% value is reported at the catalog information based on the type of aircraft.Since our study is on Airbus A330, the ideal MAC% for this type of aircraft is 28%.If we write known constants and variables in Eq. ( 10) to get the value of 28%, which is the ideal MAC%, we can find the ideal CG index I CG , as shown in Fig. 8.
I CG index resulting from the manual calculation is about 17.59 more than the ideal CG index (116,063 -98,475 = 17,59).The cargo index CI that will be obtained from the cargo distribution to get the ideal cargo index is calculated by the following Eq.( 37 Based on the manual calculation of the pilot, the cargo index was 22,30000 and error value was 17,58830.To secure this ideal value, the cargo load on each loading section needs to be changed.As shown in Tab. 7, the modified optimization algorithms should make the necessary distributions for target cargo index to be 39,8883. Table 6 Effect of CG(%MAC)/SR location on A330 aircraft fuel consumption [3] Aircraft Type Aft CG (37%) Aft CG (28%) Fwd CG (20%) A330 +0,5% 0% -1,3% Fig. 5 shows the relationship between fuel consumption and CG position (MAC%) for the A310-203 type aircraft.The effect of CG position on fuel consumption for Airbus A330 type cargo aircraft is given in Tab.6 and Fig. 9, with reference to Tab. 3.
The ideal MAC% value is calculated to be 28% to be the ideal fuel consumption for the Airbus A330 type cargo aircraft used in this study, and it is shown with the graph that the fuel can be reduced by SR = -0,44% in nm/kg units, as shown in Fig. 9.For the GA algorithm, we selected parameters values experimentally as the following: V C is the number of cargo sections n, the mutation rate is 0,05, the population size is 20, the mutation bit count is 2%, the selection rate is 5, the maximum number of iterations and active iteration number is 104.Technical Gazette 30, 4(2023), 1068-1080 Initial gene pool is determined based on constraints and consists of 50 elements.While the initial minimum error and average error were 30,61 and 30,68, respectively, the minimum and average error decreased to 0,56 and 1,499 after 1000 iterations.
In the WSA algorithm, the initial feasible solution is obtained through a search starting with 10 elements.The initial elements are selected randomly within constraint ranges.Every element is improved with each iteration using superposition method and around 250 iterations, desired values are achieved.The initial maximum error and initial average error were 48,4 and 0,2, respectively and the maximum and average error decreased to 1,01 and 0,03.
In the PSO algorithm, the method starts with 10 initial particles and these particles are selected randomly with respect to constraint ranges.In every iteration, the best particle is selected and the particle vector is updated.All particles are moved towards the particle vector.At the end of each iteration, the best swarm particle is determined.While the initial best swarm particle error is 7,37, the error value is decreased to 0,00036 after 250 iterations.

Computational Results & Discussion
Computational results of our study are presented in Tab.7 and Tab. 8.All three algorithms are iterated until the error values are diminished below a certain level.Initial feasible parameters for the algorithms are obtained randomly based on the constraint ranges.It has been observed that the standard GA algorithm distributes the target load that needs to be distributed, 50948 kg.However, the weight values of the loads must be given as integers.When it is not given as an integer, GA does not analyze and does not distribute the load at all.However, if the load is entered as an integer it will output and the error rate will be 0,022%.The calculation takes 7,9 seconds.The standard WSA and PSO algorithms were unable to distribute 50948 kg of target weight, but only distributed 46783,5 kg and 49254,2 kg respectively.In order to minimize the error value, we modified WSA and PSO algorithms as presented in Section 3.7 and 3.8, respectively.The modified WSA and PSO algorithms distributed the target weight of 50948 kg and the CI index with almost zero margin of error.The odd results here may not be very useful operationally.Here it can be rolled up to ±1 kilogram by the pilot to obtain a value without odds.This rounding affects the I CG up to 0,008%, according to Tab. 3. So, the MAC% in this operation varies as much as 0,006%.This effect can be ignored.Therefore, the CG index is moved to the target value.From Load & Trim Sheet, the trip fuel (the amount of fuel the pilot expects to spend) determined for the trip is 20000 kg.As trip's MAC% is 28%.
The trip can be carried out with 19,921 kg fuel, saving 88 kg of fuel.Considering the minimum number of trips for a single aircraft is around 1,500, the total fuel savings with our method will be substantial.The modified PSO algorithm allocated the cargo load while reaching the ideal CG index in 1.35 seconds.Furthermore, the modified WSA algorithm achieves the ideal CG index and allocates the cargo load in 0.017 seconds.While all three algorithms perform well and fast, the best load allocation in our study is determined with the modified WSA algorithm.The CG index error is 17.588 in the manual allocation conducted by the pilot in real life which is 44% deviation from the ideal CG value.Our method, both modified PSO and WSA algorithms improved this error significantly, achieved the ideal CG index value and allocated the cargo load optimally.In addition, both algorithms perform quite fast and solved the problem under 2 seconds.Since this operation will be done many times in a day in real life applications, the computational time of our algorithms is an important factor and obtaining quick solutions as we did in this study will improve the likelihood of real-life implementation.Studies in the literature focused on increasing and maximizing the cargo load; however better allocation of the cargo load and achieving the ideal CG index will improve the flight safety and fuel savings.
We run 1000 replications of GA, WSA and PSO algorithms and calculated 95% confidence intervals of error values and computational time.We reported these values in Tab. 9.The method performed best according to statistical analysis that is the modified WSA algorithm.It outperformed the GA and the modified PSO algorithms in both outcomes and it had the smallest 95% confidence intervals range of error value and computational time among all algorithms.The modified PSO had a very close confidence range to the modified WSA while GA performed the worst, particularly in the time.

Comparison of Heuristics and the Exact Solution
Optimization solvers can solve linear programming models to the optimality.Thus, we solved the CG index model to the exact optimal solution by linearizing the objective function of the problem.We run heuristics for each problem instance for 100 times and we collected minimum, maximum and average of the computational times and the error values for three heuristics and the linear programming model, as shown in Tab.10.Genetic algorithm performed the worst among all four solution methods.LP solver was the best with respect to the error value since it is an exact solution technique and it has performed well when the problem size was less than 35 sections according to the computational time.WSA was comparable to LP in terms of the computational time for the smaller problems.PSO was slightly worse than WSA and LP for the same measure and better than WSA for the error value.When the problem size increased, LP was 14 to 20 times slower than PSO and 5 to 74 times slower than WSA.The error margin was around 0,9% to 1% and 0,3% to 0,2% compared to the optimal solution of LP for PSO and WSA, respectively.Heuristics, particularly WSA and PSO was faster in the larger problem sizes with small error percentages in the calculation of target index.While the optimization solvers provide good solutions, these are slower for the large size problems compared to the heuristics.Considering operations would be applied many times during a work day in an air cargo company, providing fast solutions within the safe zone of the CG index is preferable to the exact solution.In addition, commercial solvers are not desired due to safety and cost concerns in the airline companies; the proposed heuristics in this study have been favored in the real-world applications.Most of our modeling decisions were informed by our customer and we never suggested that our objective was to obtain the exact solution.Our objective was to compare the performance of three heuristics that are known to be quick and easy-to-implement.
The selected section sizes were 15 to 80 sections which is the largest possible number of sections in a cargo aircraft.We run the heuristics for each problem instance for 100 times and we collected minimum, maximum and average of the computational times and the error values for three heuristics and the linear programming model.LP model was the best with respect to the error value since it is an exact solution technique and it has performed well when the problem size was less than 35 sections according to the computational time.

CONCLUSION
In this study, weight and balance problem was studied and the optimal load allocation for Airbus A330 type cargo plane with 17 cargo section was determined to achieve the ideal CG index.3 different optimization methods were tested to achieve the ideal CG index value and to allocate the cargo load.According to our results, GA, PSO and WSA optimization methods allocate cargo loads with different distributions.However, the modified PSO and WSA algorithms appear to yield more successful results with almost zero margin of error.Although the original WSA and original PSO results provide the desired cargo index, these results are not applicable in real life because total cargo amount in these algorithms is not same with desired total cargo load.While the most accurate result was obtained by the modified PSO and modified WSA, the fastest result was achieved with the modified WSA.Both algorithms performed well, and they produced the optimal solution and determined the optimal cargo load that has the ideal CG index under 2 seconds.The modified WSA algorithm achieved the best results.
In addition to improved safety due to better CG index, our method improves the current practice by reducing the fuel consumption by 0,44% which is 88 kg on an Airbus A330 cargo aircraft.While a cargo plane makes an average of over 1000 -1500 trips per year, significant economic savings could be achieved with our method.Optimization methods could improve this process substantially by reducing the CG index error.Thus, the cargo flights will be safer, and they will have better fuel consumption.Considering the number of daily cargo flights, fuel savings due to our study could significantly prevent cost and increase profit.
Another dimension of such savings is environmental and carbon emission per a cargo flight could be reduced with our method.Providing fast and optimal or near optimal solutions without requiring commercial optimization solvers would increase the potential for a realworld implementation since the solution method could be applied in any basic computer or mobile device and repeated as many times as the number of cargo trips in a day.This is an important factor in assessing the implementation potential of our study in real-world.
The proposed model is prefixed with an A330 aircraft, but it can be used for different aircraft types..The information shown in Tab. 2 such as Index Influence, Maximum Capacity and number of Cargo Sections may vary for different aircraft types.In addition, the Ideal CG locations will also differ for different aircraft types as shown in Tab. 3.However, these differences do not change the structure of the model.The calculations can be performed for different aircraft types by replacing the different values such as Index Influence, Maximum Capacities and number of Cargo Sections in the proposed model.
The proposed model benefits the airline industry in two important ways.The first is safety.As mentioned before, there have been many Weight and Balance related accidents in aviation.In the published report [13], 20,9% of these accidents in cargo aircraft are due to CG exceeded aft limit, 16,4% overweight take off, 10,4% CG exceeded forward limit, 9% overweight landing, 3% no weight & balance calculation made.If such a model had been used, 59,7% of the accidents in this report could have been prevented.The second benefit is cost.Airplanes spend a lot of power not only to move forward in the air but also to stay balanced.The aim of the proposed model is to minimize this power consumption.This power spent for the stability of the aircraft causes an increase in fuel consumption in the airline industry, frequent engine maintenance periods, a decrease in the number of flights and an increase in engine wear.These are serious costs for the airline industry.It also saves human resources by speeding up the weight and balance calculation process during the flight process.

Figure 1
Figure 1 CG Envelope In Tab. 2 obtained from AHM document, maximum load capacity for each cargo section and the amount of index influence change for each kilogram in it are given.The length of arm from reference station values (Station-Ref.Sta) given in Tab. 1 and Tab. 3 are the calculated load arm distance.
In this equation, I CG represents the index value of the CG position corresponding to the respective weight, MAC represents the length of the average Aerodynamic Chord in inches or meters, LeMAC represents the horizontal distance from Zero point to the front edge of the MAC in inches or meters [3].When the constants MAC, LeMAC and C, K, for the Airbus A330 type cargo aircraft in this study MAC (7.27 m), LeMAC (31.3380 m) and C, K, Ref. Sta and variables %MAC, I CG , W are put in their respective places, the relation between %MAC, index value of the CG position (I CG ) and Weight(W) are drawn like the graph in Fig. 3.If we limit Fig. 5 axis limits with available operational limits, we get 3d graphs in Fig. 4.

Figure 3
Figure 3 CG Envelope (the relation between %MAC, ICG and Weight(W))

Figure 4
Figure 4 3d version of the relationship between %MAC, ICG and W

Figure 5
Figure 5Effect of Specific Range variation with CG position on fuel consumption[3] Updating target direction variables in the standard WSA algorithm b) Updating target direction in the standard WSA algorithm variables in the modified WSA algorithm

Figure 7
a) Updating velocities of each particle in the Standard PSO algorithm b) Updating velocities of each particle in the Modified PSO algorithm

Figure 8
Figure 8 MAC% and CG Index representation, which is manually drawn and ideal for this operation

Figure 9
Figure 9 SR change to A330 Mac% value

Table 1
Number of cockpit crew seats and average location

Table 2
Maximum load capacity for each cargo section and the amount of index influence change for each kilogram Fitness value of swarm element; pbest(i, j) The best swarm ; fbest(i) The best swarm fitness values; gbest(j) The best swarm element; v(i, j) The speed of swarm elements; MaxIter, C_Iter Maximum number of iterations, active iteration number; c 1 , c 2 Acceleration constant; wmax, wmin Minimum and maximum stability; V c Variable constant; m Population size If Eq. (

Table 4
Load&Trim sheet operation values used in this study

Table 5
Manual cargo load allocation by the pilot as in Fig.1Airbus A330 Cargo Section Numbers The loads L 1..17 / kg Index Influence I 1..17 );

Table 7
The distribution of loads by the modified PSO, WSA optimization methods and comparison with the original optimization methods

Table 8
The results of the modified PSO and WSA optimization methods and comparison with the original optimization methods

Table 9
Statistical Analysis of the Methods

Table 10
Minimum, maximum and average of the computational times and the error values for three heuritstics and the linear programming solver