Enhanced Simulated Annealing for Solving Aggregate Production Planning

Simulated annealing (SA) has been an effective means that can address difficulties related to optimisation problems. SA is now a common discipline for research with several productive applications such as production planning. Due to the fact that aggregate production planning (APP) is one of the most considerable problems in production planning, in this paper, we present multiobjective linear programming model for APP and optimised by SA. During the course of optimising for the APP problem, it uncovered that the capability of SA was inadequate and its performance was substandard, particularly for a sizable controlled APP problem with many decision variables and plenty of constraints. Since this algorithm works sequentially then the current state will generate only one in next state that will make the search slower and the drawback is that the searchmay fall in local minimumwhich represents the best solution in only part of the solution space. In order to enhance its performance and alleviate the deficiencies in the problem solving, a modified SA (MSA) is proposed. We attempt to augment the search space by starting with N + 1 solutions, instead of one solution. To analyse and investigate the operations of the MSA with the standard SA and harmony search (HS), the real performance of an industrial company and simulation are made for evaluation.The results show that, compared to SA and HS, MSA offers better quality solutions with regard to convergence and accuracy.


Introduction
Aggregate production planning (APP) is considered as an important technique in operations management.Other elemental methods that are closely related to this included capacity requirements planning (CRP), master production scheduling (MPS), and material requirements planning (MRP).APP refers to a medium-term resource and capacity planning that ascertains optimum levels of the inventory, workforce, subcontracting, production, and backlog to meet the inconsistent demands and requirements with limited capacity and supply over a definite period of time that spans from 3 to 18 months.Also, APP is implemented to resolve problems that involve collective decisions.It finds the total capacity level in industries for a certain period, while not calculating the amount of produce from each individual stock-keeping unit.The extent of details estimated makes APP a useful instrument for analysing decisions with a transitional time frame where determining levels of production by stock-keeping unit becomes too early, while arranging for additional capacity becomes too late.The objective of APP is to fulfill the expected changing requirements and demands in a cost-effective way through a definite period.The usual expenses include the costs of inventory, production, backlog, subcontracting, hiring, layoff, backorder, over time, and regular time.
The APP problem has been researched widely since it was first conceptualised in the 1955 study by Holt et al. [1].They proposed the HMMS rule.Bergstrom and Smith [2] generalized the HMMS approach to a multiproduct formulation.Bitran and Yanasse [3] investigated the problems of ascertaining production plans under stochastic demands over a set of time periods.Nam and Logendran [4] evaluated APP models and categorised them into near optimal and optimal.
APP along with the other mathematical optimisation models indicated that linear programming has the most pervasive acknowledgment.Silva Filho [5] developed a stochastic optimisation model with the limitations of production, stock, and workforce to explain a multiproduct and multiperiod APP problem.APP was described by Fung et al. (2003) [6] as a method to ascertain inventory, production, and workforce levels required to meet all market demands.Mirzapour Al-E-Hashem et al. [7] formulated a robust multiproduct, multiperiod, multiobjective, and multisite APP that handles contradictions in relation to total expenses of supply chain, customer assistance levels, and efficiency of workers during medium-term planning in an uncertain environment.
A mixed-integer linear programming model was proposed by Zhang et al. [8] for APP problems related to the expansion of production capacity.Jamalnia and Feili [9] introduced a distinct hybrid event simulation and system dynamics method to simulate and replicate APP problems.The prime purpose of their study was to find out the efficiency of APP strategies with regard to the total profit.Tonelli et al. [10] suggested an optimisation method to confront aggregate planning difficulties of a hybrid model production setting.They assessed the planning problem of a real-world assembly manufacturing system and tackled the model flexibility challenge.A mixed-integer, multiobjective, nonlinear programming model was proposed by Gholamian et al. [11] for scheduling aggregate production in an SC under uncertainty demand.The model resolves the problem with a fuzzy multiobjective optimisation approach.The suggested approach changes the nonlinear model to a linear one and then alters the fuzzy model to the parametric deterministic model.
In recent times, with the influence of sophisticated modeling methods invented and increasing the number of assumptions, the APP problem has turned into a complicated and large-scale problem.In the research community, there is a tendency to resolve large and complex problems by the use of modern heuristic optimisation methods.This is mainly due to the time-consuming and unsuitability of classical techniques in many circumstances.
A fuzzy multiobjective APP model was introduced by Baykasoglu and Gocken [12] along with a direct solution technique based on ranking orders of fuzzy numbers and tabu search.Ramazanian and Modares [13] presented a goal programming multiobjective model for a multiperiod, multistep, and multiproduct APP problem in the cement sector.The model was modified as a nonlinear programming model with a single objective.An extended objective function method and a suggested PSO variant whose inertia weight was established as a function were used to resolve it.A comparison of the simulation with GA and PSO confirmed that PSO shows more acceptable results than GA.To simulate the process of human decision-making, Wang and Fang [14] implemented a genetic algorithm (GA) based technique with fuzzy logic.In place of finding the most optimal solution, this procedure looks for a group of inaccurate solutions that yields results within satisfactory levels.Subsequently, a final solution was selected by examining a convex combination of these solutions.Kumar and Haq [15] resolved an APP problem by utilising genetic algorithm (GA), ant colony algorithm (AGA), and hybrid genetic-ant colony algorithm (HGA).Based on the results, HGA and GA exhibited relatively good performance.
Aungkulanon et al. [16] considered various hybridisation techniques of the harmony search algorithm to explain the fuzzy programming method for several objectives to the APP problems.To resolve the multiobjective APP problem, Luangpaiboon and Aungkulanon [17] recommended hybrid metaheuristics of the hunting search (HuSIHSA) and firefly (FAIHSA) procedures based on the enhanced harmony search algorithm.A mathematical model was suggested by Kaveh and Dalfard [18] that took into consideration the time and expenses for preventative upkeep of APP problems and used a simulated annealing algorithm to solve this.In spite of this, they manage single objective only.Wang and Yeh [19] introduced the concept of subparticles to the update rules of PSO to relieve the lack of resources to change the PSO plan so that the restrained integer linear programming model can be implemented to solve real-world APP problems.However, all these presented approaches are generality concentrated on the solution algorithm but not on a general model.The majority of models in the APP are relevant to single product, single stage systems, and even single objective; they are not compatible with production systems [20].
A simulated annealing algorithm (SAA) has not been functional in solving multiobjective APP problems, even though most applications made use of metaheuristic algorithms on APP.In this paper, we first suggest a conventional multiobjective linear programming model for APP.Throughout the implementation of SA to the APP problems, it was observed that SA has an inadequacy with respect to big APP problems that have plenty of decision variables.To improve the SA efficiency for the production planning system, a modified SA is introduced that can resolve APP problems with multiobjective linear programming model, since a large number of companies intend to fulfill more than one objective while creating a response and flexibility.The objective of the model is to decrease the aggregate expenses of production and workforce, and simulation and real-life data were used to verify the effectiveness of this method.
The organisation of the paper is as follows.Section 2 gives an overview of harmony search.Section 3 includes some essential theories of simulated annealing algorithm.Section 4 introduces the scheme of modifying the simulated annealing algorithm.Section 5 explains the multiobjective linear programming model of the APP.Section 6 discusses the trials and comparisons for the altered SA with standard HS and SA.Section 7 provides a few conclusions and offers some discussions.

Multiobjective Linear Programming Model
We proposed mathematical model for APP problem and assumed that an industrial company manufacturing produces  types of products to fulfill market demand over planning time horizon .We considered two objective functions in this paper: to minimize production costs and minimize workforce costs.We will describe them below.

Harmony Search Algorithm
Geem et al. [21] first introduced the harmony search algorithm HSA.HSA is believed to be an inspiration algorithm based socially on local search attributes.The concept of HSA has originated from the natural pattern of musicians conduct when they play their musical instruments or improvise the music together.This creates a perfect state of harmony or a pleasurable harmony as governed by an aesthetic quality with the pitch of every musical device.In a similar manner, the optimisation technique searches for a globule solution as ascertained by an objective function through a series of values designated to every decision variable.In a musical orchestration, the set of pitches from every musical instrument accomplishes the aesthetic evaluation.The quality of harmony gets enriched with every practice.Each style of music is composed by musicians out of specific instruments.If all musical pitches create a perfect harmony, then that musical experience remains in every instrument player's memory, and the likelihood to create a good harmony the next time increases manyfold.If every player plays together with dissimilar notes, then a new musical harmony is composed.There are three rules of musical improvisation playing a completely random pitch from the workable sound range, playing a pitch from memory, or playing an adjoining pitch of a pitch from memory.These techniques rules are implemented in HSA and the same was explained to describe the process of HSA.
The HSA process can be summed up as follows.
Step 1. Initialize the harmony memory (HM) which contains HMS vectors generated randomly, where   =   ,  = 1, 2, . . ., HMS, and  = 1, 2, . . ., , where n is the size of the problem, and the harmony memory (HM) matrix is filled with HMS and  represented the fitness function as follows: Step 2. Improvise a new harmony.There are three rules for this: (1) Harmony memory considering (HMC) rule: for this rule, a new random number  1 is generated within the range [0, 1].
If  1 < HMCR, then the first decision variable in the new vector    is chosen randomly from the values in the current HM as follows: (2) Pitch adjusting rate (PAR): a new random number  2 is generated within the range [0, 1].
If  2 < PAR, then the pitch adjustment decision variable is calculated as follows: where BW is a bandwidth factor, which is used to control the local search around the selected decision variable in the new vector.(3) Random initialization rule is as follows.
If the condition  1 < HMCR fails, the new first decision variable in the new vector  new  is generated randomly as follows: where ,  are the lower and upper bound for the given problem and  3 ,  4 ∈ (0, 1) Step 3. Update harmony memory.If improvised harmony vector is better than the worst harmony, replace the worst harmony in the HM form: if  ( new ) <  ( worst ) then  worst =  new (8) Step 4. Check the stopping criterion.If the stopping criterion is satisfied, the computation is terminated.Otherwise, repeat Steps 3 and 4.
The steps of HSA are elucidated in Figure 1.

Simulated Annealing Algorithm
For complicated optimisation problems, simulated annealing (SA) has been regarded as an effective measure.Kirkpatrick et al. [22] introduced SA for the first time.SA refers to a random search technique that makes use of a similarity between the method through which a metal cools down and freezes to a crystalline structure (the annealing process) with minimum energy and the search process for a minimum in a more undefined system.This is used as the base of an optimisation method that can be used for combinatorial problems.The method has been extensively used to solve various problems.The foremost benefits and strengths of SA over other search techniques are its flexibility and capability to achieve overall optimality.Conversely, the main disadvantage of the method is its extremely slow convergence in big problems.In SA, first a primary solution is randomly created, and a neighbour is found and this is accepted with a probability of min (1,  (−/) ), where  is the control parameter corresponding to the temperature of the physical analogy and is called temperature, and  is the cost difference [23].On gradual decrease of temperature, the algorithm congregates to the global minimum.The operations of the SA are depicted in Figure 2.

Modified Simulated Annealing Algorithm
Practitioners make extensive use of SA to solve NP-hard problems.But SA can get stuck at a local minimum and not attain the global optimum because of its inadequate capability and substandard performance, specifically with a large number of decision variables in APP problems.It is also  programmed to function sequentially and hence the current state will generate only one subsequent state.This will slow down the search.In order to improve the problem solving by the aforementioned SA, a modified SA (MSA) is proposed to augment its performance and address the problem-solving insufficiencies.We attempt to augment the search space by starting with  + 1 solutions, instead of one solution.These solutions work in a parallel way for utilising the overall search area in short time.The details are described in the following steps, and the operations of the MSA are also illustrated in Figure 3.
Step 4. Repeat this step  times: , where  is a random number ∈ (0 to 1) and  is Boltzmann probability factor.
Step 5. Reduce the parameter  according to  +1 = ,  = 0.95.Convergence criteria are satisfied and if not then go to Step 3. Concerning the stopping condition, theory suggests a final temperature equal to 0.

Computational Study and Results
To assess the functioning of the MSA algorithm for the APP problem, two criteria are used: APP problem from real-world (case study) and simulation.Standard SA, MSA, and HS are coded by MATLAB 2015; the prevailing algorithms (SA, HS) are compared with the proposed algorithm.6.1.Case Study.In this section, the General Company for Vegetable Oils is used as a case study to demonstrate the proposed model.This company produces ten types of products.Each product is represented by a letter (, , , , , , , , , and ).The time horizon of APP decision is six months.Tables 1-3 represent costs of production and inventory, hours required to produce one ton for each product, and forecast demand for each product, respectively.The initial inventory for product  is 105 tons,  is 333 tons,  is 0.25 ton, and  is 1.8 ton.The initial worker level is 3313 workers.The cost of regular worker per month is 500 $/man, the working hours in one month are 140 hours.5.357 $ (dollar) is overtime costs per worker per hour.The costs associated with hiring and firing are 774.910$ and 581.182 $ per worker, respectively.Hours of overtime, allowed during the period, are 60 hours per period .
The authors select HS because it provides better results than standard SA in terms of costs especially in the second objective  2 , while HS gives slower runtime than standard SA.After we used the MSA to solve the case study, it is clear from the results that the proposed MSA was effective and faster than the standard SA and HS as shown in Table 4.
Due to the fact that MSA provided better results than the SA and HS in terms of cost and time, consequently, MSA was used to solve the model in the company as it is shown in Tables 5-7.
Tables 5 and 6 contain the amount of the production yield and inventory levels, respectively, to fulfill the forecast  number of regular workers that should be hired during that period.Also, number 0 refers to the fact that the company does not need to hire any worker in that period.In addition, the result (  = 1400) represents the number of workers that should be fired from the factory, while number 31079 refers to the hours of overtime that should be adopted in that period.

Simulation.
Simulation is another criterion for analysing the effectiveness of the proposed modified SA.During simulation, based on the same preliminary data set for the case study, the algorithm was used to resolve various problems.
To compare the performances of these algorithms, SA, MSA, and HS, 9 cases of problems have been used depending on regular working hours (  ), overtime hours (  ), and different number of products and periods.The algorithms have been implemented 1000 times for every problem.The average time and the total costs for each objective of MSA, SA, and HS are depicted in Table 8.According to this table, the MSA provided better results by minimizing the objective function through utilising a different number of products and period.Besides that, we changed the regular   and   to enlarge and change our problem, where  and  represent the product number and period number, respectively, while minimizing production costs and minimizing the workforce costs are represented by  1 and  2 , respectively.
From Figure 4, we can see that it is evident that the modified algorithm is superior even for complex and large problems in minimizing the total cost of production and workforce levels.As illustrated in Figure 5, the quality of solutions obtained by MSA is better in runtime than SA and HS.

Conclusion
Simulated annealing provides a mechanism to escape local optima by allowing hill-climbing moves in hopes of finding  a global optimum.However, it has a disadvantage which is the imperfections ability and unacceptable performance, especially a large constrained APP issue.Therefore, this algorithm works sequentially that the current solution will generate only one solution.To improve its performance and lessen its insufficiencies to problem-solving, a modified SA (MSA) is introduced that will expand the search space by generating  + 1 solutions to create as many numbers as possible of the neighbour states.The study effectively explains the applicability of the MSA algorithm in solving the APP problem in industries.The results indicated that the use of the modified SA resolved numerous problems, including the complex and large ones.

Figure 5 :
Figure 5: Comparison time running for each algorithm.

Table 1 :
Production and inventory costs in dollars.

Table 2 :
Hours required to produce one ton of product.

Table 3 :
Forecast demand for all products.

Table 4 :
Results for each algorithm.

Table 7 :
The rate of workforce level.Table7shows the results in the first column which represent the first period.Number 1915 explains the

Table 8 :
Optimal costs and time for each problem when   = 160,   = 100 hours, respectively.