im Journal of JET v°iume 9 (2016) p.p. 35-42 Issue 4, December 2016 Type of article 1.01 Technology www.fe.um.si/en/jet.html THE APPLICATION OF FUZZY LINEAR PROGRAMMING METHODS IN ENERGY PLANNING UPORABA METOD MEHKEGA LINEARNEGA PROGRAMIRANJA V ENERGETSKEM NAČRTOVANJU Maja RepnikR Keywords: fuzzy linear programming, fuzzy constraints, fuzzy numbers, energy planning, R package FuzzyLP. Abstract Very frequently some of the parameters of certain optimization problems solvable by linear programing cannot be precisely determined. In this case, fuzzy linear programming techniques can be used. In the relevant literature, there are many real-world problems solved by fuzzy linear programming methods, but they are scarce in the field of energy technology. The main reason for that might be the lack of effective software for solving fuzzy linear programming problems. In 2015, researchers developed the R package FuzzyLP, software for public use, which solves fuzzy linear programming problems directly. The potential that real world problems from different fields, including energy planning, can be solved using fuzzy linear programming methods by researchers who do not necessarily have knowledge of fuzzy linear programming can be seen. . To illustrate its application, we solve two small examples using the fuzzy linear programming methods and compare them with a case in which all parameters are precisely defined. R Corresponding author: Maja Repnik, University of Maribor, Faculty of Energy Technology, Tel.: +386 7 620 2219, Mailing address: Hočevarjev trg 1, 8270 Krško, Slovenia, E-mail address: maja.repnik@um.si JET 35 Maja Repnik JET Vol. 9 (2016) Issue 4 Povzetek V optimizacijskih problemih, ki jih rešujemo z uporabo linearnega programiranja, se pogosto zgodi, da nekaterih koeficientov ne moremo natančno določiti. V tem primeru lahko uporabimo mehko linearno programiranje. V literaturi najdemo veliko problemov iz resničnega življenja, ki so rešeni z uporabo mehkega linearnega programiranja, a na področju energetike so le redki. Glavni razlog za to je najbrž pomanjkanje učinkovite programske opreme. Raziskovalci so leta 2015 razvili R paket FuzzyLP, ki je program, dostopen javnosti in ki direktno rešuje probleme mehkega linearnega programiranja. S tem je področje dobilo potencial, da bi raziskovalci z različnih področij, vključno z energetskim načrtovanjem, ki nimajo nujno znanja iz mehkega linearnega programiranja, začeli uporabljati mehko linearno programiranje za reševanje problemov. Uporabo smo ponazorili z dvema manjšima zgledoma, ki smo ju rešili s pomočjo treh metod za reševanje problemov mehkega linearnega programiranja. Za primerjavo smo najprej rešili primer linearnega programa, kjer so vsi koeficienti natančno določeni. 1 INTRODUCTION Linear programming (LP) is one of the most frequently used techniques in operations research. In real world problems, some parameters of LP frequently cannot be precisely determined. We can model imprecise parameters using fuzzy sets, which were introduced by Lotfi A. Zadeh in [8]. Zimmermann then proposed the formulation of fuzzy linear programming (FLP) problems in [9]. Since then, researchers have developed a relatively large number of different methods to solve FLP problems. A general model of an LP problem can be written as maximize cx subject to Ax < b x > 0. If some of the coefficients (c,A,b) cannot be precisely defined we can treat them as fuzzy numbers (notation for fuzzy number a is a) and call this LP problem the FLP problem. Based on the place where fuzzy numbers appear, we can divide FLP problems into four main categories: • FLP with fuzzy resources (b); • FLP with fuzzy coefficients in objective function (£); • FLP with fuzzy technological coefficients (3y); • FLP with fuzzy variables (x). By combining these four categories, we obtain many different types of FLP problems, each of which is solvable with a different method. Authors use different indices to compare fuzzy numbers in their methods, accompanied by different shapes of fuzzy numbers, different computational methods, etc. In light of all these issues, it is easy to understand that there are a plethora of different methods to solve FLP problems. Around 50 methods have been analysed, and a basis for a taxonomy of FLP methods has been published in [3]. 36 JET The application of fuzzy linear programming methods in energy planning 2 ENERGY MODELS USING FLP Although researchers have used FLP methods to solve problems in various fields, there are only a few examples of this in the field of energy technology (e.g. [4], [7]). In [5], Sadeghi and Hosseini outlined that FLP is an effective approach that has not been attended extensively in energy planning field up to now. They stated the main obstacles in confronting the FLP approach, including unfamiliarity, a lack of favour in academic circles, and a lack of effective and comprehensive software. They wanted to overcome the lack of software with a fuzzy version of GAMS, a popular algebraic modelling language for crisp mathematical programming. However, the idea was only briefly outlined, and no further development has been done. 3 SOFTWARE FOR SOLVING FLP PROBLEMS Most researchers illustrate new methods on small examples that can be solved without any software. Other researchers who want to solve real-world problems with the FLP method, firstly defuzzify the FLP problem, by converting it to a crisp optimization problem, which can be easily solved with existing software. They convert FLP to an LP, parametric LP, multi-objective linear programming problem, non-linear programming problem or semi-infinite LP. In 2015, researchers at the University of Granada presented an open-source R package named FuzzyLP, [2], to deal with fuzzy constraints, fuzzy costs and fuzzy coefficients in linear programming. R package FuzzyLP is the only software written in modern language developed for public use that solves FLP problems directly. The package can be freely downloaded, employed, and extended by any R user. The authors hope their work will contribute to further software developments to make fuzzy mathematical programming models available for researchers and practitioners from other areas, spreading this methodology beyond the fuzzy community. 4 EXAMPLES Let us demonstrate the use of some FLP methods on small examples. In Example 1, borrowed from [6], we solve a conventional LP problem, and the solution is compared with solutions of Example 2 and Example 3, which are FLP problems. Example 1 Electricity is produced at a small thermal plant with the use of system turbine/generator. The turbine is rotating with the help of 3.2 kg/s water steam. The owner can sell - electricity at 0.03 EUR per kWh; - High-pressure technical steam (x1) at price 1.65 EUR per tonne; - Low-pressure steam for central heating (x2) at 1.10 EUR per tonne. Customers are interested in unlimited quantities of electrical power, but for the amount of steam they have the following limitation: 4x1 + 3x2 < 9.6. Generator power (in kW) depends on the flux of steam (in kg/s) through the parts of the turbine (I, II and III): JET 37 Maja Repnik JET Vol. 9 (2016) Issue 4 P, = 48 m, Pu = 56 m„ Pln = 80 mm . To prevent the low-pressure part of the turbine from being overheated there must be a flux of steam through part III of at least 0.6 kg/s. To prevent unequal overload of a turbine shaft for x1 = 0 kg/s it is permitted x2 = 1.8 kg/s, but by increasing the use of steam x1 for every kg/s decreases the use of steam x2 for 0.25 kg/s. Set the optimal production. First, we need to find an objective function that evaluates the income of a thermal plant. Faced with the need to make some calculations, which are basic in linear programming, to construct objective functions, we obtain the results that income from sold electricity to be 17.66 — 4.08x1 — 2.40x2, income from high pressure steam to be 1.65 • 3.6 x1 and income from low pressure steam to be 1.10 • 3.6 x2. This implies that we have to maximize function z = 17.66 — 4.08x1 — 2.40x2 + 1.65 • 3.6 x1 + 1.10 • 3.6 x2, when variables x1 and x2 satisfy the described conditions. To set the optimal production we need to solve the following linear programming problem: maxz = 1.86x1 + 1.56 x2 subject to x1+x2<2.6 x1 + 4x2 < 7.2 (4.1) 4x1 + 3x2 < 9.6 x1,x2 > 0. The solution of (4.1) can easily be obtained, and it is x1 = 1.8, x2 = 0.8 and zmax = 4.6. That implies that for optimal production they should sell 1.8 kg/s high pressure technical steam and 0.8 kg/s low pressure steam for central heating. The rest of the steam would be used for electricity production. The income would be €22.26 per hour. Example 2 Suppose we have the same thermal plant as in Example 1, but the price of high-pressure technical steam (x1) and the price of low pressure steam for central heating (x2) cannot be predicted in advance. They can predict that the price for high pressure technical steam (x1) would be around €1.65 per tonne, in worst case can be only €1.30 per tonne and the price can also rise to €1.70 per tonne. This suggests that we can treat the price of high pressure technical steam as a fuzzy number. There are many different shapes of fuzzy numbers described in the literature (linear, exponential, Gaussian, etc.) but the most frequently used shape of the membership function is linear, which defines triangular and trapezoidal fuzzy numbers. The price for high pressure technical steam as a triangular fuzzy number (c^) can be presented with the membership function in Figure 1 38 JET The application of fuzzy linear programming methods in energy planning Figure 1: Membership function of fuzzy number c1 and can be written as c1 = (1.3,1.65,1.7). Moreover, the price for low pressure steam for central heating can be treated as a triangular fuzzy number, for example c2 = (0.95,1.10,1.14). We need to maximize the function: z = 17.66 - 4.08x1 - 2.40x2 + (1.3,1.65,1.7) • 3.6 x1 + (0.95,1.10,1.14) • 3.6 x2 equals to z = 17.66 + (0.6,1.86,2.04)x1 + (1.02,1.56,1.7)x2. Now, the problem (4.1) becomes an FLP problem with fuzzy parameters in the objective function: maxz = (0.6,1.86,2.04)^ + (1.02,1.56,1.7)x2 subject to x1 + x2 < 2.6 + 4X2 < 7.2 (4.2) 4x1 + 3X2 < 9.6 x1,x2 > 0. There are many different methods described in the literature that can be used to solve problem (4.2). In the FuzzyLP package, we can choose from among five different functions that solve FLP problem with fuzzy parameters in objective function. Here Delgado's approach, [1], is used, which in package FuzzyLP with function FOLP.multiObj is implemented. We use the following code: obj <- c(TrapezoidalFuzzyNumber(0.6,1.86,1.86,2.04), TrapezoidalFuzzyNumber(1.02,1.56,1.56,1.7)) A<-matrix(c(1, 1, 4, 1, 4, 3), nrow = 3) dir <- c("<=", "<=","<=") b <- c(2.6, 7.2, 9.6) max <- TRUE sal<-FOLP.multiObj(obj, A, dir, b, maximum = max, min=0, max=1, step=0.1) sal sal[,"objective"] and the solution: alpha x1 x2 objective [1,] 0 1.8 0.8 ? JET 39 Maja Repnik JET Vol. 9 (2016) Issue 4 [2,] 0. 1 1. 8 0. 8 [3,] 0. 2 1. 8 0. 8 [4,] 0. 3 1. 8 0. 8 [5,] 0. 4 1. 8 0. 8 [6,] 0. 5 1. 8 0. 8 [7,] 0. 6 1. 8 0. 8 [8,] 0. 7 1. 8 0. 8 [9,] 0. 8 1. 8 0. 8 [10,] 0. 9 1. 066667 1. 533333 [11,] 1 1. 066667 1. 533333 [[1]] Trapezoidal fuzzy number with: support=[1.896,5.032], core=[4.596,4.596]. ... output omitted for list elements 2 to 10. [[11]] Trapezoidal fuzzy number with: support=[2.204,4.78267], core=[4.376,4.376]. To understand the solution, we need to explain what alpha a represents. If we denote ju(C) = inf fe.(x), where are membership functions off fuzzy parameters ct for all j in objective i ' ' function of FLP (4.2), then i«(C) >l-a is one of the conditions in defuzzified FLP (4.2). The lower value of a leads to a higher expectation that the value of Cj will be very close to its core. From the solution report, we can see that for a < 0.8 the solution of FLP is the same as in a crisp case (Example 1). In contrast, the optimal solution changes for a >0.9. Optimal value (objective) is a fuzzy number, which is here presented by its core and support. We observe that optimal value for a >0.9 has broader support and a smaller core than optimal value for a < 0.8. This suggests that a very pessimistic decision maker should decide to implement the solution that we obtained for a > 0.9. The core of income will be a bit lower than for solution xi = 1.8, x2 = 0.8, but the risk will also be lower. Example 3 Now let us assume that in the thermal plant from Example 1 the condition of the flux of steam through Part III can be violated. It should be at least 0.6 kg/s, but in favour of better income they permit violation up to 0.1 kg/s. They want low violation of constraint and at the same time high profit. So we need to find compromise. Crisp value b1 = 2.6 becomes fuzzy number b1 with linear membership function in Figure 2. 40 JET 1 2.62.7 Figure 2: Membership function of fuzzy number bi The application of fuzzy linear programming methods in energy planning To solve this problem, we need to solve the following FLP problem with fuzzy resources: maxz = 1.86% + 1.56 x2 subject to + <2.6 + (1-0)-0.1 x1 + 4x2 < 7.2 (4.3) 4x1 + 3x2 < 9.6 x1,x2 > 0. Researchers have proposed many different methods for solving problem (4.3). Six of them are implemented in the FuzzyLP package. First, let us use Verdegay's approach that yields parametric solution. The code obj <- c(1.86, 1.56) A<-matrix(c(1, 1, 4, 1, 4, 3), nrow = 3) dir <- c("<=", "<=","<=") b <- c(2.6, 7.2, 9.6) t <- c(0.1, 0, 0) max <- TRUE FCLP.sampledBeta(obj, A, dir, b, t, min = 0, max = 1, step = 0.2) yields solution beta x1 x2 objective [1,] 0.0 1.50 1.20 4.6620 [2,] 0.2 1.56 1.12 4.6488 [3,] 0.4 1.62 1.04 4.6356 [4,] 0.6 1.68 0.96 4.6224 [5,] 0.8 1.74 0.88 4.6092 [6,] 1.0 1.80 0.80 4.5960 For each p that sets violation, we calculated the optimal solution and optimal value (objective). Now, the decision maker can decide what violation to permit (smaller p higher violation and better optimal value). If the decision maker cannot decide on one solution, Zimmerman and Werners proposed compromise. This can be calculated with the code FCLP.fuzzyUndefinedObjective(obj, A, dir, b, t, maximum=max, verbose = TRUE) which yields solution beta x1 x2 objective [1,] 0.5 1.65 1 4.629 JET 41 Maja Repnik JET Vol. 9 (2016)) Issue 4 The best compromise between violation and optimal value is then achieved for ¡3 = 0.5, so the flux of steam through the part III would be at least 0.55kg/s and then the income of the plant would be €22.29 per hour. 5 CONCLUSION In the field of energy technology, there only a few problems are solved by fuzzy linear programming methods. But one of the main reasons for that, lack of effective software, can now be eliminated. With the use of R packet FuzzyLP, problems of bigger dimensions can also be solved, and the user does not need to have knowledge of fuzzy linear programming. In this paper, we demonstrated the application of fuzzy linear programming methods in an optimization problem of a small thermal plant to encourage other researchers and practitioners to use fuzzy linear programming methods to solve the real world problems that they are dealing with. References [1] M. Delgado, J. Verdegay, and M. Vila; Imprecise costs in mathematical programming Problems, Control and Cybernetics, 16(2):113-121, 1987 [2] C. A. Rabelo; FuzzyLP; Fuzzy Linear Programming, R package version 0.1-3, 2015 [3] M. Repnik and D. Bokal; A basis for taxonomy of fuzzy linear programming Methods, In 13th International Symposium on Operational Research in Slovenia, Bled, Slovenia, September 23-25, 2015. ZADNIK STIRN, Lidija (ur.), et al. SOR '15 proceedings, pages 188-192. Ljubljana: Slovenian Society Informatika, Section for Operational Research, 2015 [4] M. Sadeghi and H. M. Hosseini: Energy supply planning in Iran by using fuzzy linear programming approach (regarding uncertainties of investment costs), Energy policy, 34(9):993-1003, 2006 [5] M. Sadeghi and H. M. Hosseini; Evaluation of fuzzy linear programming application in energy models, International Journal of Energy Optimization and Engineering (IJEOE), 2(1):50-59, 2013 [6] W. F. Stoecker: Design of thermal systems, New York: McGraw Hill Book Company, 1980 [7] K. Tomsovic: A fuzzy linear programming approach to the reactive power/voltage control problem, Power Systems, IEEE Transactions on, 7(1):287-293, 1992 [8] L. A. Zadeh: Fuzzy sets, Information and control, 8(3):338-353, 1965 [9] H.-J. Zimmermann: Fuzzy programming and linear programming with several objective functions, Fuzzy sets and systems, 1(1):45-55, 1978 42 JET