View More View Less
  • 1 Self-Employed IT Engineer and Software Developer, Budapest, H-1158, Hungary
  • | 2 Institute of Energy and Chemical Machinery, Faculty of Mechanical Engineering and Informatics, University of Miskolc, H-3515 Miskolc, Egyetemváros, Hungary
Open access

Abstract

In the research projects and industrial projects severe optimization problems can be met, where the number of variables is high, there are a lot of constraints, and they are highly nonlinear and mostly discrete issues, where the running time can be calculated sometimes in weeks with the usual optimization methods on an average computer. In most cases in the logistics industry, the most robust constraint is the time. The optimizations are running on a typical office configuration, and the company accepts the suboptimal solution what the optimization method gives within the appropriate time limit. That is, why adaptivity is needed. The adaptivity of the optimization technique includes parameters of fine-tuning. On this way, the most sensitive setting can be found. In this article, some additional adaptive methods for logistic problems have been investigated to increase the effectivity, improve the solution in a strict time condition.

Abstract

In the research projects and industrial projects severe optimization problems can be met, where the number of variables is high, there are a lot of constraints, and they are highly nonlinear and mostly discrete issues, where the running time can be calculated sometimes in weeks with the usual optimization methods on an average computer. In most cases in the logistics industry, the most robust constraint is the time. The optimizations are running on a typical office configuration, and the company accepts the suboptimal solution what the optimization method gives within the appropriate time limit. That is, why adaptivity is needed. The adaptivity of the optimization technique includes parameters of fine-tuning. On this way, the most sensitive setting can be found. In this article, some additional adaptive methods for logistic problems have been investigated to increase the effectivity, improve the solution in a strict time condition.

1 Introduction

In research works, logistic problems are solved many times, which are not only nonlinear, but discrete, some are non-continuous, and cannot be represented in diagrams, only with matrix forms. In one of previous research, the problem of adaptive optimization has been employed using evolutionary programming in the optimization of large-scale maintenance systems [1]. If the optimization problem is complex, it is hard to find the global minimum or maximum [2, 3]. In this paper, the firefly algorithm has been applied to a logistic problem with a large variable count. The firefly algorithm is a swarm-based heuristic algorithm presented by Xin-She Yang [4], inspired by the mating behavior of fireflies. The firefly algorithm based on three rules:

  • All fireflies are attracted by each other;
  • Attractiveness is proportioned by brightness, the less brilliant move towards the brighter one;
  • If there is no more luminous firefly than the selected one, that will move randomly in the state space.

The algorithm is shown in Code 1.

Code 1. Pseudo-code of the firefly algorithm, (on the basis of [4])

The firefly algorithm has several control parameters, for example, the absorption coefficient, the randomization control factor, and the firefly population size. The values of these control parameters significantly affect the quality of the achieved solution and the efficiency of the algorithm. It is a problem depends on selecting suitable control parameters for the actual algorithm. Hard to deal with complex issues with many local optima where the most algorithms are trapped. Although it is highly important, there is no consistent methodology for determining the control parameters of the applied firefly algorithm variant. Mostly, the settings are fixed throughout many experiments or set arbitrarily within some predefined ranges [5].

2 The problem

The problem to be optimized is a supply chain optimization problem based on the olive oil production by the company Tariş in Turkey described in [6]. The whole problem cannot be described within the framework of this article, so the core function (1) is needed to be optimized here. The main objective function is the profit maximization, as in many other cases:
F(Xi)=i=1Ik=1K(picik)Yiki=1I(oc·oilipci)Xit·toil,
where pi is the product price; cik is the transportation cost; Yik is the produced quantity; oc is the oil cost (1 L); oili is the required oil quantity; pci is the packaging cost; X is the total produced quantity of the given packaging unit; t × toil is the transportation cost of the oil used; and the constraints are:
Xik=1KYiki,
i=1IoiliXitotaloil,
Yikdiki,k,
XiZi,
YikZi,k.

The total produced quantity must less than the entire amount required (1); the oil used must less than the total oil available (2); the amount provided for each region must be less than the required quantity of the given region (3); and the variables must be integers (5), (6).

In the model 10 packaging units (p), and 13 regions (r) have been used, so the matrix (Y) to be optimized, which is the produced quantity matrix, will contain 130 variables.

3 Distance and movement

In the research, the swarm methods like the Particle Swarm Optimization (PSO) [7] and the Firefly Algorithm (FA) [8] are very often used; both of them are common and widely used to solve a wide range of problems. However, until now they were not used for a large number of variables. The firefly algorithm is working well with various test functions, a lot of general problems [9], but how it performs on a large variable count problem.

The first problem was the discrete nature of the problem. The original firefly algorithm was developed to optimize continuous problems and not just continuous problems, but problems where the directions have meaning, so the moving toward have meant so that the fireflies can move toward each other. Thus, the first task was to define the distance of the fireflies and define the movement function. In some articles, they followed that way [10, 11]. The distance of two fireflies (F1, F2) is:
dst(F1,F2)=i=1..pj=1..rAbs(yikF1yikF2),
where F1 and F2 are the two fireflies whose distance we want to define; yik is the decision variable the manufactured quantity of the packaging unit i in the region k.

The movement function is:

move toward(F1,F2):yikF1=yikF1+β·(yikF1yikF2)+α·rnd0.5
executed on every matrix element, where β=eγr, gamma was set to 1; α = range 0.05 randomization component where the range is the range of interpretation, in this case, it was a set to 30,000 as the upper limit of the decision variables.
When there is no brighter firefly the firefly moves randomly:
moverandom(F1)yikF1=yikF1+rnd(±50).

First, the random movement parameter has been fixed, which was selected by guesswork; the firefly count was 5. All runs were done in an average office computer, a 1st generation Intel Core I7-870 processor, 6 GB RAM, the algorithm was programmed in C# .NET and all the test runs were limited 10 min.

The first run, with the usual parameters, as mentioned in the literature [6], gave the following result.

Figure 1 shows the convergence of the solution. In the figure, it is visible when the algorithm jumps out in a local optimum, and the function does not start to flatten during the limited 10 min of the run. The best fitness value was: 11579252.39.

Fig. 1.
Fig. 1.

The target function, firefly algorithm first run without any adjustment

Citation: Pollack Periodica Pollack 16, 1; 10.1556/606.2020.00180

4 Modified random movement with self-adaptive values

The random movement function (9) moves that firefly, which is not moved in the actual iteration because there was no brightest firefly than him. Several parameters have been tried instead of the first guess ±50 value in the random movement function; the increase was slight. Then a proportional equation has been used where the random movement is proportional to the actual value therefore, the random movement will adapt to the scale of the actual problem.

The proportional value equation is the following:
moverandom(F1)yikF1=yikF1+rnd(yikF1/n)rnd(yikF1/n).

The algorithm was run at different proportional values (n) (Table 1). These values show that the target function value is not improved after it reached the 25,000 dividers, because the highest value of the product matrix is about 30,000 so the 25,000 and the 50,000 gives the same random movement value of 1. This modified firefly algorithm with this method of here its brightness improves. So, we generate N random movement variants and choose the best solution; if the solution improves the solution, the firefly will move in that direction, if not, it will stay there. In this case, this firefly program acts as an elitist entity algorithm, because its value does not change; it will go unmodified to the next generation of the fireflies. Several proportional numbers have been tried: the 5, 10, 50, 100, 500 and 1,000 random solutions and selected the best; which has the minimum value of the objective function. Do not forget that the running time is limited, so higher cycle number (N) results in a lower iteration count. Experimental runs have been carried out for all proportional values.

Table 1.

Proportional values at random movement

Proportional to the actual valueTarget function
±yikF18862235.24
±yikF1/210661050.00
±yikF1/510310898.52
±yikF1/1010167617.44
±yikF1/5011074974.70
±yikF1/10011546460.71
±yikF1/50011618969.21
±yikF1/100011470180.17
±yikF1/500011518200.56
±yikF1/1000011600611.80
±yikF1/2500011621109.67
±yikF1/5000011621109.67

The results (Table 2) show that the modified random movement improved the solution in every case. The higher randomization values were better to avoid the local optima or jump out if stuck in a local optimum, but it cannot be too big, because it moves in the state space too far. The best solution was at ±yikF1/100 and N = 500, but a lot of other values are close to this solution. This method also greatly improved the convergence (Fig. 2); the difference can be noticed compared to Fig. 1.

Table 2.

Modified random movement with proportional movement (best values are marked)

N±yikF1±yikF1/2±yikF1/5±yikF1/10
511658592.0711819534.4611826480.5711901170.66
1011708473.5511850753.7911922270.7511933058.08
5011747862.5811811321.5411804486.6411968312.55
10011706481.2911832501.8911933977.4111968701.49
50011898168.5811777553.5812069210.9111971114.62
1,00011744732.5911887363.7611971260.7211953844.37
N±yikF1/50±yikF1/100±yikF1/500±yikF1/1000
511730555.3811652020.711610061.011612635.3
1012028420.9211831095.411512298.011433305.7
5011831781.9311902323.211730092.111542878.0
10011874872.3911919576.211766607.411607951.0
50012060338.9212120813.711683133.611571373.9
1,00012049089.4112063160.511721536.011682845.1
N±yikF1/5000±yikF1/10000±yikF1/25000
511230433.211498258.511709050.3
1011682722.311607271.811594346.8
5011639638.011524683.711567352.8
10011547163.811490801.811607922.2
50011554956.311287234.811324414.3
1,00011370669.211075469.711280026.5
Fig. 2.
Fig. 2.

Modified random movement improved the convergence

Citation: Pollack Periodica Pollack 16, 1; 10.1556/606.2020.00180

5 Adaptive firefly count

Another critical parameter of the algorithm is the firefly count, which is constant in standard algorithms. The main idea was to improve the search power of the algorithm when the convergence was starting to flatten. So, it was decided to use a simple adaptive method to increase the firefly count. If there is no increase in the global optimum, then the algorithm adds new random initialized fireflies to the state space, Code 2.

Code 2. A simple adaptive method

This improved method has been tested with N = 1, 5, 10 new additional fireflies combined with the self-adaptive random movement method. Table 3 shows the solution. The improvement percentage based on Table 2 improved values with modified random movement and the firefly count at the end of the limited run. According to the results, there is a slight improvement in the results using this method, but at two values/5 and/5,000, there are some minor negative values where the improved method failed. The additional firefly count is a good indicator of the continuous convergence. If it is small it shows that the result gets better and better in every iteration, like at the /5,000 case where the result is worse than the other values, but the firefly count is smaller, so the function has a slow but continuous convergence in the calculated time window.

Table 3.

Improvement on the initial solution with adaptive firefly count

N±yikF1±yikF1/2±yikF1/5±yikF1/10
N = 112070827.2212122923.3812125154.0112144917.07
Imp.1.43%1.94%−0.16%0.88%
FF count442450451419
N = 512051943.0512098366.6612087990.3812108718.04
Imp.1.28%1.74%−0.47%0.58%
FF count905.00895.00870.00855.00
N = 1012084262.6012095241.0612129499.7512111717.77
Imp.1.54%1.72%−0.12%0.60%
FF count1145.001165.001135.001095.00
N±yikF1/50±yikF1/100±yikF1/500±yikF1/1000
N = 112134597.0612142955.412010016.111978007.0
Imp.0.94%1.38%2.03%2.46%
FF count3012746149
N = 512118359.6212093069.912073598.612073523.3
Imp.0.80%0.98%2.54%3.24%
FF count780.00735.00305.00925.00
N = 1012124155.7812083340.912101332.112106607.0
Imp.0.85%0.90%2.77%3.50%
FF count1065.001065.00780.00565.00
N±yikF1/5000±yikF1/10000±yikF1/25000
N = 111300520.011830410.112082614.0
Imp.−3.38%1.89%3.09%
FF count624457
N = 511579538.611970996.812113865.7
Imp.−0.89%3.04%3.34%
FF count10.0045.00905.00
N = 1011859666.812044566.412085391.3
Imp.1.49%3.63%3.11%
FF count35.00375.001145.00

6 Conclusions

In this article, some improvement methods have been shown, which have been extensively tested on a large-scale logistic problem, and the combination of these methods has been checked. In discrete logistic problems, where lots of decision variables exist, it is essential to determine the distance metric and the movement function or functions. However, these functions are not precisely specified when to use them and the use of which one from the available variety is appropriate, usually the most straightforward and fastest functions have been used. Several distance metrics can be used, and the movement in most cases in huge state space has to be defined by one or occasionally more matrices, which makes the task even more complicated. These choices can significantly affect the quality of the solution. Because heuristics are used, it is not sure, if the global optimum reached or not and whether the selected movement function for the actual problem is useful or not. The applied improvement methods can help, whether the firefly algorithm or other heuristic methods have been used, and their combination also can be used. Still, it needs serious testing, to determine which helps a lot, and which improves a little and which method did not work in this case.

Acknowledgements

The research was partially supported by the Hungarian National Research, Development and Innovation Office – NKFIH − under the project number K 134358.

References

  • [1]

    L. Kota and K. Jármai, “Adaptive methods in the optimization of large scale technical inspection and maintenance systems,” in XXVII. MicroCAD International Scientific Conference, Material Flow Systems . Logistical Information Technology and Technical Language, Miskolc, Hungary, Mar. 21–22, 2013, 2013, Paper no. J17.

    • Search Google Scholar
    • Export Citation
  • [2]

    M. Petrik, G. Szepesi, and K. Jármai, “CFD analysis and heat transfer characteristics of finned tube heat exchangers,” Pollack Period., vol. 14, no. 3, pp. 165176, 2019.

    • Crossref
    • Search Google Scholar
    • Export Citation
  • [3]

    H. N. Ghafil and K. Jármai, “Kinematic-based structural optimization of robots,” Pollack Period., vol. 14, no. 3, pp. 213222, 2019.

  • [4]

    X. S. Yang, Nature-inspired Metaheuristic Algorithms. Luniver Press, 2008.

  • [5]

    N. J. Cheung, X. M. Ding, and H. B. Shen, “Adaptive firefly algorithm: Parameter analysis and its application,” PloS One, vol. 9, no. 11, Paper no. e112634, 2014.

    • Crossref
    • Search Google Scholar
    • Export Citation
  • [6]

    O. Yurt, L. Kota, K. Jármai, and E. Aglamaz, “Analysis and optimization of an olive oil supply chain: A case from Turkey,” Int. J. Sustain. Agric. Manage. Inform., vol. 5, no. 1, pp. 5979, 2019.

    • Search Google Scholar
    • Export Citation
  • [7]

    H. N. Ghafil and K. Jármai, “Comparative study of particle swarm optimization and artificial bee colony algorithms,” in XXXII. MicroCAD International Multidisciplinary Scientific Conference, Miskolc, Hungary, Sep. 5–6, 2018, 2018, Paper no. D1.

    • Search Google Scholar
    • Export Citation
  • [8]

    L. Kota, “Optimization of the supplier selection problem using discrete firefly algorithm,” Adv. Logistic Syst., vol. 6, no. 1, pp. 117126, 2012.

    • Search Google Scholar
    • Export Citation
  • [9]

    L. Kota and K. Jármai, “Discretization of the firefly algorithm for the travelling salesman problem,” in 28th MicroCAD International Multidisciplinary Scientific Conference, University of Miskolc, Apr. 10–11, 2014, 2014, Paper no. D30.

    • Search Google Scholar
    • Export Citation
  • [10]

    S. L. Tilahun and H. C. Ong, “Modified firefly algorithm,” J. Appl. Math., vol. 2012, Paper no. 467631, pp. 112, 2012.

  • [11]

    S. Yu, S. Yang, and S. Su, “Self-adaptive step firefly algorithm,” J. Appl. Math., vol. 2013, Article no. ID 832718, pp. 18, 2013.

    • Search Google Scholar
    • Export Citation
  • [1]

    L. Kota and K. Jármai, “Adaptive methods in the optimization of large scale technical inspection and maintenance systems,” in XXVII. MicroCAD International Scientific Conference, Material Flow Systems . Logistical Information Technology and Technical Language, Miskolc, Hungary, Mar. 21–22, 2013, 2013, Paper no. J17.

    • Search Google Scholar
    • Export Citation
  • [2]

    M. Petrik, G. Szepesi, and K. Jármai, “CFD analysis and heat transfer characteristics of finned tube heat exchangers,” Pollack Period., vol. 14, no. 3, pp. 165176, 2019.

    • Crossref
    • Search Google Scholar
    • Export Citation
  • [3]

    H. N. Ghafil and K. Jármai, “Kinematic-based structural optimization of robots,” Pollack Period., vol. 14, no. 3, pp. 213222, 2019.

  • [4]

    X. S. Yang, Nature-inspired Metaheuristic Algorithms. Luniver Press, 2008.

  • [5]

    N. J. Cheung, X. M. Ding, and H. B. Shen, “Adaptive firefly algorithm: Parameter analysis and its application,” PloS One, vol. 9, no. 11, Paper no. e112634, 2014.

    • Crossref
    • Search Google Scholar
    • Export Citation
  • [6]

    O. Yurt, L. Kota, K. Jármai, and E. Aglamaz, “Analysis and optimization of an olive oil supply chain: A case from Turkey,” Int. J. Sustain. Agric. Manage. Inform., vol. 5, no. 1, pp. 5979, 2019.

    • Search Google Scholar
    • Export Citation
  • [7]

    H. N. Ghafil and K. Jármai, “Comparative study of particle swarm optimization and artificial bee colony algorithms,” in XXXII. MicroCAD International Multidisciplinary Scientific Conference, Miskolc, Hungary, Sep. 5–6, 2018, 2018, Paper no. D1.

    • Search Google Scholar
    • Export Citation
  • [8]

    L. Kota, “Optimization of the supplier selection problem using discrete firefly algorithm,” Adv. Logistic Syst., vol. 6, no. 1, pp. 117126, 2012.

    • Search Google Scholar
    • Export Citation
  • [9]

    L. Kota and K. Jármai, “Discretization of the firefly algorithm for the travelling salesman problem,” in 28th MicroCAD International Multidisciplinary Scientific Conference, University of Miskolc, Apr. 10–11, 2014, 2014, Paper no. D30.

    • Search Google Scholar
    • Export Citation
  • [10]

    S. L. Tilahun and H. C. Ong, “Modified firefly algorithm,” J. Appl. Math., vol. 2012, Paper no. 467631, pp. 112, 2012.

  • [11]

    S. Yu, S. Yang, and S. Su, “Self-adaptive step firefly algorithm,” J. Appl. Math., vol. 2013, Article no. ID 832718, pp. 18, 2013.

    • Search Google Scholar
    • Export Citation
All Time Past Year Past 30 Days
Abstract Views 0 0 0
Full Text Views 55 55 33
PDF Downloads 35 35 23