COMPUTER PROGRAM FOR DETERMINING AN OPTIMUM SOLUTION IN LONG-TERM FOREST EXPLOITATION PROCESS INFORMATICA 4/1988 UDK 519.854/.857 Janez Barle, Janez Grad Ekonomska fakulteta Borisa Kidriča, Ljubljana One can define the long-term forest exploitation process in different ways. Methods of operations research can be used successfully for this purpose. A group of experts at the University of Ljub­ ljana, Vugoslavia developed a specific tree-growing function and, based on that, prescribed a set of procedures, relations and states which could represent mathematical model for optimizing the forest exploitation process. The mathod was defined as a descrete dynamic programming process, based upon Bellmanls principle. In this paper we briefly describe the model and computer program prototy- pe for solving it. They both can easily be extended by introducing more complexity into them. The program was written in FORTRAN and tested on DEC-10 computer. 1. INTRODUCTION In the paper we describe a possible usage of dynamic programming, based upon Bellman's principle, in order to obtain the optimum so- lution of a predefined long-term forest explo- itation process. In this pro­ cess measures and activities are introduced at each step within the iterative solution process and their effects on the intermediate results and the final solution are stated in'the form of mathematical relations. The whole forest area which is taken into consideration is divi- ded into a number of homogeneous parts -^ seg- ments. For each of these segments, five special functions are imposed by means of which "we di- rect (guide) the process within a number of time intervals, either years or decades. The functions are: (Fl) the maximum possible tree growth capacity, (F2) exploitation capacity, (F3) the quality of the existing tree speci- mens, (F4) level of administration - čare for improved growing conditiond, and (F5) stage in segment development, based upon the age (oldness) of the tree specimens in it. The functions help to optimize exploitation ende- avours. At each step of the interative soluti­ on process four possible activities can be imposed: (Al) no activity at ali, (A2) exchange of the existing tree specimen with a new one, (A3) rarefying, and (A4) restoration. The ex- ploitation policy is defined by a seguence of chosen activities during the iterative pro­ cess. The stated functions, activities and time intervals are part of the mathematical model and dynamic programming process respec- tively. The problem and the corresponding com­ puter program can be extended by incorporating some sdditional functions and activities. Pro­ gram prototype in FORTRAN was written and tes­ ted on DEC-10 computer at the University of Ljubljana, Yugoslavia. In the paper we also comment the problems which are associated with dynamic programming applied to such type of problem. 2. A PREDEFINED LONG-TERM FOREST EKPLOITATION PROCESS We mean by that a stated seguence of policies and activities that should be pursued in fo­ rest exploitation within a life-time long peri­ od of some tree specimen in order to achieve optimum results in accordance with predefined goals and criterions. The possible and necess- ary actions and the most siuitable time for these actions to be carried out depend on the values of some chosen and defined functions which describe sufficiently the tree-growing process. It is these functions, which must be predefined by a group of experts in forest exploitation process - both practicians and theoricians, by means of which more or less complexity and reality is introduced in the basic model that is to be solved. After seve- ral years of analytic and experimental studies of a group of experts in Ljubljana, Yugoslavia (VADNAL, KOTAR, ZADNIK, STIRN, GAŠPERŠIČ /2/, VADNAL, ZADNIK, STIRN /3/), the following suggestions and basic ideas have been made: (i) The paradigm is bounded both geographicaly and in time. The whole area considered is di- vided into smaller regions which are further partitioned into smaller parts with specific environmental conditions and characteristics. Some parts within different regions can have similar or nearly equal environmental condi­ tions and characteristics. They can or can not be exploited (treated) independently from each other. The area is exploited for a specific number of time periods, measured in years or decedes. (ii) In order to evaluate (quantify) observed characteristics of each part of the forest un- der consideration, time dependant analytical growth functions have been developed: 1) Function of growth Y(t) = a(l - (1+T)e X p(-T)), where T = (2n - 1) t"/(np"), for a > O, p > O, and n > 1. a defines the asymptotic value of Y(t), p is the value of t 40 from where on Y(t)' starts to decline, and n determines the speed of convergence y(t) towa- rds value a. The value of t = t,, when the fo­ rest restoration procedures start can be def- ined by solving the equation l + T + T^-exp(T) =0 which is obtained from the relation t,Y'(t,) = VCt,), or can be stated on the base ot experiences. 2) Function of increase (by growth) y(t) = Y(t)' where y(t2)' = y(p)' = 0. 3) Function of average growth f(t) = Y(t)/t, where f(t,) = y(t-), and therefore t,Y(t,)= Y(t3). -5 J J J 4) Function of uniform growth s(t) = mt, where sCt^) = Vtt^), and s{t3) ' = Y(t3)'. (iii) Five functions have been introduced which describe five possible states of forest exploitation process: 1) The maximum possible tree growth capacity - Fl. Fl is constant during the exploitation process. 2) Exploitation capacity - F2. F2 is a conti- nouous function, where 1 £ F2 £ 10. Its value shows the degree in forest exploita- tion. 3) The quality of the existing tree specimens - F3. This function enables us to make an assess- ment about the quality of the trees and whether to begin the exploitation process of some particular part of the forest or not. The parts are divided into five gualitative groups, 1 £ F3 £ 5. 4) Level of administration - čare for better growing conditions - F 4. The value of F4, where 1 £ F4 £ 5, shows a degree of obstructing influence of unwanted tree species on growth of the wanted ones. 5) The segment development stage - F5, based upon the age (oldness) of the tree speci­ mens in it. Tree species are divided into four stages, accordingly: O < F5 < t. t^ 1 F5 < t^ 4 1 F5 < t 3' and tj _< F5 1^4^ Tree species of different stages differ both in size and quality and can therefore be used for different purposes. (iv) The forest exploitation process is carried out by performing a seguence of prescribed ac- tivities. The seguence order of these activit- ies helps to optimize the process. The follo- wing four activities have been taken into consideration: 1) No activity at ali. - Al. In this čase the forest develops in accor- dence with the laws of nature. The value of F2 changes only within the first two stages of segment development; it is diminished for an empirically defined quantity pr(stage, F2, Al). Similarly, the values of F3 and F4 change within the first three stages of de­ velopment. They too are diminished for some empirically defined guantities pr(stage, F3, where t. indicates the upper time limit of the stated tree growth cycle. t, is defined Al) and pr(stage, F4,A1), respectively. Each time the value of the increment (1 for a year or 10 for a decade) is added to the pre- vious value of F5. At the boundary points this causes a change of the stage of deve­ lopment. 2) Exchange of the existing tree specimen with a new one - A2. We can pursue this activity only within the first two segment development stages. The reason for doing that is the una- dequate existing tree species. The exchange is carried out there - in those parts (seg- ments) where the effects are most visible. A2 exercises the following influence upon F2, ..., F5: Their values are changed only within the first two stages of segment de­ velopment. F2, F3 and F4 are increased by some empirically defined quantities pr(sta­ ge, F2, A2),pr(stage, F3, A2) and pr(stage, F4, A2), respectively, while the value of F5 is reduced to zero and the process starts from the beginning. 3) Rerefying - A3. The activity can only take plače within the first three segment development stages. Wit- hin the first stage it is exercised by cutt- ing dovifn the unwanted species only what helps in guicker growth of the wanted ones. Here the activity imposes additional expenses. Within the second and third stage, in addi- tion to the cutting down of the unwanted species, we also cut down some trees of the wanted species what helps in guicker growth of the most qualita"tive samples. Here the activity brings some profit. Due to A3 the values of F2, F3 and F4 are changed by some empirically obtained guantities pr(stage, F2, A3), pr(stage, F3, A3), and pr(stage, F4,A3), respectively. A3 has no particular impact on F5. The time increment (1 or 10) is added to the value of F5 after the time period ex- pires. 4) Restoration - A4. Restoration starts at t = t3, ends at t = t4, and can take different length of time. It is characterized by wood-cutting on higher scale. After restoration is done, the forest segment under consideration passes over into the first stage. The way in which the stage of restoration is being accomplished has a great influence on the results of the forest explo- itation process. The span of time t^ - t3 is generally divided into more steps. At each step the increments of F2 and F3 are compu- ted and added to the previous values of F2 and F3, respectively. F4 does not change within A4, while the increment 1 (10) is added to F5 after each year (decade) that is passing by. F5 reduces to zero or some higher value after the restoration is over. Ak). Each measure ny step of the exploit- can be expressed in The resulting inco- say I(stage, Ak), s upon Fi, for i = 1, the undertaken acti- can be divided into variable costs as t^ = a/10. (v) The outcomes - R(stage - activity undertaken at a ation process, results and a form of costs and income me of some particular step for k = 1, 2, 3, 4, depend 2, ..., 5, and the size of vity Ak. The entire costs fixed costs FIX(stage) and V(stage, Ak). Accordingly, R(stage, Ak) = I(stage, Ak) -FIX(stage) - - V(stage, Ak) 1) R(stage, Al). In this čase we have no income and no vari­ able costs. Therefore R(stage. Al) = - - FIX(stage) where FIX(stage) is some empirically obtained 41 quantity. 2) R(stage, A2). Activity A2 is carried out only within the first two stages of the exploitation pro- cess. We have some possible income only wit- hin the secohd stage, which can be expressed as qi (stage, A2)Y(t) where q.^(2,A2) is some empirically stated weight (factor), and qi(l, A2) = 0. Fixed costs FIX(stage) are defined (empirically). Variable costs are obtained as a total of the costs of removal the unwanted species, say qc(stage, A2)Y(t), and the costs of plariting new samples, say NT(stage), where g^ and NT are defined empirically. Accordingly, RCstage, A2) = qi(stage, A2)Y(t) - -FIX(stage) - q5.(stage, A2)Y(t) - NT(stage) for stage =1,2. 3) .R(stage, A3). Activity A3 is carried out within the first three stages. The outcome R(stage, A3) can be expressed as R(stage, A3) = qi(stage, A3)Y(t) - FIX(sta- ge) - qc(stage, A3)Y(t) for stage = 1,2,3, where g^, FIX, and g^ are obtained empiri- cally and qi(l, A3) = O . qi and g^ have a similar meaning as in čase of R(stage, A2). 4) R(4, A4). Activity A4 is carried out only within the fourth stage. We differentiate two possibi- lities: I. t3 = t4, when ali work is done in a very short tirne. In this čase we deal with one outcome only, defined as R(4, A4) = qi(4, A4)Y(t3) qc(4, A4)Y(t3) - NT(4) FIX(4) II.t3 + t4, and assume that there are d4 steps of the exploitation process within the fo­ urth step. At each step n4, where n4 = 1,2, ...., d4, we compute R(4, A4, n4) as R(4,A4,n4) = I— qi(4, A4, n4)Y(t) - -FIX(4) - —- qc(4, A4, n4)Y(t) - NT(4, n4) where again g-^, rically. and NT are defined empi- (vi) Managing the exploitation process is poss­ ible before and after the process being in progress. By this we mean some further pres- cribed conditions and rules which should be or should not be taken into account within the problem solving process, in accordanoe with the type of optimization process that we pursue. We distinguish among the follow- ing possible alternatives: No alternations of the prescribed exploita- tion process are possible while the process being in progress. Some alternations of the originally prescri­ bed exploitation process are possible while the process being in progress. We may inte- rrupt the process, insert some new input data and proceed the process from this point on or start the program from the beginning. The final result of the process is prescri­ bed in advance as well as the starting conditions. The final result is the optimum value that can be obtained by the prescribed starting conditions. 3. DYNAMIC PROGRAMMING PROCESS ALGORITHM PROTOTYPE 3.1. General description of the descrete dyna- mic programming Descrete dynamic programming process is an i- terative process (BELLMAN, DREYFUS /1/). At ea­ ch step i, for i = O, 1, ..., N, we define a certain number of possible points Xij, for j = 1.2, ..., Mj^. For each point we compute the function value fj^j which is involved in the pro­ cess of optimization. This value is the optimum value among function values fi-i k/ for k = 1, 2,... Mi_i, incremented by the computed outco- mes between Xj__i Y. ="^'^ this particular point Xij. After computing f^j for ali i = O, 1, ..., Nand j = 1, 2, . . . , Mj^ we define the optimum • seguence of the operations and decisions that were made during the exploitation process for ali steps i = N, N-1, ..., 0. Sometimes two or more alternatives are possible which ali give the same optimum solution. 3.2. Forest exploitation dynamic programming algorithm In order to start the process we need the foll- owing input data: a, p, n, ti, t2/ t3, t4; in the prototype we don't compute the values of t^, t2 and t3 but we read them as input data instead. For each segment, i.e. for each čase of the exploitation process: ali empirically defined values of FIX(stage), .NT(stage), qi(stage, Ak), and g^(stage, Ak), for stage =1, 2, 3, 4 and k = 1, 2, 3, 4. ali empirically defined values of pr(stage, Fi, Ak) , for stage = 1, .'. . , 4, i = 2, 3, 4 and k =1, ..., 4, that represent the incre- ment of Fi due to the activity Ak. F2, F3, F4, F5 which define the starting con­ ditions of the forest exploitation process. The whole experiment can be repeated several times for different starting values of F2, ..., F5. The process is as follows: For each t, where t.= F5 + 10, F5 + 20, ..., in accordance. with the stage to which t belongs (stage = 1, 2, 3 or 4), the possible activities (Al, A2, A3 and/or A4) at that stage take plače for ali existing (active) points xt-io s (see 3.1.), where s=l, 2, 3, .... For each activity that takes plače at some ''t-10,s the following happens: new values of F2, F3, F4 and F5 are computed, defining a new point x^^ j and a new step. There is: new value of Fi = old value of Fi + pr(stage, Fi, Ak), for i = 2, 3, 4, where "-" sign appears for Al, and "+" sign appers for A2, A3 or A4, respectively. The value of F5 is increased by 10 or reduced to zero (for A2 or when F5 > t4). the outcomes R(stage, Ak), see chapter 2.(v), aro computed and addcd to ft-10 s (see 3.1) in order to obtain ft,j- Some of the 250 possible different points xtj, for j = 1,2, ..., 250, are encountered at each step t of the iterative process. They are defined by different values of F2, F3 and F4 (10x5x5 = 250). The computer program builds two arrays X(250, 6) and FX{250) at each step of the iterative process in order to save ali the the necessary intermediate data. The elements 42 in row j of array X contain the following data about the point xt,j: xji = F2, Xj2 = F3, Xj3 = F4, Xj4 = k, Xj5 = = s, Xj6 = F5 where k (=1, 2, 3 or 4) definds the activity Ak ta- ken at step t-10 that caused a transition to xt,j, and s definds the point xt-io,s fJ^om which the transition to xt,j was made. s stands for the'row number of array X at pre- vious step (t-10) in which the data about xt-io,s''^^ stored. The elements FXj, for j = 1, 2, ..., 250, re- present the values of the computed ftj- II. After completing the first part of the algori- thm we locate the optimum value fT,j i" the last step T of the interative process, where , 250) optimum (fT,s' ^°^ s = 1, 2, Afterwards we trace back to the beginning ali actions that vere carried out during the explo- itation process. We do this by means of data stored in arrays X and FX. If the number of steps in the iterative process is fixed and defined, let say by t4/10, then '^ '^ t4 in čase when the starting value of F5 = O, and T < t4 otherwise. 4. CONCLUSIONS ON THE APPROACH Obtained experiences show that a method for op- timising the forest exploitation process, based upon descrete dynamic programming is reasona- ble and adeguate. More complexity and necessary modifications can easily be introduced after obtaining and analyzing some experimental re- sults. Large number of input data and interme- diate results which are storage demanding may be regarded as the only inconvenience. Diffe- rent strategies may reduce this problem by applying the secondary disk storage at each step of the interative process. The empirica- lly obtained input data can also be stored in files in advance and kept there for as long as necessarv. REFERENCES 1. Bellman, R., E., Dreyfus, S., Applied Dyna- mic Programming, Princeton University Press, Princeton, New Yersey, 1962. 2. Vadnal, A., Kotar, M., Zadnik Stirn, L., Gašperšič, F., "Uporaba rastnih funkcij v gozdarstvu". Zbornik gozdarstva in lesar­ stva 23, str. 149-179, Ljubljana 1983, Yugoslavia. 3. Vadnal, A., Zadnik Stirn, L., Matheraatical Model for Long-term Silvicultural and Uti- lization Planning, SYM OP IS'86, Herceg Novi, 7-10 October 1986, Proceedings, p.p. 183-189, FON, Belgrade 1986, Yugoslavia. Fig.i"- AnQlytical grovvth functions[2.3] 43 RAČUNALNIŠKI PROGRAM ZA DOLOČITEV OPTIMALNE REŠITVE V DOLGOROČNEM IZKORIŠČANJU GOZDOV. Pro­ ces dolgoročnega izkoriščanja gozdov moremo o- predeliti na več načinov. Primerne v ta namen so tudi metode operacijskega raziskovanja. Sku­ pina strokovnjakov Univerze Edvarda Kardelja v Ljubljani je za določitev matematičnega modela optimizacije postopka izkoriščanja gozdov raz­ vila posebno rastno funkcijo in na temelju le­ te definirala zaporedje potrebnih postopkov, relacij in postulatov. Metoda je bila definira­ na kot postopek, ki temelji na diskretnem dina­ mičnem programiranju. V članku zgoščeno opiše­ mo prototipa modela in računalniškega programa za njegovo rešitev. Model je možno razširiti z vgraditvijo nadaljnjih zahtev in pogojev. Prog­ ram je napisan v programskem jeziku FORTRAN in je bil testiran na računalniku DEC-10.