'1“). p' f‘: ”"191 .~uh v‘l 11 V: 1 ,fi; '6 611121;:‘1‘ 11‘” it"t‘ ‘1z " Linda}; 1‘ ij‘ :. N} .2 (Ext; 53,1} 1‘“) ('IIQ 111111 1,1 ' 2(1qu 1‘! g! 1‘1'1 M1151 W "1% 'jhl‘d ‘1“ #111115}th 13%”- '11 “W 11111331? 111’? firm" “15%;? ”A” E11114! Wzglg It] 13211193111311 £15; % $1,1w 1111,1318“ 5 QB 41113:? 1311!: ”a “4L 7W} 1111151611 173‘} WL Léqélkfi 1'14 1 1 11111111131“ 1 .7291.~ A .1. L L :343'5 “2-: "-2241- .‘1 . vH—v “‘“‘ 3-1223 A :z" r} ._ 51-1 ta >1 *3:— a 2-5;" 7 : '.~ 3:73;: fifififia” .‘3- ~' - sifiéfi’jg ..._- -- V v rf-V-" ; . .43 L "9—.. l P" m, , . "5%.:3 31:71; :.....’r‘:-‘::_ :21“- «- {JEEP—fit: . - . ma. ' “a 'r-' ’gzbg‘cj L 4‘: 2-22"? ‘71: '35-'74:- “ .i" LA" 11‘“; i {If '2. 5 4‘1 X'f’v ’4‘31 -“Lrfi u 43-" 5H6: *2. it“: I .1. 2‘? 3% -“-.--‘ —e :23: fi‘ ’7’ r‘~ 3. ... fi 1 l 3 '13‘1: 7 l "' “fig? 11’! in? 5t“ .. t ‘ ‘52-'22 ,1 «é 153:? ‘35 ‘3‘;- 5'!- 2»; 1 a . ~.. taxi—«:5. 4.- .. 3175:: 1;,“ pun "‘17” ~— ——<_- r'zm‘ \ ...~.r—- .121 3 h. ”a" Ari.“ .. 4.1..- .734 ‘. 43:. 7““; .C ‘ 1"? 1. ‘ .35 Len-4' ... 44.. .4. 3" .1: - r‘ A J42- . } A. n...- ‘ T” 4;; E 9.79) , -—~e_‘ m .3“ 1.. 2:7. ' ‘3. x. H" ‘; , 2.6.1; ~92 :3 . ~4- -—. ‘5 L,‘:‘,. L ,ai’fi-téaé -u- 12'”: . $53-57 I .101 ‘a.’ .4” $7.13,...“ ‘3 ~ {ti-7:). fl 3173. " 55%K‘ if?“ 1:; . N 95"?“ " I {38’ A :— ”“5 '1‘. r- '15: .- . “ % ' (a. w‘ . . "1'. 4 - A ‘1' ‘7 . .' .1 3x .4... 4- -<.‘_.‘?;.‘ f .139 ~23 :25 '7 .L a... -. 41., 333: THESIS Ltumny Mtchtxan State ;s University g This is to certify that the thesis entitled A simulation of jack pine budworm and white pine weevil monitor and control techniques and their effects on jack pine economics. presented by Raymond James Drapek has been accepted towards fulfillment of the requirements for Masters demapinForestry Major professor Gary A. Simon Date Feb. 11, 1985 0.7639 MS U is an Affirmative Action/Equal Opportunity Institution MSU LIBRARIES v RETURNING MATERIALS: Place in book drop to remove this checkout from your record. FINES will be charged if book is returned after the date stamped below. 1%" 273318} 100 A 24.5 f"1415 £0, ”.5 am OCT 0 71399 “436, 3;? A SIMULATION OF JACK PINE BUDWORM AND WHITE PINE WEEVIL MONITOR AND CONTROL TECHNIQUES AND THEIR EFFECTS ON JACK PINE ECONOMICS By Raymond James Drapek A THESIS Submitted to Michigan State University in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE Department of Forestry I985 ABSTRACT A SIMULATION OF JACK PINE BUDWORM AND WHITE PINE WEEVIL MONITOR AND CONTROL TECHNIQUES AND THEIR EFFECTS ON JACK PINE ECONOMICS BY Raymond James Drapek A model was developed to simulate volume growth of jack pine (Pinus banksiana Lamb.) under different intensities of attack by the jack pine budworm (Choristoneura pinus Freeman) and the white pine weevil (Pissodes strobi Peck.). The model allows a user to determine the site index, number of acres, discount rate, the deterministic or stochastic nature of the run, management costs, level of weevil damage, and the methods of site preparation and regeneration. The user also can control what kind of monitor and spray policy to use for the insects and when to cut the stand. Final results of the program would include the amount of wood harvested and the amount saved by insect control efforts. These would be compared with discounted costs to obtain a net present value for the stand and a net present value for insect control efforts at stand initiation. To my grandfather, Walter Daniel Heaphy 11' ACKNOWLEDGMENTS A sincere thanks to all who helped me complete this project: To my advisor, Dr. Gary Simmons, for easy-going support and valuable advice; To Frank Sapio and Ron Murray, for making their considerable knowledge of forest pest management available; To Dr. Stuart Gage, Aubrey Moore, Bob Kriegel, and Jim Pieronek, for much- needed assistance on the computer; To Dr. Robert Marty and Dr. Donald Dickmann, for useful feedback on the project as a whole; To Norm Elliott, for putting up with all my complaining; To Susan Battenfield, for making me for to rite real good; To Phil Deschaine and Claudia Haas, for sharing with me their friendship and some tasty quesadillas; And finally, to my parents, Joseph and Doris Drapek, for never doubting that I could do it. TABLE OF CONTENTS List of Tables ........................................ vi List of Figures ....................................... vii Introduction ......................................... l The Model ........................................... 3 An Overview ..................................... 3 Initialization ..................................... 5 Setting Insect Levels .............................. 5 Setting Budworm Levels ........................ 5 Setting Weevil Levels .......................... 8 Monitoring Insect Populations ...................... 8 Control of Insect Populations ....................... IO Setting Insect Caused Tree Damage ................. 13 Growth Loss .................................. l3 Mortality... .................................. 15 Loss of Merchantability ........................ l6 Modeling Jack Pine Growth ........................ 18 Effects of Site Preparation and Planting ,,,,,,,,,, l8 Generating the Initial Basal Area ,,,,,,,,,,,,,,,, 22 Growth of the Stand After Age Twenty ,,,,,,,,,,, 22 Economic Considerations .......................... 24 Final Evaluation of Insect Monitor and Control Program 25 BANKSIANA User's Manual ............................ 26 Introduction ..................................... 27 iv Table of Contents (continued) Running BANKSIANA .............................. 28 Menu Format ..................................... 28 Initializing Your Sand .............................. 29 Interactive Management of the Stand ................. 35 Final Evaluation of Management Activities ............ 37 Considering Taxes ................................. 39 References ........................................... 40 Appendix A ........................................... 43 Appendix B ........................................... 108 Appendix C ........................................... I l 3 LIST OF TABLES Percent reductions in white pine weevil and jack pine budworm levels as a result of various spray operations ...... Costs of various insecticide applications. . ................ Percent reduction in average growth ring area in jack pine resulting from defoliation in I956. .................. Proportion of normal growth resulting from jack pine budworm defoliation. .................................. The relationships between three year cumulative budworm population values and percent jack pine mortality ............................................. The number of trees per acre at stand age two given the site preparation and planting method used. ............ Estimated basal area per acre in 20-year-old jack pine stands. .............................................. vi ll 12 l4 l4 l7 2T 23 LIST OF FIGURES |, A flowchart of the model .............................. 4 2. Items which can be varied during the initialization phase ............... . ............................... 6 3. Example of how weevil damage on jack pine is up-dated in the model ......................................... I9 4. Main initialization menu. ............................. 30 S. Initialization menu for automatic management in the model ............................................... 32 6. Cost setting menu .................................... 33 7. Regeneration and site preparation menu ................. 34 8. Final evaluation of management activities ............... 38 BI. The text from file 'HELLO.TEXT' ..................... l08 BZ. The text from file 'MASK I.TEXT' ..................... I09 B3. The text from file 'MASK2.TEXT' ..................... ITO BA. The text from file 'MASK3.TEXT‘ ..................... III BS. The text from file 'WEEVCHART.TEXT' ................ IIZ vii INTRODUCTION Jack pine (Pinus banksiana Lamb.) is a major timber species of the Lake States Region. Short-lived and shade-intolerant, it is usually found growing on dry sites that have been burned over. Though it often grows alone, it can be found in association with the following (Fowells, I965): red pine (Pinus resinosa, Ait) eastern white pine (Pinus strobus L.) quaking aspen (Populus tremuloides Mich.) big-tooth aspen (ngulus grandidentata Mich.) paper birch (Betula papyrifera Marsh) red oak (Ouercus rubra L.) northern pin oak (Quercus ellipsoidalis E.J. Hill) black spruce (Picea mariana (Mill) B.S.P.) white spruce (Picea glauca (Moench) Vass) On better sites, jack pine is transitional and is soon replaced by shade-tolerant species. Once considered worthless, it now is valued for its uses as pulp, sawtimber, and as wildlife habitat. As of I980, over 35 million dollars worth of jack pine was growing on 836,700 acres in the Lake States. Two problems which arise in managing for jack pine are (I) getting adequate regeneration and (2) protecting the trees against insect pests. Site conditions required for optimal establishment and growth include bare mineral soil for adequate seed germination and minimal competition from weeds or shrubs. This means that a site usually must undergo some preparation before jack pine will regenerate. Management activities designed to produce these optimal conditions include full tree skidding, hand cutting of competing vegetation, hand or machine scalping, rollerchopping, bulldozing, raking, prescribed burning, and herbicides (Benzie, I977; Hacker et al., I983). Two insects of concern in jack pine management are the jack pine budworm (Choristoneura pinus Freeman) and the white pine weevil (Pissodes M Peck.). Larvae of the jack pine budworm feed on the buds and the foliage of jack pine trees. When budworm populations are high this feeding can cause mortality and growth loss to merchantable trees and seedlings. As a result, jack pine stands can become understocked and slow growing (Dixon, l98l). The white pine weevil attacks jack pine leaders. When the leader is killed, the tree grows bushy and crooked. Whole stands can be made unmerchantable as a result of such damage. Technically, it is possible to always assure adequate regeneration and to protect trees against insect attack. Mechanical and chemical site preparation techniques are effective when correctly applied, and insecticides provide adequate short-term control. The problem in jack pine management is that the margin of profit is small even under the best of conditions, and the costs of active management can easily push the entire project into the red. Therefore, a management strategy must balance the loss that will occur if nothing is done and the loss that will occur if too much is done. The purpose of the model outlined in this thesis is to evaluate the economic efficacy of jack pine insect control programs. In the model, the growth of a jack pine stand is simulated. Budworm and weevil populations and their effects on stand growth are also simulated. These populations are modified by insect control efforts that can be set for each run of the model. The final result of the model includes an evaluation of the net present worth of the stand and the net present worth of control efforts at the time of stand initiation. A second purpose of this project was to develop a computer program of the model to be used as an educational tool by people who are involved in managing forests for timber. The program will allow them to monitor and control insects on a hypothetical stand and have their efforts evaluated economically. Hopefully, the difficulties of balancing control related costs against the cost of not controlling will be apparent after a few simulated rotations. THE MODEL An Overview The model can be divided into two basic phases. The first phase represented by the left half ‘of figure I covers the initializing of model parameters and the first 20 years growth of the stand. The second phase represented by the right half covers stand growth from year 20 to the final harvest. This division was necessary because growth equations were only available for stands age 20 and over. This meant that the results of all events occurring in the first 20 years would somehow have to be accumulated and used at year 20 to produce an initial stand. Stand growth afterwards could be modeled yearly. In both phases of the model, potential insect levels are set for every year. Insect populations can then sampled if monitoring activity is chosen for that year. If insect control is chosen, the severity of insect attack can be modified. Tree damage, is then determined based on insect attack severity. Before year 20, | 't‘ l' Initialize nltég Ize Basal Rnea Stand Set Insect Levels Set Insect Levels Nonitor monitor Manage manage Set. Set °°m°9° 3232?: Levels Cut the Stand LYear = Year + 1 I Grow the Stand Ho Ves Year = Year 4» l I Figure I. H FIOWCHBFI OT "18 MOUBI. insect-caused tree damage is accumulated and used to modify the initial setting of stand basal area. After year 20, damage is applied yearly. When the stand is cut, an economic evaluation of all previous activities occurs and the model is exited. Initialization During initialization, parameters that will affect management costs, tree growth, and insect populations are set. Figure 2 lists everything that can be set. Among the options is one to make the run automatic or interactive. In automatic run, the user sets the rules for monitoring and control activities in the beginning, and the computer automatically carries these out during the run. Setting Insect Levels Setting Budworm Levels. Jack pine budworm populations cycle between outbreak levels where tree damage can occur and endemic levels where populations are often undetectable. Outbreaks last approximately four years and are characterized by a steady rise and then a sharp drop. Cycles vary in length from 6 to l5 years. In this model, a generic number ranging from zero to ten is used to represent the population levels of the budworm. A zero signifies an endemic population and a ten represents the maximum population possible. This generic number is converted in the sampling portion of the model to actual insect numbers per unit sample. This cyclic pattern is simulated in the model by (I) randomly determining the number of years between outbreaks and then (2) randomly generating population levels for each of four outbreak years. The number of years between - W in the stand " Stimuli - W to enpect - Lasts: l) Costs of Site Preparation activities 2) Costs to Plant or Seed the Stand 3) Costs of insecticide applications 4) wages of Forest Technicians and Pest Scouts - Type of W to Ilse - Method of W to use - whether Model nun will be m or W - lllhether Model will llun Mammy or My - If automatic: Set up a W for Budworm and llieeull ii necide [1 ml" Monitor and/or Spray 2) neclde when will Monitor and/or Spray 3] decide what and [my will Spray - If automatic: lietennine W911! Figure 2. items lilhich Can Be Ilaried During The IIIIUOIIZOUOII Phase. outbreaks was established using a truncated exponential distribution with a mean of six years and truncation points of three and eleven years. A random variable with this distribution can be generated as follows: X=-U(In r) where U is the mean (6) and r is a uniformly distributed random variable between 0 and l (Manetsch and Park, I980). This method of simulating the timing of jack pine budworm outbreaks was also used by Nyrop et al. (I983). This model diverges from their model as to how it simulates the effects of budworm defoliation on stand growth. A population level is determined for each of the four outbreak years by setting upper and lower population levels and generating a uniformly distributed number between those two values. Upper and lower values were chosen for each year so that populations would rise and fall as a natural population would during an outbreak. Levels were set so that very low to moderate populations would . occur during the first year, moderate to high populations would occur during the second year, moderate to very high populations would occur during the third year, and very low to very high populations would occur during the last year of the outbreak. Generic population values correspond to population level descriptions in the following manner: levels of 0 to 3 correspond to very low populations, levels of A and 5 correspond to low populations, levels of 6 and 7 correspond to moderate populations, 0 level of 8 corresponds to high populations, and a 9 to very high populations. For those years between outbreaks, a population value of zero is given. Setting Weevil Levels. Unlike the jack pine budworm, white pine weevil populations do not display distinct cycles. Weevil populations are fairly steady within any one stand, but most observations to date suggest that their populations tend to increase with time (Marty and Mott, I964). Weevil populations can be enumerated by noting what percent of pine leaders have been attacked. Observed values of weevil attack have ranged from 0 to close to l00 percent. In this model, the level of weevil attack is set in the initialization phase. Weevil levels grow linearly to this level for the first ten years and remain there for another ten years. After year 20, the weevil is no longer considered a problem in jack pine and weevil populations are no longer modeled. Monitoring Insect Populations Many alternatives currently are available for sampling the jack pine budworm (Dixon, I980). Two systems are currently used for estimating egg, early larval, late larval, and pupal populations: the IS-inch branch sample (Minnesota Department of Natural Resources) and the cluster system (Foltz et aI., I968). Overwintering larval surveys and pheromone traps for adults are also routinely used. To simplify coding the model for computer use, the number of sampling methods simulated was limited. An overwintering larval sample and a late larval sample were chosen to provide an early warning of potential trouble and a final pre-damage stand check. In the overwintering larval survey currently used at Michigan State University, I8-inch branches are taken from the stand during the winter months when larvae are in their hibernaculum. The branches are sent to a lab where they are cut up and soaked in a 0.05% solution of sodium hydroxide. This process separates out the larvae, which are then collected on filter paper and counted. This sampling only serves as a crude early warning of potential trouble. Finding any larvae on a branch indicates that populations may become high in that particular stand. Two problems come up in attempting to simulate this sampling method: (I) no precise measures are available on the precision or accuracy of this sampling method and (2) no sure way is available to relate population levels at the time of sampling with population levels during the damaging stages of the insect's life cycle. Since little correlation has occurred in the past between this sampling and later sample results, a maximum error for the difference between the results of this sampling and the final population of the budworm during damaging stages was chosen at 70 percent. This error is applied to the actual population level by randomly generating a number and adding or subtracting that number from the true population level. A uniform random distribution, maximum error of 70 percent, is used. This result is then converted to appropriate sample values by assigning values of zero larvae per l8-inch branch for all results less than four, seven larvae per l8-inch branch for all results greater than nine, and linearly assigning values for all results between four and nine. The late larval survey used is the same as that presented by Dixon (I980) for l5-inch branch samples. For each stand two, l5-inch branch samples are taken from three trees and are inspected for 5th and 6th instar budworm larvae. An average of three or more larvae per branch indicates a high population. For simulating this sampling method 0 l0 percent error was chosen as a reasonable representation of actual sampling errors. Sample values are determined in a similar manner to the overwintering larval survey described above. For error- IO adjusted populations of less than zero, a sample value of zero larvae per l5-inch branch is assigned. Error-adjusted populations greater than eight result in a sample value of three larvae per IS-inch branch. Once again, interim values are assigned linearly. White pine weevil damage is sampled for by observing the percentage of leaders that have been killed. Since weevil levels also are measured within the model on a percent leaders-hit basis, no transformation is required to go from model-generated weevil levels to model-generated weevil samples. A l0 percent error, however, is included in the model to simulate sampling error. Control of Insect Populations Control options for the jack pine budworm and the white pine weevil within the model are limited to insecticides. For both insects, there is the option to apply the pesticide aerially or to go with a ground application. For the jack pine budworm an additional option is available to go with a biological pesticide, such as Bacillus thuringiensis, or to go with a chemical pesticide, such as Carbaryl. Costs of application and efficacies of population control differ between the alternatives. As of I984, no solid information was available on the efficacies of the various alternatives. Best-guess estimates of the ranges of insect kills obtained from each method are used in the model. These are listed in Table I. When an insecticide is applied in the model, a value is randomly chosen from within this range. Though default spray costs are on a simple per acre basis, spray costs can be set up as an initial up-front cost to initiate the operation plus an additional per acre cost. This allows economies of scale to operate within the model. It then is cheaper per acre to spray a large stand than it is to spray a THBLE i. ll Percent reductions in white pine weevil and jack pine budworm levels as a result of various spray operations. Type of Sprag Operation Population reduction. Year of Sprag, Population Reduction Year After Sprag Aerial application of a chemical pesticide - <0 ‘9 directed against 90 100" ON budworm Aerial application of a biological pesticide 70 - 90% 0% directed against budworm Ground application of a chemical pesticide 90 _ 100% 00 directed against N budworm Ground application of a biological pesticide 70 _ 90% 0% directed against budworm. Aerial application of a chemical pestiCide 40 _ 50% 15 _ 35% directed against weevil. Ground application of a chemical pesticide 40 .. 5053 15 - 35% directed against weevil 12 TRBLE 2. Costs of various insecticide applications. Type of Sprag Operation Initial Cost Cost Per Acre Aerial application of a chemical pesticide directed against budworm $000 $800 Aerial application of a biological pesticide directed against budworm $000 $1000 Ground application of a chemical pesticide directed against budworm $000 '3 20 00 Ground application of a biological pesticide directed against budworm $000 $25 00 Aerial application of a chemical pesticide directed against weevil 3000 $800 Ground application of a chemical pesticide directed against weevil $000 3 3000 13 small one. The values used in the model for these various costs are listed in Table 2. Setting Insect Caused Tree Damage After all control efforts have been completed and final insect population levels are set, the amount of insect caused tree damage is set. There are three types of tree damage: growth loss, mortality, and loss of merchantability. Growth loss and mortality are related to jack pine budworm population levels. Physiological stress caused by budworm feeding damage reduces growth and increases the likelihood of death. The loss of merchantability is related to weevil population levels. The death of the leader causes bushy and/or crooked growth for the tree making its removal from the stand more difficult. If the tree is hit too many times, its value can be reduced to nothing. Growth Loss. Growth losses were estimated using values derived from Table 3 (Kulman et al., I963). By assuming that the ratio of latewood to earlywood in jack pine averages around l:2.5 (Kulman et al., I963), the values from Table 4 were generated. Table 4 contains not only the proportion of normal growth that will occur from the current years' defoliation, but also the proportions of normal growth resulting from defoliation over the previous two years. Growth loss appears to extend beyond the three years covered here for some defoliation classes, but no attempt was made to model this extension since no information was available on losses three or more years after defoliation. The defoliation classes used in Tables 3 and 4 were based on visual inspections of trees. Kulman et al. (I963) crudely related these classifications to results of a l4 TABLE 3. Percent reduction in average growth ring area in jack pine resulting from budworm defoliation in 1956. (Taken from Kulman et . al ., 1963) Defoliation Barlg wood Late wood class 1957 1958 1956 1957 1958 2 S4 8 32 27 0 3 76 l 60 44 0 4 100 52 83 73 20 5 100 86 ' 106 91 86 Proportion of normal growth resulting TABLE 4' from jack pine budworm defoliation. D f l' t' 21:3,: ion 13‘ 9991' 2nd gear 3rd gear 1 1 DO 1 DO 1 no 2 0 .92 0 53 0 .94 3 0 84 0 33 0.99 4 0.78 0 07 0 54 5 0.73 0 02 0 .14 Defoliation class 1 = Very Light Defoliation class 2 3 Light Defoliation class 3 = moderate Defoliation class 4 . High Defoliation class 5 = Very High 15 tree-beating sampling method, but no information was available on how to relate their sampling method with those currently used. Levels were assigned in the following manner for this model: I = very low, 2 = low, 3 = moderate, 4 = high, and 5 = very high. Table 4 is used in the model by the following procedure: I. For every year of outbreak choose one of the five defoliation classes based on that year's population level. (populations of 0-3 = very light, 4-5 = light, 6-7 = medium, 8 = heavy, 9 = very heavy). 2. For each of the three years obtain a value from Table 4 by cross- referencing the defoliation class with the year under consideration. 3. Multiply these three values together to obtain the proportion of normal growth that will occur that year. For example, if a heavy defoliation occurs this year and was preceeded by a light defoliation last year and a very light defoliation the year before, then 4| percent of normal growth will occur this year. Values from Table 4 are used in the following manner to produce this result: (0.78 X 0.53 X l.OO = 0.4l) Yearly growth loss for stands over 20years old is simulated by multiplying the volume growth obtained from the tree growth portion of the model with the growth proportion obtained above. For stands under 20 years old this cannot be done since stand growth is not simulated yearly. Therefore, the proportion of normal stand growth is averaged over the first 20 years and then is applied when the initial basal area is set at year 20. Otherwise, growth loss is treated identically over all ages. Mortality. Jack pine budworm defoliation, if severe enough, can cause considerable mortality. In attempting to simulate this problem the following characteristics of budworm caused mortality were noted: 16 l. Although mortality in older stands is usually much lower, up to one- third of a stand can be killed if defoliation is severe. 2. Young understory trees can suffer as much as 90 percent mortality. 3. Mortality is more likely to occur to stands severely attacked for more than one year than to stands with only one year's defoliation (Graham, I935; Benjamin et al., l96l; Dixon, l96l; Kulman et al., I963; Batzer and Millers, I970). To simulate these characteristics a function would be needed in which generated mortality levels usually would be low but which would have the potential to become high if budworm damage was severe over several years. The functions from Table 5 were chosen to produce these results. Only when the sum of defoliation levels over the last three years is over 20 do mortality levels start to climb. Mortalities of 90 and 33 percent for the younger and older stands, though unlikely, are possible. For most years, mortality will be moderate. Before the age of 20, the mortality level determined from the model is used to adjust the number of living trees per acre and eventually will affect the basal area which is initialized at year 20. After age 20, the mortality level obtained is used to adjust the number of living trees and the volume of wood per acre. Loss Of Merchantability. The model used to simulate white pine weevil damage on jack pine trees is essentially the same as the one proposed by Sapio et al. (I985). Each tree is allowed to be hit four times by the weevil before it is culled. The model works by keeping track of what proportion of the stand has been hit zero, one, two, three, and four times. Assuming that the weevil shows no preference for unattacked trees, these values can be adjusted by the 17 Table 5. The relationship between three year cumulative budworm papulation values and percent jack pine mortality. Sum of budworm population values over the last three Percent mortality for stands gounger Percent mortality {or stands older For stands < 20 years old: Y = (0.1096X - l 8764) 4 For stands ) 20 gears old: Y 8 (0 0736)! - l .1561) Vhere Y t Percent mortality of jack pine this gear. X = Sum of budworm population values over the last three gears. years than 20 gears than 20 gears 0 l 1 l l 1 2 l 1 WM 21 3 2 22 8 5 23 17 8 24 32 14 25 56 22 26 90 33 4 18 proportion of trees hit by the weevil that year. This model is applied to the stand until the trees are l7 feet tall. When this happens, at least I7 feet of straight stem will be available to the logger and the weevil will no longer be an important consideration. Consider a case where the proportion of trees not hit at the beginning of the year is 0.5, the proportion of trees hit once is 0.2, and the proportion of trees hit by weevils that year is 0.2 (Figure 3). The proportion of unattacked trees which will remain that way will be 40 percent (0.8 x 0.5 = 0.14). The proportion of unattacked trees which will move to the "attacked once" class will be l0 percent (0.2 x 0.5 = 0.|). The proportion of trees hit once at the beginning of the year which will remain that way will be l6 percent (0.8 x 0.2) = 0.|6). Therefore, 40 percent of the trees will not be hit at the end of the year, and 26 percent will be hit once (0.l x 0.26 = 0.26). The values thus obtained give the proportion of trees culled by the weevil. Since tree DBH values do not differentiate significantly during the critical period, it is assumed that this more or less equals the proportion of wood volume culled by the insect. When the stand is cut, the final wood volume obtained is adjusted by this value. Modeling Jack Pine Growth Effects of Site Preparation and Planting. There are many ways to produce a stand of jack pine. Silvicultural systems include clearcutting, seed tree, and shelterwood methods. For each of these, reproductive success will depend, among other things, on what source is used for seeds or seedlings and on what type of site preparation is used. To include all possible options would make the 19 Proportion of trees Proportion of trees YEAR (X) not hit by weevil hit once by weevil 0.5 0.2 (If percent weeviling \ - equals 20) 0,5 x 0.2 = 0,1 0.2 x 0.2 - 0.04 0.5x0.8=0.4 0.2x0.8=0.16 Proportion of trees Proportion of trees not hit by weevil hit once by weevil YEAR (X + l) 0 .4 0.26 FIGURE 3. Example of how weevil damage onjack pine is up-dated in the model. 20 model tremendously unwieldy and would obscure insect management, which is the main focus. Therefore, site preparation options were limited to five: burning, scarification, rollerchopping, lap and scattering, and applying a herbicide. Only clearcutting was used as a Silvicultural system, and within this system regeneration was limited to five options: natural regeneration, aerial seeding, seeding with a corn planter, planting by hand, and machine planting. No precise numerical information was available on the regeneration success of each option, but enough information was available to get a general idea of what could be expected (Zehngraff, I943; Cayford, I958, I959; Chrosciewicz, I959, I960; Hacker et al., I983). Even with this simplified set of site preparation and planting options, the number of possible combinations are astronomical; therefore, only a very limited subset of these combinations was simulated. An evenly distributed random number was used to obtain the initial number of trees growing per acre. The upper and lower values for the distribution was set for each combination considered by the upper and lower values historically observed in stands prepared that way. Table 6 shows all site preparation and planting combinations considered and the resulting range of trees per acre. Note that for a combination of a burn and natural regeneration that two even distributions are used, one with a 75 percent chance of being applied and the other with a 25 percent chance. This was done to simulate the fact that when natural regeneration after a burn is tried anything from zero to l0,000 trees per acre can come up, but that inadequate regeneration is more likely than excessive regeneration. 21 TllBlE 6. The number of trees per acre at stand age two given the site preparation and planting method used. Planting method Range of Possible Site Preparation Values for Regeneration natural Regeneration Burn 000 - 900 with 75% probability 900 - 10,000 with 253 probabilitg Lop and Scatter 300 - 900 + Scarification Rollerchop 100 - 900 none of the Above 000 - 400 Seed With 0 Corn Planter Burn or Scarifg 100 - 900 or Herbicide or Rollerchop none of the Above 000 - 600 Aerial Seed Burn or Scarifg 000 - 800 or Herbicide or Rollerchop none of the Above 000 - 500 Hand Plant 900 - 900 machine Plant 900 - 900 22 Generating Initial Basal Area. Initial basal area is set when the stand reaches year 20. At that time, a value for the number of trees per acre, a site index, and some indication of what proportion of normal growth has occurred over the last 20 years are available from the model. This information is then used to obtain an initial basal area from Table 7 (Benzie, I977). The number of trees is cross—referenced with the site index to obtain a basal area value which then is adjusted by the proportion of normal growth. Code for the model was written so that basal area values could be interpolated for those values of site index and tree number that did not exactly fit those on the chart. The computer code was also written so that basal area values could be extrapolated from the chart where high mortality left the stand with fewer than 500 trees per acre at the age of 20. If zero trees per acre were growing on any of the listed site indices, then a basal area of zero was assumed to result. A Lagrange interpolation polynomial was used to connect those zero-tree points with the 500-tree points listed on the chart (Manetsch and Park, I980). Growth of the Stand After Age Twenty. After age 20, the increment in basal area is calculated each year (Benzie, I977): Basal area growth = 0.276 (site index)0'63Exp (-4 Exp (-29.l8/age)) ( l + 0.056 (basal area) - 0.000358 (basal area)2) This value is then adjusted to account for losses due to budworm damage and is added to the total basal area for the stand. Stand height is calculated (Benzie, l 977): 23 TflBLE 7. Estimated basal area per acre in ZO-gear-old jack pine stands. (Taken from Benzie, 197?) Site number of trees per acre ““1“" 500 1000 1500 2000 feet square feet 60 39 63 79 92 so 28 46 55 63 40 17 29 36 39 24 Height : L633 x (site index) (I - e-O°02233 (098))I'24I 9 The total basal area is then adjusted to account for mortality losses due to the budworm. The number of cards of wood is calculated using the following equation taken from Benzie (I977): Cords = 0.003958 x basal area x height The number of cubic feet of wood is calculated (Benzie, I977): cubic feet = 0.4085 x basal area x height Economic Considerations Every management activity has a cost associated with it. Each time the stand is managed, this cost and the year during which the activity is performed are recorded. The cost is then discounted back to the year of stand initialization using the following formula: Discounted Cost = Cost / (I + i)n where i = discount rate/l00 and n = number of years discounted. This discounting process equalizes monetary values over time. Future money is not worth as much as money held in the present since that same sum can be invested and it will gain interest. This discounting process is very important for any long term investment in a stand of timber. The discount rate must reflect the interest rate 25 that could potentially be gotten from an alternative investment. After one rotation of the stand, the discounted costs and benefits can be compared to see how well the investment in jack pine compares with alternative investments. If the net sum of benefits and costs is negative then the money would have been better spent elsewhere. A positive result indicates that the investment compares favorably to the alternatives. Final Evaluation of Insect Monitor and Control Program Management activities are evaluated two ways in the coded version of the model. First, all discounted costs and benefits are totalled for the entire rotation. The net present value thus obtained tells whether the overall management practiced on the stand was economically viable. Second, a net present value is determined for all monitor and control activities. A second unmanaged stand of jack pine is grown throughout the rotation concurrently with the managed stand. This control is used to determine how much wood was saved by insect control efforts. The discounted value of this wood then is summed with the discounted costs associated with those efforts. This summation yields a net present value for insect control activities for the year of stand initiation. As in the total net present value, a positive value indicates that the investment in control activities compares favorable with alternative investments. 26 J HCK PINEJHC KPINEJACKPI NEJACKPINEJHCKP INEJBCHPINEJB CKPINEJHCKPINEJBC HPINEJHCHFINEJBCKPINE JACKPINEJHCKPINEJHCKPINEJ A USERS’ MANUAL FOR fiCKPINEJBCKPINEJHCKPINE JACKPINEJACKPINEJHCKPINEJ PROGRAM BANKSIANA ACHPINEJHCKPINEJHCKPINEJBCH JACKPINEJHCKPINEJHCKPINEJ fiCKPINEJBCHPINEJBCKPINE JHCHPINEJBCKPINEJACKPINEJ BCHPINEJBCHPINEJHCHPINDJBCK JACKPINEJBCKPINEJHCKPINEJACHP JACKPINEJBCKPINEJHCKPINEJ ACKPINEJHCKPINEJHCKPINEJHCK PINEJHCKPINEJHCHPINEJHCKP INEJHCKPINEJHCKPINEJACK PINEJACKPINEJACKPINEJACKP PINE 27 INTRODUCTION BANKSIANA is a menu-driven program written in p-system pascal for the IBM Computer. Its purpose is to simulate the growth of jack pine stands under different methods of management for insect control and to evaluate those different methods economically. The insects modeled include the jack pine budworm and the white pine weevil. Control alternatives are limited to determining the timing of sprays and deciding the type of spray operation to implement. Insect monitoring activities are included in the model as an aid in deciding when to spray. At the beginning of the program, the user can initiate a stand by any one of several site preparation and planting methods. Once a stand is initiated, the program enters the main phase where tree growth under insect attack is simulated. During this phase, insect monitoring and control decisions are made. At the end of a program run, all costs associated with control efforts are discounted to the year of stand initiation and are compared with the discounted value of wood saved to yield a net present value for control efforts. Stand growth is simulated by equations developed by Paul Laidly and published in the Manager's Handbook for Jack Pine in the North Central States (Benzie, I977). Weevil damage is simulated similar to Sapio et al. (I985). Jack pine budworm population dynamics are simulated in a similar to Nyrop et al. (I983) and budworm impact is based on observations made by Kulman et al. (I963), Batzer and Millers (I970), Graham (I935), Benjamin (I952, I953, I954), Benjamin et al. (I96l), and Dixon (l96l). 28 RLMING BANKSIANA To run BANKSIANA, you must have an IBM PC or a compatible machine. The program is packaged in a single diskette and only requires one disk drive and a monitor. The following steps are required to run the program: I) Put the diskette in the disk drive. 2) Start the machine. 3) When the command line appears, type on 'X'. 4) The machine will print 'Execute what file?', respond with '#4:C' and a carriage return. The program will begin to run and will prompt the user for the required responses. MENU FORMAT BANKSIANA is menu-driven; therefore every response required will be listed on the screen at the appropriate times. Two types of responses will be expected: a character response and a numerical response. Character responses will be prompted in the following manner: ‘Type of run: R)andom or D)etermined. In this example, an 'R' will give a random run, 'D' will give a deterministic run. When character responses are required, you do not have to press the return key after entering your response. Numerical responses require that you press a return key after entering them so that the machine knows when you are finished. Numerical responses are 29 required either when a numerical value is being assigned to a variable or when numerical values are used to delineate menu choices. An example of a prompt requiring the first type of numerical response is: Site index (45 - 60): 55 This prompt assigns a value to the variable site index. The values within the parentheses give the range of acceptable values. The number on the right is the default value which the program assigns to the variable. Press the return key to accept this value, otherwise enter a new value which will be printed on the screen over the old default value. Figure 4 is an example of a prompt requiring the second type of numerical response. When you see this, enter the numerical value corresponding to the item you wish to alter, and then press return. More prompts will be printed on the top of the screen which will steer you through the steps needed to make whatever changes you wish. Available options will be listed on the screen. Finally, if you wish to leave the menu, the last one or two numbers listed will provide an out. INITIALIZING YOUR STAND The first prompt to appear on the screen when the program starts will look like this: You have the option to change the way certain parts of this program operate. Do you wish to see the menu and make some changes? .. Y or N 30 which of the items listed below do you want to change? 0 4) S) 5) 7) 8) B) 10) JACK PINE MANAGEMENT MODEL -- INITIALIZATION PHASE Type of user: Public agency Type of run: Random Number of acres .13 - 9992: 40 Site index (45 — 60>= 55 Discount rate % (0.0 - 15.0): 3.00 Interactive vs. Automatic run. (Default = interactive) Initial weevil denSityr moderate Initialize management costs Select Site preparation and planting Run model Exit program Figure 4. Main initialization menu. 3T If you choose 'N' a default version of the program will run. This is handy for people who might find the menus intimidating. With 'Y' a menu (Figure 4) will print on the screen. With this menu, a user can alter the program run. Most of the options shown in Figure 4 simply allow you to change the values of some variables. For these, prompts similar to those shown in the previous section will appear at the top of the menu. Other options will result in another menu being printed on the screen. For these, the responses required may be a little more complicated. Option number 6 allows a user to decide whether to manage the stand interactively as the program progresses or to set up a management plan at the start and simply let the program run by itself. If the program runs automatically, the menu (Figure 5) will appear on the screen. This menu is a worksheet for setting up a plan for managing a stand. A 'B' or 'W' allows a user to set up a plan for dealing with the budworm or the weevil. Prompts will appear querying the user on whether or not to monitor, what to spray, et_c. An 'R‘ determines how long the stand will grow before cutting. A standard numerical response prompt will be needed for this. To get out of this menu, press a 'G'. To change some of the costs involved in monitoring and spraying insects press the '8'. The menu shown in Figure 6 will then appear. All of the entries for this menu entail simple numerical assignments and follow the standard format. Two values are associated with spray costs: the initial cost required to proceed with the operation and per acre costs associated with the spray operation. The right value on the menu represents the total cost that will be incurred whenever a spray operation of this type is undertaken. It is determined by the first two values listed on the menu and the total number of acres within your stand. 32 Budworm? Weevil? Rotation? or Go on to next part? JACK PINE BUDUORM AND NHITE PINE WEEVIL MONITORING AND CONTROL PLAN k-—————————————————————__—.———_—____——_——__.—_—_——————————_-——_——_____— B)udworm plan: (Default = ignore budworm) w)eevil plan: (Default = ignore weevil) R>otation length: 40 years G)o on to the next part of the program Figure 5. Initialization menu for automatic management in the model. 33 Which of the items listed below do you wish to change? PACK PINE MANAGEMENT MODEL -- MANAGEMENT COSTS ——--—_—¢-—-——————-—————-————————-—~—_——_—-——~———_————-_———————————_—-——~————— Initialize wages of personnel. 1) Hourly wage of pest scout: 5.00 2) Hourly wage of forest technician: 8.00 Initialize management costs for pesticide application. Applications targeted against Jack Pine Budworm 3) Aerial, chemical spray: 0.00 + 8.00 per acre = 32 .00 4) Ground, chemical spray: 0.00 + 20.00 per acre = 800.00 5) Aerial, biological spray: 0.00 + 10.00 per acre = 400.00 5) Ground, biological spray: 0.00 + 25.00 per acre = 1000.00 Applications targeted against white Pine Weevil 7) Aerial, chemical spray: 0.00 + 8.00 per acre = 320.00 8) Ground, chemical spray: 0.00 + 30.00 per acre = l200.00 8) Go back to the initialization menu 10) Exit program Figure 6. Cost setting menu. 34 Which of the items listed below do you want to change? 2 JACK PINE MANAGEMENT MODEL -- SITE PREPARATION AND REGENERATION 1) Burn: No I‘d Herbicide: No I) Lop and scatter: No 4) Scarify2 No S) Rollerchop= No 6) Method of regeneration: Machine plant 7) Go back to the initialization menu Figure 7. Regeneration and site preparation menu. 35 As an example of how to use this menu, to change the costs associated with aerially spraying jack pine budworm with chemical pesticide, press the '3' and the return. At this point the same line as that next to the '3' will appear at the top of the menu with the curser on top of the left-most value. Enter the desired number, and hit the return. The curser will then move over to the next value which can be changed. Note that after either value is changed, the right-most value on the menu changes as well. After all desired changes are made, press a ‘9' to get back to the main menu. For option number 9 on the main menu, the menu shown in Figure 7 will appear on the screen. This menu sets what type of site preparation and planting will be used to initialize the stand, and it sets the costs that will be associated with those activities. To get back to the main menu, press a '7'. Once all changes are made, press a 'l0' to run the program. The program will determine how many trees per acre the stand will start with. Further action may be required if regeneration is too thick or too sparse. INTERACTIVE MANAGEMENT OF THE STAhD When the program is run interactively, the years of the rotation can be divided between inactive years where nothing is done to manage the stand and active years where management activities ranging from conducting insect sampling to cutting the stand can be practiced. These active years are determined two ways. I. Starting from year one and for each active year afterwards, decide how many inactive years before the next active year. This is set with the following prompt: 36 How many years should we wait before inspecting the stand? 2. During inactive years when a budworm outbreak occurs, a user will be able to make the year active. If this happens, the machine will beep and present this prompt: WARNING! A budworm outbreak is now occurring. You have 3 seconds to act on this. Press any key to halt the program. By pressing Q key on the keyboard within the allotted time, the program will stop and the user will be allowed to actively manage the stand for that year. Active years can be divided into two phases: insect monitoring and management. During the monitoring phase, which occurs first, the user will be able to sample one or both insects any number of times. When all the sampling is completed, press the letter from the menu corresponding to the option: GO ON TO MANAGEMENT. During the management phase, the options are to spray insecticides, inventory the stand, check up on expenditures to date, cut the stand, or leave the program. All or none of these options can be done any number of times, until the user leaves the program or cuts the stand. With either of these choices, the user will exit the monitor/manage portion of the program. To continue growing the stand and quit management, press the letter corresponding to: 37 DO NOTHING - GO ON TO NEXT YEAR. The program will continue alternating between active years and inactive years until the user (I) exits the program during a management phase, (2) cuts the stand, or (3) lets the program run past year 70 at which time the stand must be cut. In the first case you will go back to the command line of the p-system operating system where you will have the opportunity to re—enter the program if you desire. In the last two cases you will go onto the performance evaluation portion of the program. FINAL EVALUATION OF MANAGEMENT ACTIVITIES Figure 8 is an example of the final output. The top half shows an evaluation of the economic effectiveness of the rotation taken as a whole. All costs incurred over the rotation are discounted to the year of stand initiation and subtracted from the amount gained at harvest, also discounted to the year of initiation. The value obtained (net present value) tells whether or not the money invested into this stand compared favorably with available alternative investment opportunities. The second half of the final evaluation focuses on those activities related to insect control. Costs incurred in monitoring and controlling insect populations are compared similarly to the value of wood saved to determine how the investment in insect control compared with alternative investments. A negative net present value does not necessarily mean that less money was taken in than was spent; it means that more money could have been earned had an alternative investment been chosen. 38 EVALUATION OF ALL ACTIVITIES The number of cords cut= 10.8 Discounted value for these cords= 24.55 Discounted value of costs incurred= 155.55 Net present value of the stand at planting= -l42.l0 Price of Jack pine which would be required to break even= 47.45 EVALUATION OF MONITOR AND CONTROL ACTIVITIES .—————_————-————_.————--——_———_—————————_—————~— Number of cords saved by monitor and control program= 4.5 Discounted value of these cords= 10.14 Discounted cost of monitor and spray program= 85.55 Net present value of monitor and spray program= ~75.52 RETURN Figure 8. Final evaluation of management activities chosen. 39 CONSIDERING TAXES The results obtained from this program are most applicable to jack pine stands grown by a public agency since taxes were not included. However, the results should still be of value to people from the private sector as long as they are aware of this and make appropriate adjustments for themselves. Taxes generally tend to make investments in forestry more competitive with alternate investments than they might otherwise be (R. J. Marty, I984, Michigan State University, personal communication); therefore, any set of investments which result in a marginally negative net present value may compare favorably to alternatives after considering taxes. LIST OF REFERENCES Banash, S.E. I958. White pine weevil appraisal survey. USDA Coop. Econ. Rpt. 8:87I-872. Batzer, H.O., and D.T. Jennings. I980. Numerical analysis of a jack pine budworm outbreak in dense jack pine. Environ. Entomol. 9:5I4-524. Benjamin, D.M., S.E. Banash, and RB. Stewart. l96l. Losses attributable to the jack pine budworm during l955-I957 outbreaks in Wisconsin. University of Wisconsin Forestry Research Notes No. 73. Benzie, J.W. I977. Managers handbook for jack pine in the North Central States. USDA F or. Serv. Gen. Tech. Rep. NC-32, l8 p., North Central Forest Expt. Sta., St. Paul, Minnesota. Belyea, R.M. and CR. Sullivan. I956. The white pine weevil: a review of current knowledge. For. Chron. 32:58-67. Cayford, J.H. I958. Scarifying for jack pine regeneration in Manitoba. Canada Dept. of Northern Affairs and National Res., For. Br., For. Res. Div. Tech. Note No. 66. I4 p. Cayford, J.H. I959. Germination and survival of jack pine and red pine after scarification in Southeastern Manitoba. Canada Dept. of Northern Affairs and National Res., For. Br., For. Res. Div. Tech. Note No. 79. I4 p. Chrowsciewicz, Z. I959. Controlled burning experiments on jack pine sites. Canada Dept. Northern Affairs and National Res., For. Br., For. Res. Div. Tech. Note No. 72. I9 pp. Chrowsciewicz, Z. I960. Jack pine regeneration after scattering slash an exposed mineral soil. Pulp and Paper Mag. of Canada, Woodlands Review 6|:I64- I66. 40 4T Dixon, J.C. I98l. Report on project to develop a survey manual for jack pine budworm. Dept. of Biology. University of Wisconsin, Eau Claire, Wisconsin. Foltz, J.L., Knight F.B., and D.C. Allen. I972. Numerical analysis of population fluctuations of the jack pine budworm. Ann. Entomol. Soc. Amer. 65:82- 89. Fowells, H.A. I965. Silvics of forest trees of the United States. USDA Timber Management Research. Forest Service. Agricultural Handbook No. 27l. 762 p. Graham, S.A. I935. The spruce budworm on Michigan pine. Univ. Mich., School For. and Conservation Bull. 6. Hacker, J.J., P.E. Marshall, A.E. Erickson. I983. A review of jack pine regeneration in the Lake States. Michigan State University Agric. Expt. Sta. Research Rept 443. 3| p. Krebs C.F. I972. A procedure for sampling jack pine damaged by the white pine weevil and several notes on the insect's effect on stand de-velopement. Phd Dissertation. University of Michigan. Ann Arbor, Michigan. I I9 p. Kulman, H.M., A.C. Hodson, D.P. Duncan. I963. Distribution and effects of jack pine budworm defoliation. Forest Sci. 9:I46-l57. Manetsch, T.J. I980. Systems analysis and simulation with application to economic and social systems. Part II. Michigan State University, East Lansing, Michigan. 239 p. Marty, R.J. and D.G. Mott. I964. Evaluating and scheduling white pine weevil control in the Northeast. USDA For. Serv. Res. Paper. NE—I9. 56 p. 42 Morse F.S. I958. The white pine weevil in Wisconsin jack pine plantations. Masters Thesis. University of Wisconsin. 44 p. Nyrop, J.P., J.T. Olson, D.G. Masher, and G.A. Simmons. I983. Simulation of how jack pine budworm affects economic returns from jack pine timber production in Michigan. l6:|57-l65. Sapio, F.J., R.J. Drapek, G.A. Simmons, and R.L. Murray. I985. Prediction of jack pine volume losses and plantation decline caused by the white pine weevil. Northern J. Appl. For. (in press). Zehngraff, P.J. I943. Jack pine regeneration following clearcutting on the Chippewa National Forest. J. For. 4|:l22-I25. APPENDIX A A Listing of the Program 43 (*$s++*) PROGRAM BANKSIANA; USES SCREENOPS, (*SU RD.LIBRARY *) UTILITIES,RANDOM_NUMBER_GENERATORS; (*SI DISKBIDECLAR.TEXT *) (*$I DISKBIAUTO.TEXT *) (*SI DISK3 COST.TEXT *) («$1 DISKBZPREP.TEKT *3 (*$I DISKBiINITBIOL.TEXT *) (*$I DISK3 INIT.TEXT *) (*$I DISKBiSPRAY.TEXT *) (*SI DISK3 MANAGE.TEXT *) (*SI DISK3 MONITOR.TEXT *) (*$I DISK3 SETPEST.TEXT *) (*SI DISK3 MAIN.TEXT *) END. 44 (eeoeeeeeeeeeeeoee DECLAR_TEXT eeseeeeeeseeooeeeee) TYPE INSECT_TYPE - (BUDWORM,UEEVIL); METHOD_TYPE ' (AERIAL,GROUND); SPRAY_TYPE - (CHEMICAL,BIOLOGICAL); FUNC_ROLE * (SLOPE.INTERCEPT): VAR ACTIVITYzSTRlNGI20l; AIR_SEED_COST=REAL; AUTOrBOOLEAN; 8A_U_CONTROL:REAL: BA_UO_CONTROL=REAL; BlDzREAL; BUD_COUNT:INTEGER; BUD_TABLE=ARRAY [1..5,l. BURN=800LEAN; BURN_COST=REAL; Bwl_wO_CONTROL=REAL; BUI_N_CONTROL:REAL; BUZ_UO_CONTROL:REAL; 802_U_CONTROL=REAL; evs_uo_00NTR0L=REALa BU3_U_CONTROL=REAL; BU_CHECK=INTEGER: BU_HON_PLAN:STRIN6[141: BU_PLAN=STRIN6[81: BU_SPRAY_TYPE=CHAR; CP_SEED_COST=REAL: CH=CHAR3 CHECKleTEGER: CHOP_COST=REAL: CONTROL_COSTS:REAL; COSTS:REAL; COSTSINzTEXT: COSTSOUT:TEXT; COUNTYR=INTEGER; COROS_U_CONTROL=REAL; CORDS_UO_CONTROL=REAL; CUTzBOOLEAN; DISCOUNTzREAL: END_BU_PLAN:INTE6ER; END_UV_PLAN:INTE6ER. FIRST_UEEV=REAL; HEIGHTrREAL; HERB_COST=REAL; HERBICIDE=BOOLEAN; HIT_0X_U_CONTROL=REAL: HIT_0X_UO_CONTROL=REAL; HIT_1X_wO_CONTROL:REAL: HIT_2X_uO_CONTROL:REAL; HIT_3X_UO_CONTROL=REAL; (e (e (a (e (e (e (e Holds description of each mgmnt activity Cost per acre to spread seed by air Determines run interactive or automatic Basal area of stand with control program 8. A. of stand with no control program Monetary offer given to cut the stand DeterMines when to sample or manage JPBU .31 OF REAL; (e (e (e (e (e (e (e (e (e (e (e (e (e (e (e (a (e (e (e (e (a (e (e (e (e (e (e (e (e (e (e (e (e (e (e (e (a Table holding growth loss proportions Determines if burn was used in site prep Cost per acre to burn Budworm this yr in stand without control Budworm this yr in stand with control Budworm last yr in stand without control Budworm last yr in stand with control Bworm 2 yrs ago in stand without control Budworm 2 yrs ago in stand with control In auto. determines when to check bworm Describes plan in auto to monitor bw Describes general plan for bw in auto Determines in auto choice of spray, bw Cost per acre to seed with corn planter Used. various parts of program for input Num yrs to stand inspection. interactive Cost per acre to run a roller chopper Summation of control costs discounted Summation of all costs discounted Text file retain costs for future info 2nd file as above allows manipulations Years since initial year Cards in stand with control measures Cards in stand with no control measures Determines if the stand has been cut Discount rate used 0) In auto, yr to stop bw related actiVitiesO) In auto. yr to stop wv related aCIlVlIICS') Initial weeVil level Tree height Cost per acre to apply a herbic1de Determines if herbicide was used Prop. trees not hit by uncontrolled wv Prop. trees not hit by controlled weevil Prop. trees hit 1X by uncontrolled wv .) .) o) o) -> .) 0) Prop. trees hit 2X by uncontrolled weevil.) Prop. trees hit 3X by uncontrolled weeVilO) 115 HIT_4X_wO_CONTROL REAL; (0 Prop. trees hit 4X by uncontrolled weevils) HIT_1X_U_CONTROLIREHL; (9 Prop. trees hit IX by controlled wCEVIl a) HIT_2X_U_CONTROL REAL; (- Prop. trees hit 2X by controlled weevil -) HIT_3X_U_CONTROL:REAL; (0 Prop. trees hit 3X by controlled weeVil 0 HIT_4X_U_CONTROL:REAL: (0 Prop. trees hit 4X by controlled weeVil 0 HND_PLANT_COST:REAL; (s Cost per acre to plant by hand 0 IS_IT_CONTROL:BOOLEAN; (0 Used to determine if cost is control costs LASTBUDUORMzINTEGER; LASTUEEUzREhL; LG_LARU_LEU:REAL; LOP_SCATTER:BOOLEAN; MHC_PLANT_COST=REAL: NEXTBUDUORMtINTEGER; N_TRS_U_CONTROL:REAL; N_TRS_UO_CONTROL2REAL; NUMACRESIINTEGER. NUHEXPENDITUPES=INTEGER;(o PLANT_HETHOD:STRIN6[24I;(0 PRICEIREAL; P_6RO_W_CONTROL¢REHL; P_6RO_UO_CONTROL:REAL; P_LIUE_U_CONTROL=REAL; P_LIUE_UO_CONTROL=REAL; PRESENT_UALUE=REAL; QUANTITY=REALz RAN_0R_DET=STRING[10]: READIN=STRIN6[16]; READOUT=STRINGI161s ROLLERCHOP=BOOLEflNs ROTATION=INTEGER3 SAHP_LflRGE=BOOLEAN; SCARIFY=BOOLEANs SCHR_COST=REAL: SCOUT_UAGE:REAL: SITEINDEX:INTEGER: SM_LARU_LEU=REflL; SPRAY_BUD=800LEAN; SPRAY_COST=ARRAY IBUDUORM..UEEUIL. Years since last budworm Outbreak weevil level which will occur yr 20 (a (o In auto. 0 Determines if a lop and scatter was done 0 Cost per acre to machine plant Years to next budworm outbreak in stand being controlled in stand not being controlled number ot acres in the stand Number of expenditures undertaken Nat regen vs seeding vs planting Cost of each management activity Proportion potential growth with control Prop. potential growth with no control Prop. original trees alive with control Prop. original trees alive no control Cost of any activity at time it is done Number of units of mgmt activity done Random or determined run File name to be used to read File name to be used to read Determines if rollerchop was used In auto. determines rotation length In auto. determines if sample Inge bw Notes if scarification was done Cost per acre to scarify wage of pest scout Stand site index In auto. sample level small 0 Num trees ' Num trees 2° Holds the costs into (I (a (o (o (o (e (o (e (o (o SLOPE..INTERCEPTI OF REAL; SPRRY_UU:BOOLEAN; START_BU_PLAN:INTE6ER; START_UU_PLAN:INTEGER; TECH_UAGE:REAL; T066LE=800LEAN; TREE_AGE:INTE6ER; USER:STRING[18]; UALUE_DISCOUNTED:REAL; wEEU_CHECK=INTEGER; wEEv_COUNT:INTEGER; wEEU_PLAN:STRIN6[81; UEEV~SPRAY2800LEANs wEEU_LEUEL=STRING[8]; wa_w_CONTROL:REAL; (0 Costs assOCiated with pesticide sprays (- Notes whether weevil has been sprayed If in auto: year to start budworm plan If in auto: year to start weeVil plan wage of forest technician Used for cost file manipulation How old the trees are. POint of View of user Not Used' Used to hold values of costs discounted If in auto= If auto: to see when weev check reached Auto: how weevil will be dealt with To show that weevil has been sprayed Low moderate high or extreme weevil level on controlled stands (a (o (o (a ( a lge bw sample merits more action- bw to go on C vvvvvvvvvvvvvvvvvv . V O) O) *) s) 0) costs out of.) 9) O) I) 0) O) 0) .) s) 0) AERIAL..GROUND. CHEMICAL..BIOLOGICAL. 0) O) s) 9) 9) O) 0) O) 0) num yrs between weeVil checks.) 0) 0) 0) 0) 0) 46 HIT_4X_UO_CONTROL REAL; (f Prop. trees hit 4X by uncontrolled weevils) HIT_1X_U_CONTROL:REAL; (0 Prop. trees hit lX by controlled weevil 0) HIT_2X_U_CONTROL=REAL: (- Prop. trees hit 2X by controlled weevil 0) HIT_3X_U_CONTROL=REAL; (0 Prop. trees hit 3X by controlled weevil 0) HIT_4X_U_CONTROL=REAL: (0 Prop. trees hit 4X by controlled weevil 0) HND_PLANT_COST:REAL; (0 Cost per acre to plant by hand 0) lS_lT_CONTROL BOOLEAN; (0 Used to determine if cost is control cost0> LASTBUDUORH:INTEGER: (0 Years since last budworm outbreak 0) LASTUEEU REAL; (0 Ueevil level which will occur yr 20 0) L6_LARU_LEU:REAL; (0 ln auto. lge bw sample merits more action.) LOP_SCATTER BOOLEAN; (0 Determines if a lop and scatter was done 0) HAC_PLANT_COST-REAL: (0 Cost per acre to machine plant 0) NEXTBUDUORM-INTEGER; (0 Years to next budworm outbreak 0) N_TRS_U_CONTROL:REAL; (0 Num trees in stand being controlled 0) N_TRS_UO_CONTROL:REAL; (0 Num trees in stand not being controlled 0) NUMACRES INTEGER; (0 Holds the number of acres in the stand 0) NUHEXPENDlTURES:INTEGER;(0 Number of expenditures undertaken 0) PLANT_HETHOD=STRINGI24ls<0 Nat regen vs seeding vs planting .) PRICE=REfiLz (- Cost of each management activity 0) P_GRO-U_CONTROL=REAL; (0 Proportion potential growth with control 0) P_6RO-UO_CONTROL2REAL; (0 Prop. potential growth with no control 0) P_LIUE_U_CONTROL=REAL; (0 Prop. original trees alive with control 0) P_LlUE_U0_CONTROL:REAL; (0 Prop. original trees alive no control 0) PRESENT_UALUE=REAL; (0 Cost of any activity at time it is done 0) 0UflNTlTY=REhL: (0 Number of units of mgmt activity done 0) RAN_0R_DET=STRING[10): (0 Random or determined run 0) READIN=STRINGI161= is File name to be used to read costs into 0) READOUTISTRINGIISI: (0 File name to be used to read costs out ofO) ROLLERCHOPzBOOLEAN; (0 Determines if rollerchop was used 0) ROTATION:INTEBER; (0 In auto. determines rotation length 0) SAHP_LAR6E=BOOLEAN; (0 In auto. determines if sample lrge bw 0) SCARIFY:800LEAN; (0 Notes if scarification was done 0) SCAR_COST:REAL; (0 Cost per acre to scarify 0) SCOUT_UAGE=REAL: (0 wage of pest scout 0) SITEINDEX INTEGER; (I Stand site index 0) SH_LARV_LEU=RERL: (0 In auto. sample level small bw to go on 0) SPRAY_BUD=BOOLEAN; (0 0) SPRAY_COST=6RRAY [BUDUORH..UEEVIL. AERIAL..GROUND. CHEHICflL..BIOLOGICAL. SLOPE..INTERCEPT] OF REAL: (0 Costs associated with pesticxde sprays 0) SPRAY_UU BOOLEAN: (0 Notes whether weevil has been sprayed 0) START_BU_PLAN=INIEGER; is If in auto: year to start budworm plan 0) START_UU_PLAN=INTEGER; (0 If in auto= year to start weevil plan 0) TECH_UAGE2RE&L; (0 wage of forest technician 0) TOGGLE=BOOLEANz (0 Used for cost file manipulation 0) TREE_AGE=INTEGER; (0 How old the trees are. 0) USER'STRINGIIBI: (0 POint of view of user ... Not UsedI 0) VALUE_DISCOUNTED'PEAL; (0 Used to hold values of costs discounted 0) wEEU_CHECK INTEGER; (0 If in auto: num yrs between weevil checks.) UEEU_COUNT INTEGER; (0 lf auto= to see when weev check reached 0) wEEU_PLAN:STRlN6[8]; (0 Auto: how weeVil will be dealt with 0) wEEU_SPRAY=BOOLEAN; (0 To show that weevil has been sprayed 0) UEEU_LEUELrSTRlNG(8]; (0 Low moderate high or extreme 0) 0) UPw_U_CONTROL REAL; (0 weevil level on controlled stands 47 UPU_UO_CONTROL:REAL; (0 weeVil leVil on uncontrolled stands 0) wU_LEU=REAL; (0 HutO’ what weevil level before will spray.) UU_SPRAY_TYPE=CHAR; (0 Auto: pestiCide application for weevil 0) YEAR_OF_OUTBREAK:INTEGER;(' which year into budworm outbreak this 15‘) YEAR_OF_TRANSACTION1INTEGER:(' Year of each maragerent act;Vity '5 483 (O eeeeeseeese AUTO.TEXT seeseeassosos e) SEGMENT PROCEDURE AUTO_CHOICE; (COQOOfifiOOOCDQO‘CCOOOOOOQO‘DQOOO!00.9.0000...QUODOOOIOCOO'OOOOQOOOCDOCO. ' -Called from UELCOME. s i -This procedure determines whether the program will run . ' interactively or automatically. 0 eeeeoaseoesseeeesseseseeeseseeoeesseaeeesssossseeeeesoeeeessaeeeeesses) UAR CH=CHAR: OKzBOOLEAN; PROCEDURE SET_AUTO: (IOGOOOOOOOD.DOCQ. '5'.70.12.LG_LARU_LEU.3.1l; FILL_FIELD(lS.7.460.‘ '); END ELSE BEGIN SAMP_LARGE==FALSE; REAL_PROMPT(IS.7.CONCAT(‘If budworm counts from the over-‘. ‘winter larval surveySare higher than 7.7. then apply'. ' control measures.$ Enter a value.$‘. ' (NOTE=Sample values in the program will rangeS'. ‘ from 0.0 - 7.0 larvae per 18 inch branch )‘). 'S'.70.12.SH_LARU_LEU.3.1): FILL_FIELD(IS.7.460.‘ '): END; END; (G bw mon plan 0) PROCEDURE SET_BU‘SPRAY_TYPE; (O.CO0.0..OOIOCOOOOOIOOOI......I.99}...OOCOOOCDDQOOOOOOOIOOIO'90... O -Called from SET_BU_PLAN. ' ' -Determines type of pesticide to be used against budworm. O QC.OGOOOOOIOOGGOIOCOOOOOI§OCGOCOOOOQQOOOIO.ICQfiiiiQOOOlOOOOOOOOOli) BEGIN CH2:-CH_PROHPT(lS.5.CONCAT(‘Choose from below the type of spray '. ‘operation which will be used.$A) Aerial application / '. 'Chemical pesticideSB) Aerial application / Biological ’. 'pesticidaSC) Ground application / Chemical pesticidet'. '0) Ground application / Biological pesticide‘).‘$‘.75.l0. I'A'.'a'.‘B‘.‘b‘.'C’.‘c'.‘D‘.'d'l): CAP(CH2): BU_SPRAY_TYPE:-CH2: FILL_FIELD(15.6.BS.' '>; FILL_FIELD(15.7.60.' '); FILL_FIELD(15.8.SB.‘ '); FILL_FIELD(lS.9.BS.' '): FILL_FIELD(lS.l0.66.' '); END; (9 of set bw spray type e) PROCEDURE SET_YRS_BU_PLAN; (O............OOCOOOOOOIOOO0......5.0.0....OOOOOCOOOOOOOGOOOOOOOOOO ' -Called from SET_BU_PLAN. O s -Determines what years to start and stop budworm plan. - I0.00.0.0...OOOOOOCOOOOOOOOOOOO9.0.0.00...0.0.0.0000...09.00.0000.) BEGIN 50 REPEAT INT_PROMPT(IS.7.'Uhat year will we start this plan from7' .‘S'.SS.7.START_BU_PLAN.2); UNTIL (START_BU_PLAN >-0 ) AND (START_Bw_PLAN < 70): REPEAT INT_PROMPT(lS.7.‘Uhat year will we end this plan?‘ .'5'.SS.7.ENO_BU_PLAN.2); UNTIL (END_BU_PLAN > START_Bw_PLAN) AND (END_BU_PLAN <- 70); FILL_FIELD(15.7.SS.‘ '); END; (i of set bw plan yrs 0) PROCEDURE BU_PLAN‘URITEUP: (DOD9.0.0.0.........OCCOOOOOOOQICOOIOIIOOIIGOOIOCODQOOOI00.0.0.0... 0 -Called from SET_BU_PLAN s ' -Urites out budworm management plan on the screen. - OI.......O...IIICCCOOOOOOOOOOOOOOIIOOOOOOOOOIOOOOOQOIDOOOIOOIQIOOO) BEGIN IF (CH1 - 'M') THEN BEGIN GOTOXY(IS.S); URITELNtBU_HON_PLAN); IF (BU_HON_PLAN - 'Every 7? yrs') THEN BEGIN FILL_FIELD(21.G.2.‘ ’); GOTOXY(21.6); URITELNIBU_CHECK); END; IF SAH_LARPGETHEN BEGI N 60TOXY(15.7); URITELN('If more than ’.SN_LARU_LEU=3=I.’ in winter survey '. 'go on.‘): GOTOXYtUS.B); URITELNt‘If more than ‘.LG_LARU_LEU=4:1.’ in late survey than '. 'spray‘); GOTOXY; END: END ELSE BEGIN GOTOXY<15.7); URITELN('Starting from year '.START_BU_PLAN 2.‘ and ending at year '. END_BU_PLAN=2): END; CASE BU_SPRAY_TYPE OF ‘A' IF (CHI-‘5') THEN URITE_STRING(lS.S.‘Aerial application/Chemical pesticide‘.37) 51 ELSE URITE_STRING(IS.B.'Aerial 'B‘=IF (CHl='S’) THEN URITE_STRING(IS.B.'Aerial ELSE URITE_STRING(IS.9.‘Aerial 'C' IF (CHls'S’i THEN URITE_STRING(lS.S.'Ground ELSE URITE_STRING(lS.E.'Ground ‘D'tIF (CHI=’S') THEN URITE_STRING(IS.E.'Ground ELSE URITE_STRING(IS.6.‘Ground END: (0 Case 0) END; PROCEDURE SET_BU_PLAN; application/Chemical pestiCide’.37); application/Biological pesticide‘.39) application/Biological pesticide‘.39); application/Chemical pesticide'.37) application/Chemical pesticide‘.37); application/Biological pesticide‘.39) application/Biological pestiCide'.3B>: (0 of bw plan writeup 0) (.........OGGOOOOCOIOOOOOCIQO0.0.9.900...OOIOOIIOOOOQOIOOOQQO0.0... - -Called from SET_AUTO 0 -Sets up a plan to manage the stand for jack pine budworm 0 GO...COCO...OGODOOIOOQOOOOCDOOOI0.00IDOOOOOGQOOIGOIOIQOO..IOOOOOOO) BEGIN FILL_FIELD(I.1.80.‘ '); URITE_STRING(I.1.‘Uhich way will you handle budworm?'.34); FILL_FIELD(25.S.4SS.‘ '); CHI:-CH_PROHPT(ZS.S.CONCAT(‘Ilgnore them. Slpray only. or ‘. 'Hlonitor and spray').’6'.37. CAPtCHl); CASE CHI 0F 'I'=BEGIN FILL_FIELD(37.S.36,‘ BU_PLAN=-‘Ignore‘; END; ‘S'=BEGIN FILL_FIELD(25.S.48.' ‘); ‘); 1.[911'01I.OS'.ISU‘IH1.'MVJ); OTGOXY(ZS.S); URITELN('Spray whenever an outbreak occurrs.'); BU_PLAN:-‘Spray': END: ’M‘tSET_BU_MON_PLAN; END: (9 of case 0) IF (CHI-‘5‘) 0R (CHI-'N') THEN BEGIN SET_BU_SPRAY_TYPE: SET_YRS_BU_PLAN; BU_PLAN_URITEUP; END: END; PROCEDURE UU_PLAN_URITEUP: (' of Set budworm plan 0) 70) THEN BEGIN GOTOXY(I.I); URITELN('¢"*"'O*| ERROR. TRY AGAIN 00-0'000000000‘): PAUSE(I); END; UNTIL (ROTATION(-70) AND (ROTATION>20); FILL_FIELD(I.I.AS.' '); GOTOXY(28.19); URITELNtROTATION): 54 END; BEGIN (0 set auto .) BU_SPRAY_TYPE=-'A‘; BU_PLAN:-‘Ignore‘; BU_HON_PLAN==‘During outbrks‘; BU_CHECK==I; START_BU_PLAN==I; END_BU_PLAN=-70; SH_LARU_LEU==0.0; LG_LARU_LEU:-3.0; SAMP_LARGE==TRUE; UEEU_PLAN:=‘Ignore‘; UEEU_CHECK:=I; UU_SPRAY_TYPE:=’A‘; UV_LEU:-20.0; START_UU_PLAN:-3; END_UU_PLAN==20; ROTATION=-40; PAGE(0UTPUT): GOTOXY(S.3); URITELN(‘JACK PINE BUDUORM AND UHITE PINE UEEUIL MONITORING AND . ‘CONTROL PLAN’): 60TOXY(S.4); URITELNt' ’ ......... ’); GOTOXY(I0.S); ‘ URITELN('B)udworm plan: (Default - ignore budworm)’); GOTOXY(10.13); URITELNt'U)eeviI plan: (Default - ignore weevil)'): GOTOXY(10.IS): URITELN(’R)otation length: years‘); GOTOXY(28.lB); URITELN(ROTATION=Z); GOTOXY(1.21); URITELN(‘G)o on to the next part of the program‘); REPEAT CH=-CH_PROHPT(I.I.'Budworm7 weeVil? Rotation? or Go on to next part?“ .‘S‘.70.1.['b‘.‘B'.‘w‘.‘U'.’r'.‘R‘.‘g‘.'G'l); CAP(CH); CASE CH OF ‘B‘tSET_BU_PLAN; ‘U‘iSET_UU_PLAN; ‘R‘:SET_ROTATION. 'G‘z; END; (0 of case s) UNTIL (CH-‘6‘): SCREEN_NASK(‘84=HASKI.TEXT'.OK); URITE_STRING(ZS.3.USER.18); URITE_STRING(24.5.RAN_OR_DET.l0); URITE_INT(39.7.NUH_ACRES.3); URITE_INT(33.9.SITE_INDEX.2)3 URITE_REAL(40.II.DISCOUNT.5.2); 55 URITE_STRING(3S.IS.UEEV_LEUEL.8>; END; (s of set auto 0) BEGIN (s of auto choice i) CH -CH_PROMPT(0.0.'A)utomatic management '3‘.S0.0.[‘A'.‘a'.‘I'.‘i‘]); CAPand plant') .O".53’@’[IN9.0nO"S"'sI..AV'IAC'QM"OMI'IH'.'hI]>; CAP(CHl); CASE CH1 OF 'N': PLANT _METHOD=-'Natural regeneration': ‘8': BEGIN PLANT METHOD -’Seed with a corn plantar' ; REAL_ PROMPT(0. 0. CONCAT(' Using a corn planter costs ---.-- ' ’dollars an acre. (Return- 0K. else enter cost)') .‘6'.27.0.CP_SEED_COST. 6. 2); END; 'A’=BEGIN PLANT_METHOD=-'Aerial seed‘; REAL_PROMPT(0.0.CONCAT('Aerial seeding costs ---.-- dollars an '. 'acre. (Return - 0K. else enter cost)') .‘S’.21.0.AIR_SEED_COST.G.2); END; ’M'=BEGIN PLANT_METHOD -'Machine plant'; REAL_PROMPT(0.0.CONCAT('Machine planting costs ---.-— dollars '. ’an acre. (Return - OK. else enter cost)') .‘S’.23.0.MAC_PLANT_COST.G.2); END; 'H‘=BEGIN PLANT_METHOD:¢'Hand plant‘; REAL_PROMPT(0.0.CONCAT('Hand planting costs ---.-- dollars an '. 'acre. (Return - OK. else enter cost)') .’S‘.20.@.HND_PLANT_COST.5.2): END; END; (0 CASE ') URITE_STRING(36.14.PLANT_METHOD.24); FILL_FIELD(20.15.30.‘ '); FILL_FIELD(26.IG.30.‘ ‘); 64 FILL_FIELD(2@.17.30.' ‘); FILL_FIELD(20.18.30.' '); FILL_FIELD(ZO.19,30.' '); END; (0 REGENIT 0) BEGIN SCREEN_MASK(‘84tMASK3.TEXT'.OK); URITE_STRING(18.4,'No’.3); URITE_STRING(23.E.'NO’.3); wRITE_STRING(29.8.‘No‘.3>: URITE_STRING(21.10.’N0’.3); URITE_STRING(24.12.‘N0’.3); DRITE_STRING(3G.14.PLANT_METHOD.24); REPEAT INT21=2;INT3==1; INT_PROMPT(0.®.CONCAT('Uhich of the items listed below do you want ’. 'to change7').‘$‘.SE.O.INT2.1); CASE INTZ OF =BURNIT; :HERBIT; =LOPIT; =SCARIT: =ROLLIT: =REGENIT; END; (0 CASE 0) UNTIL (INTZ-7); SCREEN_HASK('84=HASK1.TEXT'.OK); URITE_STRING(25.3.USER.18); URITE_STRING(24.5.RAN_OR_DET.16)3 URITE_INT(39.7.NUH_ACRES.3)3 URITE_INT(33.9.SITE_INDEX.2)3 URITE_REAL(40.11.DISCOUNT.5.2); URITE_STRING(3S.15.UEEU_LEUEL.8); END; (0 OF PREP_CHOICE ') mm¢blNH 65 (eeoooeeooeeeoeeeosne INITBIOL,TEXT oesoeeeeeeeeeeeoeeeoe) SEGMENT PROCEDURE INIT_BIOL; PROCEDURE UP_COSTS; (O'COOIOIGOOOO9.00.00.00.99...0.0.0.000...9......OOOOOIOOOOQOIQOOOOOQ * ~Called from several procedures within INIT_BIOL - ' ~Updetes a file containing a record of all costs incurred. ' ' Items recorded in this file include year of transaction. 0 * activity performed. present cost. and discounted cost. - .OIOOOODOOOIOCOOOIIOIOOOIO.....OGOQOIOOOIOOOIOIOOOOOOOOOOIOOOCQOOOQO) UAR D_RATE:REAL; BEGIN NUM_EXPENDITURES==NUM_EXPENDITURES + l; D_RATE =1 + DISCOUNT/100; PRESENT_UALUE==PRICE°0UANTITY; VALUE_DISCOUNTED:=PRESENT_UALUE/EXP(COUNTYROLN THEN IF (RAN_OR_DET = ’Random‘) THEN N_TRS_H_CONTROL:-(RANDOM_INTEGER(600) + 300.0) ELSE N_TRS_N_CONTROL:=600.0 ELSE IF (ROLLERCHOP) THEN IF (RAN_OR_DET - 'Random') THEN N_TRS_U_CONTROL:-(RANDOM_INTEGER<800) + 100.0) ELSE N_TRS_U_CONTROL:=S00.0 ELSE 1F (RAN_OR_DET = 'Random‘) THEN N_TRS_u_CONTROL== 1.0 ' RANDOM_INTEGER(400> ELSE N_TRS_U_CONTROL -200.0; IF (N_TRS_U_CONTROL<600.0) THEN BEGIN PAGE(0UTPUT): URITE_LONG_STRING(10.8.CONCAT(' It is now year 2 and a '. 'recent inspection$of this stand has revealed that ‘. 'i nadeouate regenerationShas occurred.$‘. ’ You will now have to hand plant the standS‘. ’to get it up to full stocking.’).’$'); PAUSE(S): COUNTYR=-2; (e The following equation assumes that 280 seedlings can be planted in an hour. Scout wage is used because it would be too expensive to employ forest techs for such menial labor. 0) PRICE -(900.0 - N_TRS_U_CONTROL)/280'SCOUT_UAGE; OUANTITY==lz ACTIVITY=-' ..... HAND PLANT ..... '3 UP_COSTS; PLANT_NETHOD=-'Hand plant'; N_TRS-U_CONTROL=-S00.0; END; IF (N_TRS_U_CONTROL>2000.0) THEN BEGIN PAGE(0UTPUT): URITE_LONG_STRING(15.8.CONCAT(' It is new year 2 and a '. 'recent inspectionSof the stand has revealed that '. 'excessive regenerationShas occurred. ‘. ‘You now must clean the stand$‘).'$'); COUNTYR3=2; PAUSE<6>z N_TRS_U_CONTROL=-S00.0; PRICEl-SCAR_COST; 0UANTITY:=1: ACTIVITY -‘...CLEAN THE STAND..‘; UP_COSTS; END; END: (0 of natural 0) PROCEDURE CORN_PLANTER; 67 THEN NUM_TREES_U_CONTROL:=RANDOM_INTEGER(800) + 100 ELSE NUM_TREES_U_CONTROL==S00 ELSE IF (RAN_0R_DET = 'Random‘) THEN NUM_TREES_U_CONTROL=-RANDOM_INTEGER(B00) ELSE NUM_TREES_U_CONTROL==300; IF (N_TRS_U_CONTROL ELSE NUM_TREES_U_CONTROL=-400 ELSE IF (RAN_0R_DET - 'Random‘) THEN NUM_TREES_U_CONTROL:-RANDOM_INTEGER(S00) ELSE NUM_TREES_U_CONTROLz-250; END ELSE IF (CH-'P’) THEN BEGIN COUNTYR -COUNTYR + 1; PRICE=-HND_PLANT_COST: QUANTITY -1: ACTIVITY=-‘.....HANO PLANT ..... '; UP_COSTS; N_TRS_U_CONTROL=*900.0; PLANT_NETHOD=-'Hand plant'; END; UNTIL (N_TRS_U_CONTROL>600.0); END: <. AIRPLANE .) BEGIN QUANTITY:-l; 6S) PRICEt=0a IF BURN THEN PRICE==PRICE + BURN_COST'NUN‘ACRES; IF ROLLERCHOP THEN PRICE -PRICE + CHOP_COST0NUN‘ACRES; IF HERBICIDE THEN PRICEr-PRICE + HERBLCOST'NUN-ACRES3 IF SCARIFY THEN PRICE==PRICE + SCAR_COST0NUH_ACRES; IF LOP_SCATTER THEN PRICE -PRICE + SCOUT_UAGE9NUN_ACRES; ACTIUITY==‘..SITE PREPARATION..‘; UP_COSTS; IF (PLANT_NETHOD - ‘Natural regeneration‘) THEN NATURAL ELSE IF (PLANT_METHOD - 'Seed with a corn plantar') THEN CORN_PLANTER ELSE IF (PLANT_NETHOD --'Aerial seed‘) THEN AIRPLANE ELSE IF (PLANT_METHOD = 'Hachine plant') THEN BEGIN PRICE =MAC_PLANT_COST; DUANTITY==1; ACTIVITY ='....MACHINE PLANT...'; UP_COSTS; N_TRS_U_CONTROL:=S00.0; END ELSE BEGIN PRICE =HND_PLANT_COST; QUANTITY =1; ACTIVITY:=‘ ..... HAND PLANT ..... ‘; UP_COSTS; N_TRS_U_CONTROL:-900.0; END; IF (PLANT_HETHOD-‘Natural regeneration‘) OR (PLANT_HETHOD-‘Aerial seed') 0R (PLANT_HETHOD-'Seed with a corn planter‘) THEN COUNTYR=-COUNTYR + 2; TREE_AGE=-2; N_TRS_UD_CONTROL=-N_TRS_U_CONTROL; PAGE(0UTPUT): GOTDXY(10.9); URITELN(’ It is now year ‘.COUNTYR 2.‘ and an average of ‘. N_TRS_U_CONTROL:7=1); 60TOXY(10.10); URITELN(‘ seedlings per acre are growing on your stand.'); PAUSE(B); END; (0 OF PLANT 0) PROCEDURE SETBUDUORN ; (QfiifiiiOQDOOOOOOOGOOOQOU0.0.9....Q.QCQ0000.0IOODOGIOOQOIOOOQOOOQOOQQ ' -Called from INITBIOL ' ' -Determines if a budworm outbreak is occurring at the start. If ' not. then year when 1st outbreak will occur is deterMIned. 00.0.0.0.GO0.0IOOOOQQOOOOOOifOOOOOQOQCI09¢......QDOOOQODOOQOOOOQOGOO) UAR TEMPINT:INTEGER; LOYRS=INTEGER; BEGIN BU1_U_CONTROL:-0.0; BU1_UO_CONTROL=-0.0a Bu2_u_CONTROL=-0.0s BUZ_UO_CONTROL=-0.0; 7O BU3_U_CONTROL:=0.0: BU3_UO_CONTROL==0.0; IF (RAN_0R_DET - ’Random‘) THEN LOYRS ‘RANDOM_INTEGER(10) ELSE LOYRS=-S; IF (LOYRS (= 3) THEN BEGIN YEAR_0F_0UTBREAK==LOYRS + 1; NEXTBUDUORN:=0; LASTBUDUORM==0; END ELSE BEGIN YEAR_0F_0UTBREAK:=0: NEXTBUDUORM=-LOYRS - 3: LASTBUDUORM==7 - NEXTBUDUORM; END; END; ('OF SETBUDUORMS) PROCEDURE SETUEEVIL: (f...‘.......l§§..§.§§iOQQDQODDQ......I’QOIIOOQQGIQOQOICOQIIODIQOCOOQQ 0 -Called from INITBIOL 9 0 -Determines what the weevil levels will be like for the rest of 0 a the run. Depending on what weevil level was chosen by the user G s will randomly select the final weevil level to which weevil ' 0 populations will climb. 9 ...QQQQCDO....QOQOIOQOQOQOOQOOGIOO...I)...i.OOQOOOOIIOOQDQOIIGOOCQOOC UAR TEHPINT=INTEGERT TEMPREAL=REAL3 CH=CHAR; h ) BEGIN UPU_U_CONTROL=-0.0; UPU_UO,CONTROL=-0.0; FIRST_UEEUIL=-0.0; IF (UEEV_LEUEL"low‘) THEN IF (RAN_0R_DET - 'Random') THEN LASTUEEUr'RANDOM_INTEGER(S) ELSE LAST_UEEU=‘2 ELSE IF (UEEU_LEUEL='moderate') THEN IF (RAN_0R_DET - ‘Random‘) THEN LASTUEEUr-RANDON_INTEGER(S) + S ELSE LAST_UEEU=-7 ELSE IF (UEEU_LEVEL-'high') THEN IF (RAN_0R_DET - 'Random‘) THEN LASTUEEU=-RANDOM_INTEGER(l0) + 10 ELSE LAST_UEEU=-13 ELSE IF (RAN_0R_DET s ‘Random‘) THEN LASTUEEUz-RANDDM_INTEGER(80) + 20 ELSE LAST_UEEU:-46 END; (9 0F SETUEEVIL *) PROCEDURE SETCHECK; (OCQQOCCOQCQQOQOQQOOOC...OOCOIOCOQOOIOIOQOOD.C....OOOOOODOQOOOOOIOIOQ ' -Called from INITBIOL ‘ 0 -If not auto. determines when next inspection of stand will be. 0 ..O...‘..0.0G§.C0.00DOOGGOOOOOOOOOOOOCOOO0.0COOIOOOOOOOQQOOOOOQOOOOO) 7T BEGIN IF (NOT AUTO) THEN BEGIN PAGE(0UTPUT); GOTOXY(S0.0);URITELN(‘Year = '.COUNTYR 2); GOTOXY(50.1);URITELN('8 Acres : '.NUN_ACRES 2); GOTOXY-l0) AND (NUH_ACRES<-999); URITE_INT(39,7.NUH_ACRES.3); END; (0 of acre choice .) PROCEDURE SI_CHOICE; (OOQDDQQOQIIQO.DOIIDIOOIOQQOOQOODOOOQC.OOOIOQDIICIQOQQOQOOOOIOOIIOOIO * -Called from WELCOME ' 9 -Allows user to set the site index of the stand. ' 99.0.9!....QQOIOOOOOIOIIOOIOOOCOCQQ.{GQOCOOQCQIGOOOQCIIQIOOGIOQOO...) BEGIN REPEAT INT_PROMPT(0.0.‘Site index (45 - 50):‘.'$‘.23.0.SITE_INDEX.2); UNTIL (SITE_INDEX>=AS) AND (SITE_INDEX(=60); URITE_INT(33.8.SITE_INDEX.2); END; PROCEDURE RATE_CHOICE; (O.C0.00CIGCOCOIOQQIGOOOGGOO......IO...IOOOOQOOOOOODOOOOOQ.IOOOOOOOQO ‘ -Called from UELCOHE ' ' -Allows the user to set the discount rate. ° OOOCOODQOCOOCQGQQO0.0D...OCOOQOQQGOIQOOOOOOQOOOOOOQODOOOG.0.9.0.0000) BEGIN 74 REPEAT REAL_PROMPTi0.0.'Discount rate Z (0.0 - lS.0)z‘.‘$‘. 30.0.DISCOUNT.B.2); UNTIL (DISCOUNT>-0.0) AND (DISCOUNT<-15.0); URITE_REAL(40.ll.DISCOUNT.6.2); END; (0 OF RATE_CHOICE e) PROCEDURE UEEU_CHOICE; <...O...0.0009090009900005ICIO.......OQOIOOOCIODOOIOOIOOOOIIQ0.00.0.9 9 -Allows user to set initial weevil levels. ’ CB............Q..........OOOGI......OO...IOOQOOQIQOOOOOOQO0.09.90...) UAR INTZ INTEGER; BEGIN INT22=2; INT_PROMPT(0.0.CONCAT('Ueevils: l)Low (0-SZ) 2)Moderate‘. ‘ (6-l0Z) 3)High (ll-20%) 4)Extreme (>20Z)‘). ‘S'.7S.0.INT2.l); CASE INTZ OF l=UEEU_LEUEL=-‘low‘; 2=UEEU_LEUEL=-‘moderate‘; 3=UEEU_LEUEL=-’high‘; 42UEEU_LEUEL=-'extreme’; END; (OCASEG) URITE_STRIN6(3S.IS.UEEU_LEUEL.8); END; (0 0F UEEU_CHOICE .) PROCEDURE WELCOME; (....OGI0.000000GOQOIOOOOOOOI.OGIOOOQOQOOOOOOIIOIOOOOOCOOIOOIOOOOOOO. 9 ~Called from INITIALIZE 0 0 ~Sets up a menu which allows user to change parameter values. 0 C...OI......OICOCCOCOCQOCOOOCQ090‘...O...BOO!.IOIOOQOQOOOOOOOOOQOOO.) UAR CH=CHAR; OK=BOOLEAN; INTI=INTEGER; (0 USED IN UARIOUS LEUELS OF THE MENU 0) BEGIN SCREEN_MASK(‘34zHELLO.TEXT‘.OK); PAUSE(10); PAGE(0UTPUT): CH -CH_PROMPT( 0.9.CONCAT(‘ You have the option to change the way‘. ‘ certain parts of this program operate.$‘. ‘Do you wish to see the menu and make some changesV'. ‘ .. Y or N.‘).'$‘.63.10.I‘Y‘.‘y‘.‘N‘.‘n‘I); CAP(CH); IF (CH-‘Y‘) THEN BEGIN SCREEN_MASK(‘84:MASK1.TEXT‘.OK); URITE_STRING(ZS.3,USER.18); URITE_STRING(24.5.RAN_OR_DET.l0); URITE_INT(39.7.NUM_ACRES.3); URITE_INT(33.9.SITE_INDEX.2); URITE_REAL(40.11.DISCOUNT.6.2); '75 URITE_STRING(35.IS.UEEU_LEUEL.B); INTl=-0; REPEAT INT_PROMPT(0.0.CONCAT(’Uhich of the items listed below do you 'want to change?‘).‘$'.SS.0.INTI.2); CASE INTI 0F 1=USER_TYPE; # DIN :RUN_TYPE; 2ACRE_CHOICE; :SI_CHOICE; SrRATE_CHOICE; BAUTO_CHO=ICE; 7=UEEU_CHOICE; BICOST_CHOICE; BZPREP_CHOICE; l0=(' DO NOTHING '); llrEXIT(PROGRAM); END; (0 CASE e) UNTIL (INTl=l0); END; END; PROCEDURE SET_BUG_UALUES; ({5599...}...OOQOCOQQDOOOOGOQOIOOIDQOOGOQOGOIOODDOOOQDOOOOOOOOCOOIOOO ' -Called from INITIALIZE C 0 -Initializes some values used in association with insect impact. G O.QQ06......QOQOOOQOQQOOOOOOIOQOQQCOGEQQQOIGQQQOQCI......0.9.00.0...) BEGIN BUD_TABLE[1.II BUD_TABLE[1.2]= =-1 =-0. '0. I'0. ll'0. -0. -0. BUD_TABLEI1.3] BUD_TABLE[2.1] BUD_TABLE[2.2]= BUD_TABLE[2.3]= BUD_TABLEI3.II: BUD_TABLEI3.2]= BUD_TABLEI3.3I= 2-0 BUD_TABLE[4.IJ BUD-TABLEI4.ZJ: BUD_TABLEI4.3I= BUD_TABLEIS.1]= =-0 =-0. HIT_0X_UO_CONTROL= BUD_TABLEIS.2] BUD_TABLE[5.3] “'1 '1 -0 -0 -0 HIT_1X_U0_CONTROL HIT_2X_UO_CONTROL= HIT_3x_uo_00NTR0L= HIT_4X_UO_CONTROL= HIT_Gx_u_00NTR0L= HIT_1X_U_CONTROL= HIT_2x_u_00NTR0L= HIT_3X_U_CONTROL: HIT_4X_U_CONTROL= END; .00; .00; .00; 92; S3; 94; B4; 33; BS; .78; .07; .54; .73; .02; 14; ‘1.0; =-0.0; -0.0; 80.0; '0.0; I"1.0; -0.0; -0.0; .'0.0; ‘0.0; (0 of set bug values ') 76 PROCEDURE SET_COST_UALUES; (00.........QOIODDCDGOQDQOO..0006...O'QGOIOIODIQOOOOOOO9'90...096.... ' -Called from INITIALIZE ' A -Set default costs. ......OCQO‘IOCIOIGIIIQIIOOOOOOQOOQBQOOIOOIGOOD...OOQOOOOQCOOIQOOCOQO.) BEGIN SCOUT_UAGE=-S.0; TECH_UAGE:-B.0; SPRAY-COSTIBUDUORM.AERIAL,CHEMICAL,INTERCEPT]=-7S.0: SPRAY_COST[BUDUORM.AERIAL.CHEMICAL.SLOPE]==S.0; SPRAY_COST[BUDUORM.GROUND.CHEMICAL.INTERCEPT]:-75.0; SPRAY_COSTIBUDUORM.GROUND.CHEMICAL.SLOPEI=-S.0; SPRAY_COSTIBUDUORM.AERIAL.BIOLOGICAL.INTERCEPTI==7S.0; SPRAY_COST[BUDUORM.AERIAL.BIOLOGICAL.SLOPEJ:sS.0; SPRAY_COST[BUDUORM,GROUND.BIOLOGICAL.INTERCEPTI==7S.0; SPRAY_COST[BUDUORM.GROUND.BIOLOGICAL.SLOPE]=-S.0; SPRAY_COST[UEEUIL.AERIAL.CHEMICAL,INTERCEPTI==7S.0; SPRAY_COSTIUEEUIL.AERIAL.CHEMICAL.SLOPEI==S.0; SPRAY_COST[UEEUIL.GROUND.CHEMICAL.INTERCEPT]=-7S.0; SPRAY_COST[UEEUIL.GROUND.CHEMICAL.SLOPE]=-S.0; BURN_COST=-ZS.00; CHDP_COST:-12.00; HERB_COST=-S0.00; CP_SEED_CDST:-4S.00; AIR_SEED_COST:-B0.00; MAC_PLANT_COST=-B0.00; HND_PLANT_COST:-BS.00; SCAR_COST=-70.00; END; (0 of set cost values 0) Q PROCEDURE SETUALUES; (......ICCCOOGOCOO.....ODGIOQCQODI...ODIOQCOOQOOQIOQ.09.19.009.990... * -Called from INITIALIZE ' 0 -Set miscellaneous values. * {OQQIQICQDQQIC.....OICIOOOQGIIIQCI9CO.{QIIIOOOCOOOOCCOOIOOOQOQOCOIOQ) BEGIN DISCOUNT==3.0; CHECK=-0; USER=-‘Public agency‘; RAN_OR_DET=-‘Random'; UEEU_LEUEL="moderate‘; PLANT_METHOD=-‘Machine plant‘; BURNr-FALSE; ROLLERCHOPz-FALSE; HERBICIDEr-FALSE; SCARIFY:-FALSE; LOP_SCATTER=-FALSE; COUNTYR=-0; N_TRS_U_CONTROL=-0; N_TRS_UO_CONTROL=-0: HEIGHT=-l.0; P_LlUE_U_CONTROL=-l.0: 77 P_LIUE_UO_CONTROL>=1.0. P_GRO_U_CONTROL:=0.0; P_GRO_UO_CONTROL==0.0; NUM_EXPENDITURES==0; FINISHEDz=FALSE; UEEUSPRAY.=FALSE: NUMACRESr=40; COSTsl-0.0; CONTROL_COSTS:=0.0: CUT:=FALSE; SITEINOEX2-SS; SPRAY_BUD:=FALSE; SPRAY_UU.=FALSE; BUD~COUNT:=0; UEEU_COUNT =2. TOGGLE-=TRUE. READIN.=‘84:ALTICOST.TEXT‘; READOUT=='34=ALT2COST.TEXT'; REURITE‘COSTSIN.READIN); END; BEGIN GETSEED; SET_BUG_UALUES; SET_COST_UALUES; SETUALUES; UELCOME; END; (0 0f set values s) 723 (seeeeeeseeeeesae SPRAY-TEXT seesseeoesesgooeoeeesseese) PROCEDURE BUGSPRAY; (......CIO’.OOCOQOOIOO.Q09.0.90059000060009OIQOOOODQOO99.900.00.05... ' -Called from MANAGE e - -Alters the severity of either insect if the user chooses to 0 * apply a pesticide. . {QOOIOICQOQIQIODIOOOIQOQOIQIQQIQQOQOI.0.00!09.0.09}...I'OOQDIOOIOIOQ) UAR TEMPREALzREAL; TEMPINTleTEGER; PROCEDURE AIR_CHEM_SPRAY; (fiOiO|9§QQOQQIQQOOOi§OiQO609.999....D.C..ICOCGGQOCOQQODOOOOQQOQI... 0 -Called from SPRAY_BUDUORM v 9 -Alters budworm severity if an aerial application of a chemical. ' pestICIde is chosen by the user. 90 - 100% control occurs. . QQIOQIQQQOOQQOOQOOIIIO0009’.09999.......!QQUIOOIOOOOQIIOOOOOQOOOO.) BEGIN IF (RAN_0R_DET - 'Random‘) THEN TEMPINT =RANDOM_INTEGER<10) ELSE TEMPINT=-S; sui_w_00NTR0L=-.BNI_N_00NTR0L; IS_IT_CONTROL=-TRUE; PRICE:-SPRAY_CGSTIBUDNORN.AEHIAL.CHEHICAL.INTERCEPTI + SPRAY-COSTIBUDUORM.AERIAL.CHEMICAL.SLOPElcNUM_ACRES; PRICE=-PRICE/NUM_ACRES; QUANTITYz-i; ACTIUITY=-‘CHEM. PEST. suouoan.'; INCREMENT_EXPENDITURES; END; (0 of air chem spray *) PROCEDURE AIR_BIO_SPRAY; (IOQOIIQQCCO......0.99.9...ODOOQGUOOOQQOOOQ...}...IIOOIOOCQOQOOQIIOO 9 -Called from SPRAY_BUDUORM ' i -Alters budworm severity if an aerial application of a a biological pesticide is chosen by the user. 70 - 902 control. OOOQQOIOQOGQIDIOIOOOIQ‘IIOQOQQCOOQ9.9.9..........{OOOO'OIOQOOOGOO...) BEGIN IF (RAN_0R_DET = 'Random‘) THEN TEMPINT=-RANDOM_INTEGER(20) + 10 ELSE TEMPINT:-Z0; BNI_U_CDNTROL==(TEMPINT/l00)IBU1_N_CONTROL; IS_IT_CONTROL=-TRUE; PRICE='SPRAY_COSTIBUDUORM.AERIAL.BIOLOGICAL.INTERCEPT] + SPRAY_COSTIBUDUORM.AERIAL.BIDLOGICAL.SLOPE]*NUM_ACRES; PRICEz-PRICE/NUM_ACRES; QUANTITY:‘l; ACTIUITY E‘BIOL. PEST. BUDUORM.‘; INCREMENT_EXPENDITURES; END; (e of air bio spray 0) O Q PROCEDURE GRND_CHEM_SPRAY; (‘G’....QOQCQDOQIO....DQQ.COQ.....OC....Q...0...I..I.I..QOOCOIIOOOOO * -Called from SPRAY_BUDUORM ‘ 9 -Alters budworm severity if a ground application of a chemical ' '79 . pestICIde is chosen by the user. 90 - 100% control occurs. 0 GOOOIICO§O.IC9.000....IO05......‘G‘....ICQOIIOIIIIIQQOQIDCQOCOO...D) BEGIN IF (RAN_0R_DET - ‘Random') THEN TEMPINT -RANDOM_INTEGER(10) ELSE TEMPINT =5; Bwi_U_CONTROL=-(TEMPINT/i00)ABUI_U_CONTROL; IS_IT_CONTROL=-TRUE; PRICE:-SPRAY_COST[BUDUORM.GROUND.CHEMICAL.INTERCEPT] + SPRAY_COSTIBUDUORM.GROUND.CHEMICAL.SLOPEJ!NUM_ACRES; PRICEz-PRICE/NUM_ACRES; QUANTITY=sl; ACTIUITYt-‘CHEM. PEST. BUDUORM.‘; INCREMENT_EXPENDITURES; END; (‘ of grnd chem spray ') PROCEDURE GRND_BIO_SPRAY; (QC.O0......OOGQGOODDODODDQ§QDOOIOIlilOOQGQOOI...OIQQOOQOOOOOOQOOII. ' -Called from SPRAY_BUDUORM . -Alters budworm severity if a ground application of a biological. O * pesticide is chosen by the user. 70 - 80% control occurs. I OIOOOQOIIOOiil§0000§§OQOOQIOCOOQQ.OQOOOQOQOOUOBIUIGOOQIQIQOO9...!DO) BEGIN IF (RAN_0R_DET - ‘Random') THEN TEMPINT -RANDDM_INTEGER(20) + 10 ELSE TEMPINT=-20; BUI_U_CONTROL=-(TEMPINT/l00)9BU1_U_CONTR0L; IS_IT_CONTROL=-TRUE; ‘._ PRICE:-SPRAY_COSTIBUDWORM.GROUND.BIOLOGICAL.INTERCEPTI + SPRAY_COSTIBUDUORM.GROUND.BIOLDGICAL.SLOPE]°NUM_ACRES; PRICE=-PRICE/NUM_ACRES; QUANTITY=-l; ACTIUITY=-‘BIOL. PEST. BUDUORM.'; INCREMENT_EXPENDITURES; END; (' of grnd bio spray 5) PROCEDURE SPRAY_BUORM; <.......0.........‘CQO...QOQQQOOI...9......IOIQOIOUBOQOQIOiifIOOOQI. ' -Called from BUGSPRAY ' ' -Type of pesticide application to be used against the budworm 9 is chosen. 0.1.090.0.0I9999ODOIIOQOIIOIOQOQCIOQQQOQ0.9.009}...9.9.9.0.....990.) 0 BEGIN IF AUTO THEN CH=-BU_SPRAY_TYPE ELSE BEGIN PAGE(0UTPUT); GOTOXY(S0.0);URITELN('Year 1 '.COUNTYR:2); GOTOXY(50.1);URITELN('3 Acres = '.NUM_ACRES=2); GOTOXY(S0.2);URITELN('Site index = '.SITEINDEX 2); GOTOXY(0.I0); URITELN(‘ HOU SHALL WE DO THIS?‘); URITELN(‘ A) Aerial application / Chemical pesticide‘); URITELN(‘ 8) Aerial application / Biological pestiCIde‘); URITELN(‘ C) Ground application / Chemical pesticide'); URITELN(‘ 0) Ground application / Biological pestICide‘); 80 READ(KEYBOARD.CH); CAP(CH); END; CASE CH OF ‘A‘iAIR_CHEM_SPRAY; ‘B'tAIR_BIO*SPRAY; ‘C'=GRND_CHEM-SPRAY; 'D'tGRND_BIO_SPRAY; END; (9 CASE 9) END: (9 SPRAY_BUORM 9) PROCEDURE AIR_SPRAY; ({OIOICIOOOUQIOQOOOIGOIQOOOIQOQIOOODOIOOIIOODQOGCOOOIOIOOOGUIIDQO... 9 -Called from SPRAY_UEEUIL 9 9 -Alters weevil severity if an aerial pestICIde spray is chosen. 9 9 40 — 50% control lst year. 15 - 30% control 2nd year. 9 5.9.0.0......IQOIODIDDOQQOQIOQDGQODODIIIQ§99099IUOIQDQOOO§I’DQOOOOQ) BEGIN IF (RAN_0R_DET = ‘Random') THEN TEMPINT =RANDOM_INTEGER(10) + 50 ELSE TEMPINT '55; UPU_U_CONTROL=-(TEMPINT/l00)9UPU_U_CONTR0L; IS_IT_CONTROL=-TRUE; PRICE:'SPRAY_COSTIUEEUIL.AERIAL.CHEMICAL.INTERCEPT] +. SPRAY_COST[UEEUIL.AERIAL.CHEMICAL.SLOPElvNUM_ACRES; PRICE=-PRICE/NUM_ACRES; QUANTITY=-l; ACTIUITY=-'.CHEM. PEST. UEEUIL.‘; INCREMENT_EXPENDITURES; END; ' (9 of air spray O) PROCEDURE GRND_SPRAY; (OD....90.9.0900....OODOQOOOIIOGQQOIIC5.0.0.9....IIOOQIIQQQOOOOOOGOO 9 -Called from SPRAY_UEEUIL 9 9 -Alters weevil severity if a ground application of pesticide is 9 9 chosen. 40 - 50% control. ' DIODOQOQIQQIOOIOQOflfiiiQOOIGOl.COQQQQQ.0.0QOQI00......OGOIDOOOOOOOI) BEGIN IF (RAN_0R_DET - 'Random‘) THEN TEMPINT -RANDOM_INTEGER(10) + 50 ELSE TEMPINT=~SS; UPU_U_CONTROL:-(TEMPINT/i00)9UPU_U_CONTR0L; IS_IT_CONTROL=-TRUE; PRICE=-SPRAY_COST[UEEUIL.GROUND.CHEMICAL.INTERCEPT] + SPRAY_COST[UEEUIL.GROUND.CHEMICAL.SLOPEJ9NUM_ACRES: PRICEt-PRICE/NUM_ACRES; QUANTITYzal; ACTIUITY==’.CHEM. PEST. UEEUIL.‘; INCREMENT_EXPENDITURES; END; (9 of grnd spray 9) PROCEDURE SPRAY_UEEUIL; <.....Q...C....QQ.C|§QIOQ§O99......OQOIOOIOO.QIOOOODQQOICCOOO...... 9 -Called from BUGSPRAY 9 9 -Allows user to choose what type of pesticide application to 9 8T 9 direct against the weevil. O iIGOOOOIOCOOOIIOOOOIQO.9...’0".IOOIOOOOOOO‘OOOOCO'Q0.0I.0.0.09...> BEGIN IF AUTO THEN CH =UU_SPRAY_TYPE ELSE BEGIN PAGE(0UTPUT); CH =CH_PROMPT(15.8.CONCAT('HOU SHALL UE DO THISVS , B) GrOund spray‘),‘$'.39.10.I'A‘.'a’.'B'.'b‘l ‘A) Aerial sprays CAP(CH); END; CASE CH OF ‘A‘rAIR_SPRAY; ‘B'iGRND_SPRAY; END; (9 OF CASE 9) UEEU_SPRAY==TRUE; END; (9 OF SPRAY_UEEUIL 9) BEGIN (9 bugspray 9) IF AUTO THEN BEGIN IF SPRAY_BUD THEN CH=-’A‘; IF SPRAY_UU THEN CH=-'B’; IF (CH-’A') THEN SPRAY_BUD=-FALSE; IF (CH-'8') THEN SPRAY_UU=-FALSE; END ELSE BEGIN PAGE(0UTPUT); GOTOXY(S0.0);URITELN('Year GOTOXY(S0.1);URITELN('8 Acres GOTOXY(S0.2);URITELN('Site index GOTOXY(0.10); IF (COUNTYR <= 20) THEN BEGIN URITELN(’ TOUARDS UHICH URITELN(' URITELN(‘ URITELN(‘ EAD(KEYBDARD.CH); END ELSE CH -‘A‘; END; CAP(CH); CASE CH OF ‘A‘=SPRAY_BUORM; ‘B‘iSPRAY_UEEUIL; ‘C‘zEXIT(BUG_SPRAY); END; (9 CASE 9) IF (NOT AUTO) THEN BEGIN PAGE(0UTPUT); GOTOXY(50.0);URITELN(‘Year GOTOXY(50.1);URITELN(‘t Acres GOTOXY(S0.2);URITELN(‘Site index GOTOXY(20.l0); URITELN('Spraying Completed.‘); Q '.COUNTYR=2); ‘.NUM_ACRES=2); '.SITEINDEX=2); UILL UE DIRECT THIS SPRAYING7' A) JACK PINE BUDUORM‘); B) UHITE PINE UEEUIL’); C) OOPS. URONG BUTTEN! ‘. ‘I DON“T WANT TO SPRAYI‘); INSECT ‘.COUNTYR:2); '.NUM_ACRES:2); ‘.SITEINDEX:2); PAUSE(G); (9 of bugspray 9) EN END; (9 OF BUGSPRAY 9) 83 (s sssesseseseseoe MANAGE_TE)(T saeeososesosss e) PROCEDURE MANAGE; (CDCDCODIGQOI.....09..i0...DO....OOOOOGOOQOQQQIIIIIQIQOQIOQQIOOGIOOQO'O 9 -Called from MONITOR 9 9 -Allows user to apply pesticides, inventory the stand. get a 9 9 listing of costs. cut the stand. and/or exit the program. 9 ......IiOIQIGiI.IOODOOQOIQOI'QIQQOOQQO.D.C..IOI.OIOIIOOQOOOIOQQQIQIOO.) UAR CHliCHAR; TEMPINT=INTEGER; TEMPREAL=REAL; PROCEDURE DESCRIBESTAND; (..QIOCODQCOOIC‘QCOOOIOQQIODQQ...if...OIIIIQIOQQOOQQIIOOOIIOII‘O‘IIOOII 9 -Called from REPORT 9 9 -Determines the proportion of trees rendered unmerchantable by 9 9 the weeVil and the proportion showing some damage but still 9 9 merchantable. . I0.0I...QOOOOQOIQOOOIIO9990065....9.00.{QIQOOI‘IQOQOOOOOCOOOOOQGO...) UAR USELESS=REAL; DAMAGED=REAL; BEGIN USELESS:-HIT_4X-U_CONTROL9I00; DAMAGED -(HIT_1X_U_CONTROL + HIT_2X_U_CONTROL + HIT_3X_U_CDNTROL)9I00; URITELN; ~URITELN(‘ - ‘.USELESS=S=1.‘ percent of the stand is too damaged by‘. weevil to be marketable.‘); URITELN(' - ‘.DAMAGED S=l.' percent of the stand shows obvious‘. ‘ signs of weevil damage but still ‘); URITELN(' is marketable.‘); END; (9 OF DESCRIBE_STAND 9) PROCEDURE REPORTSEED; (ODQOCOGIOOOQOOQOOOQ§OOROOGOUOOOIDGIOOOGODOGOQOI.QDOOOOQGQQOQQOIQOQOO 9 -Called from REPORT 9 9 -Puts on the screen reports of % mortality and proportion 9 9 damaged trees for stands under 20 years old. 9 D9.00.00.IOOOIOOOOOIDIOGOOO'DOODOOOQEOOOOQOO0.9.90.0...OODODQOIQOOOO) UAR CH:CHAR; TEMPREAL=REAL; BEGIN TEMPREAL -(l - P_LIUE_U_CONTROL)9I00.0; PAGE(0UTPUT); GOTOXY(S0.0);URITELN('Year : '.COUNTYR 2); GOTOXY(S0.I);URITELN(‘3 Acres : '.NUM_ACRES=2); GOTOXY(S0.2);URITELN(‘Site index = ‘.SITEINDEX=2); GOTOXY(0.B); 84- URITELN(’ .9. Year; ..COUNTYR12,' ""); URITELN; URITELN(‘ At age ‘.TREE_AGE 2.‘:'); URITELN; URITELN(‘ - ‘.TEMPREAL 4 l.‘ % mortality has occurred.‘); URITELN; DESCRIBE_STAND; IS_IT_CONTROL:=FALSE; PRICE =S.00 + TECH_UAGE9NUM_ACRES90.05; PRICE==PRICE/NUM_ACRES; OUANTITY==I; ACTIVITY =‘CHECK ON YOUNG STAND‘; INCREMENT_EXPENDITURES; URITELN; URITELN(‘ (RETURN)‘); READLN- 0.00); END; (9 OF GET_PRICE 9) BEGIN IF (TREE_AGE>20) THEN BEGIN GETPRICE; 88 PAGE(0UTPUT); GOTOXY(ZS.2); URITELN(‘EUALUATION OF ALL ACTIUITIES'); GOTOXY(ZS.3); URITELN(‘ ---------------------------- ‘); GOTOXY(33,4); TENPREAL:=(1 — HIT_4X_U_CONTROL>9CORDS_U_CONTROL; URITELN('The number of cords cut= ‘,TEMPREAL26I1); GOTOXY<24.S); BID:-PRICE_PULP9TEMPREAL; TEMPREAL “BID/EXP(CDUNTYR9LN(1 9 DISCOUNT/100)); URITELN('Discounted value for these cords= ‘.TEMPREAL 7 2); GOTOXY<22.B); URITELN('Discounted value of costs incurred= ’,COSTS 7 2); TEMPREAL==TEMPREAL - COSTS; GOTOXY(14.7); URITELN(‘Net present value of the stand at planting= ‘.TEMPREAL 7 2); TEMPREAL =(1 - HIT_4X_U_CONTROL)9CORDS_U_CONTROL; TEMPREAL =(EXP(COUNTYR9LN(1 + DISCOUNT/100))9COSTS)/TEMPREAL; GOTOXY(0.S); URITELN('Price of Jack pine which would be required to break even= '. TEMPREAL=B:2); GOTOXY(IS.12); URITELN(‘EUALUATION OF MONITOR AND CONTROL ACTIUITIES‘); GOTOXY=LG_LARU_LEU) THEN SPRAY_BUDI=TRUE; 93 END; END ELSE BEGIN IF (NOT AUTO) THEN BEGIN GOTOXY(15.9); URITELN('NO budworms were found In any sample.'); GOTOXY(IS.20); URITELN(‘Press RETURN to continue'); READLN(CH); END; END; END; (9 of budwormsample 9) PROCEDURE UEEUSAMPLE; (I'IOIQDOO...IODOC0.099.009.DO.QGOOIO.I......UQQOQ90......QQQQQQI.O 9 *Called from SAMPLE ' 9 -Samples the stand for weev11. Adds a random error to the 9 9 sample. Prevides a chart which relates sample results to 9 9 potential volume losses. 9 so...05009999995599soooesoossoocssoeososcoossssseseseeeeeeessesees) UAR TEMPREALzREAL; DK=BOOLEAN: TEMPINT=INTEGER; ROU.COLUMN=INTEGER; BEGIN IF (TREE_AGE<-3) THEN BEGIN TEMPREAL=-0.0; IF (NOT AUTO) THEN BEGIN PAGE(0UTPUT); GOTOXY(0.10); URITELN(‘ The stand is too young to have any appreciable ‘. ‘weeViling'); PAUSE(G); END; END ELSE BEGIN IF (NOT AUTO) THEN BEGIN SCREEN_MASK(‘tdszEUCHART.TEXT‘.OK); GOTOXY(25.0); URITELN(‘Year ‘.COUNTYR:2.‘ UEEUIL SAMPLING ‘); URITELN; END; IF (RAN_0R_DET = ’Random’) THEN TEMPREAL =UPU_U_CDNTROL + RANDOM_INTEGER(21) - 10 ELSE TEMPREAL =UPU_U_CONTROL; IF (TEMPREAL<0.0) THEN TEMPREAL 90.0; IF (TEMPREAL>100.0) THEN TEMPREAL =l00.0; IF AUTO THEN IF (TEMPREAL>-UU_LEU) THEN SPRAY_UU=9TRUE; IF (NOT AUTO) THEN BEGIN GOTOXY(10.20): URITELN= START_BU_PLAN) AND (COUNTYR := END_BU_PLAN) THEN BUORMSAMPLE; IF (UEEUCHECK = UEEUCOUNT) AND (COUNTYR i= START_UU_PLAN) AND (COUNTYR <= END_UU_PLAN) THEN BEGIN UEEUSAMPLE: UEEU_COUNT:=0; END; END ELSE IF (BU_PLAN = 'MonSpray') AND (COUNTYR := START_BU_PLAN) AND (COUNTYR <= END_BN_ELAN) AND (NEXT_EUDUORM = D) THEN BEGIN BUORMSAMPLE; END ELSE IF AND (UEEU_CHECH = UEEU_COUNT) THEN BEGIN 1 95 UEEUSAMPLE; UEEU_COUNT:=0; END; IF (NOT AUTO) THEN BEGIN REPEAT PAGE(0UTPUT); GOTOXY(S0.0);URITELN(‘Year = '.COUNTYR=2); GOTOXY(S0.1);URITELN(‘3 Acres = ‘.NUM_ACRES:2); GOTOXY(S0.2);URITELN(‘Site index = ‘.SITEINDEX 2); GOTOXY(I4.9); URITELN(‘999 Year ‘.COUNTYR 2.‘ S A M P L I N G 999'); IF (COUNTYR<20) THEN BEGIN URITELN(‘ FOR UHICH INSECT NILL UE SAMPLE7‘): URITELN(‘ A) NONE - GO ON TO MANAGEMENT ‘OPTIONS‘); URITELN(‘ B) JACK PINE BUOUORM‘); URITELN(’ C) UHITE PINE UEEUIL‘); READ(KEYBOARO.CH); END ELSE BEGIN URITELN(’ SHALL UE SAMPLE FOR BUDUORM7‘); READ- START_BU_PLAN) AND (COUNTYR <- END_BU_PLAN) THEN SPRAY_BUD=-TRUE; IF (UEEU_PLAN - ‘Spray‘) AND (UEEU_CDUNT - UEEU_CHECK) AND (COUNTYR )- START_UU_PLAN) AND (COUNTYR <= END_UU_PLAN) THEN BEGIN SPRAY_UU==TRUE; UEEU_COUNT==0; END; MANAGE; END; IF AUTO AND CUT THEN MANAGE; IF (NOT AUTO) THEN BEGIN SAMPLE; MANAGE; 96 IF (CUT) THEN URITELN ELSE SETCHECK; END; END; (9Checkstand9) 97 (asses-sesssssssessoo SETPEST.TEXT 9sessosseeeeseesssesoosso) PROCEDURE SETPESTS; 0 THEN BEGIN KEYPRESS =9 TRUE; UNITCLEAR( 2 ); END; END; (9 of keypress 9) PROCEDURE SET_BU_SEUERITY; 4) THEN YEAR_OF_OUTBREAK==4; IF (YEAR_OF_OUTBREAK<1) THEN YEAR_OF_OUTBREAK '1; CASE YEAR_OF_OUTBREAK OF ltBEGIN IF (RAN_0R_DET - ’Random‘) THEN BUI_U_CONTROL=9RANDOM_INTEGER(8) ELSE BU1_U_CONTROL==3; BU1_UO_CONTROL=-BUI_U_CONTROL; END; ZIBEGIN IF (RAN_0R_DET 9 ‘Random‘) THEN BUI_U_ CONTROLt-RANDOM_INTEGER(3) + 6 ELSE BU1_U_CONTROL==7; BU1_UO_CONTROL==BU1_U_CONTROL; END; BIBEGIN IF (RAN_0R_DET = ‘Random') THEN BUI_U_CONTROL==RANDOM_INTEGER(4) + 6 ELSE BU1_U_CONTROL==7; BU1_UO_CONTROL=-BU1_U_CONTROL; END; 4=BEGIN IF (RAN_0R_DET - ‘Random') THEN BUI_U_CONTROL=-RANDOM_INTEGER(10) ELSE BU1_U_CONTROL='S; BU1_UO_CONTROL=-BU1_U_CONTROL; EAYR_OF_OUTBREAK=-0; IF (RAN_0R_DET - ’Random') THEN BEGIN TE MP=-RANDOM_INTEGER(l00)/l00; IF (TEMP <- 0.0001) THEN TEMP=-0.0001; NEXTBUDUORM:'ROUND(-79LN(TEMP)); IF (NEXT_BUDUORM>12) THEN NEXT_BUDUORM=-12; IF (NEXT_BUDUORM<3) THEN NEXT_BUDUORM==3; END ELSE NEXT_BUDUORM=-6; LASTBUDUORM='I; END; END;(9 OF CASE 9) END; (9 of set bw severity 9) BEGIN BU3_U0_CONTROL=-BU2_UO_CONTROL; BU3_U_CONTROL=-BU2_U_CONTROL; BU2_U_CONTROL=-BU1_U_CONTROL; BU2_UO_CONTROL=-BU1_UO_CONTROL; IF (NEXTBUDUORM-0) THEN BEGIN IF (NOT AUTO) AND (CHECK<>0) THEN BEGIN BEEP; PAGE(0UTPUT); GOTOXY(I0.S); URITELN('999 Year ‘.COUNTYR 2.‘ 999‘); URITELN(‘ UARNING' Budworm outbreak is now occurring.’); I=-0; URITELN(‘ You have 5 seconds to act on this. Press any key ‘); URITELN(‘ to halt program.‘); 99 UHILE ( NOT KEYPRESS ) AND ( I<2000 ) DO BEGIN I=-I+l; END; IF (I<2000) THEN CHECK=-0; END ELSE IF (NOT AUTO) THEN BEGIN BEEP; PAGE(0UTPUT); GOTOXY(10.S); URITELN(‘999 Year ‘.COUNTYR 2.‘ 999‘); URITELN(‘ UARNINGI Budworm outbreak is now occurring.‘); PAUSE(3); END; SET_BU_SEUERITY; END ELSE BEGIN BUI_U_CONTROL:=0: BU1_UO_CONTROL==0; NEXTBUDUORMz=NEXTBUDUORM - l; LASTBUDUORMz=LASTBUDUORM + 1; END; END; (9 of budworm 9) PROCEDURE UEEUIL; (COOQOIGOOBOCOCIOODOQIO...QOOOIIIQOOGCIIOIOOGBOOQIOOIOOQIIOIDQOOOQO 9 -Called from SETPESTS , 9 -Sets potential weevil levels for this year. Designed so that 9 9 they climb linearly for the first 10 years and hold steady 9 9 afterwords. Ueeviling is set to 0 for stands less than 3 9 O 9 years old and for stands taller than 17 feet tall. Q....OQOOOQOOOODOOOOOOOOQCC0.0I...IQfQODOIQDOOOOOODOOOOOOO9.0.00. ) UAR TEMPINTtINTEGER; TEMPREALtREAL; BEGIN TEMPREALz-l - EXP(-0.022339TREE_AGE); IF (TEMPREAL 3) AND (HEIGHT<17) THEN IF (COUNTYR <9 10) THEN BEGIN UPU_UO_CONTROL=-FIRSTUEEU + (TREE_AGE9(LASTUEEU - FIRSTUEEU)/10.0); UPU_U_CONTROL=-TEMPREAL9UPU_UO_CONTROL; END ELSE BEGIN UPU_UO_CONTROL=-LAST_UEEU; UPU_U_CONTROL=-TEMPREAL9LAST_UEEU; END ELSE BEGIN UPU_NO_CONTROL:-0.0; wPU_U_CONTROL:-0.0; END: UEEVSPRHYI'FHLSEE END; (9 of weevil 9) BEGIN (9 setpests 9) \ UEEVIL; BUDUORM; END; (9 of setpests 9) 101 (2 92999909995 fiAIN_TEXT esseeeeasaec a) PROCEDURE GROUTHESTAND; (...0909.....QOIOOOOi.00..........OQOCQ‘IOOGOOOOOCOQOOI.0......01.00.... 9 -Called from main program BANKSIANA 9 9 “Sets average height. basal area. and cords for the stand. Uses 9 9 equations taken from Benzie J.U.,1977. Manager‘s handbook for 9 9 Jack pine in the North Central States. USDA For Serv Gen Tech 9 9 Rep NC-32. 18 p. 9 .00....D.IIQOOI09.9...IO.I.09}.QIOIQ.999.09..IOIOQOODOOUGOIO'0.0IGOQI. UAR TEMPREALzREAL; CHICHAR; ) BEGIN TEHPREAL==l - EXP(-0.022339TREE_AGE); IF (TEMPREAL <= 0.0001) THEN TEMPREAL==0.00012 HEIGHT=-l.5339SITE_INOEX9EXP(1.24199LNtTEMPREAL)); TEHPREALt-EXP(-49EXP(-29.lB/TREE_AGE))3 TEHPREAL=ITEHPREAL90.2769EXP(0.539LN(SITE_INDEX)): TEHPREAL:-TEHPREAL9(I + 0.0569BA_N_CONTROL - 0.0003589BA_U-CONTROL9BA_U_CONTROL>3 IF (TEMPREAL<0) THEN TEMPREAL:-0i BA_U_CONTROL:-P_LIUE_U_CONTROL9(BA_U_C0NTR0L + P_GRO_U_CDNTROL9TEHPREAL)s CORDS_U_CDNTR0L:'0.0039589BA_U_CONTR0L9HEIGHTz N_TRS_U_CONTROL=-N_TRS_U_CONTROL9P_LIUE_U_CONTROL; TEMPREAL=9EXP(-49EXP(-29.lB/TREE_AGE))3 TEHPREAL==TEHPREAL90.2769EXP(0.839LN(SITE_INDEX)): TEHPREALz-TEHPREAL9(1 + 0.0SB9BA_U0_CONTROL - 0.0003589BA_UO_C0NTROL9BA_UO_CONTROL)3 IF THEN TEMPREAL=-0; BA~U0_CONTR0L=-P_LIUE_U_CONTROL9(BA_U0_CONTROL + P_GRO_U0_CONTR0L9TEHPREAL); CORDS_UO_CONTROL=-0.0039589BA_U0_CONTR0L9HEIGHT; N_TRS_UO_CONTROL:-N_TRS_UO_CONTROL9P_LIUE_UO_C0NTROL; END; (9 of grow the stand 9) FUNCTION BUD_EFFECT(THIS_YR.LAST_YR,YR_BEFORE:REAL)zREAL; (.9QCOOOQOGOOOOOIQOCCQCOOOOOOOOCOOOOOUOCCCC...9.9.9.9....OOOOOOOOOOOOOQ. 9 -Called from EARLY_DAMAGE and LATE_DAHAGE 9 9 -Looks up budworm damage on the table BUD_TABLE based on 9 9 defoliation level and on the number of years since this 9 9 defoliation occurred. Does this for last three year‘s defoliation 9 9 and multiplies results together to get total effect of budworm on 9 9 this year's tree growth. ‘ O..IOOOOQC.OGGOOOOOOOIOOOOOOOOOOOCOCOODO...09......OOIOOOOOOOOOOOOOOOO UAR ROUl.ROU2.ROU3=INTEGER; TEMPrREAL; ) 102 BEGIN IF (THIS_YR <= 3) THEN RON1==I ELSE IF (THIS_YR <= 5) THEN ROUI =2 ELSE IF (THIS_YR <= 7) THEN ROUI==3 ELSE IF (THIS_YR = 8) THEN ROUI==4 ELSE ROUI==S; IF (LAST_YR <= 3) THEN ROU2==l ELSE IF (LAST_YR <= 5) THEN ROU2==2 ELSE IF (LAST_YR <= 7) THEN ROU2==3 ELSE IF (LAST_YR = 8) THEN ROUZ =4 ELSE ROUI==S; IF (YR_BEFORE (= 3) THEN ROU3 =1 ELSE IF (YR_BEFORE <= 5) THEN ROU31=2 ELSE IF (YR_BEFORE <= 7) THEN ROU3==3 ELSE IF (YR_BEFORE = 8) THEN RON3==4 ELSE ROU1I=Sz BUD_EFFECT==BUD_TABLE[ROUI.lI9BUD_TABLE[ROU2.2I9BUD_TABLE[ROU3.3I; END: (9 of bud effect 9) PROCEDURE SETDAMAGE; (iC.‘OQOOI§DI§G.OQOOQO.....90....QQOQGCQ.GQIOOOQOUOOI.OODOQOOQIODO'QOO. 9 -Called from main program BANKSIANA 9 9 -Based on insect attack levelsr sets amount of mortality. amount 9 9 tree growth. and proportion of trees rendered unmarketable. 9 9 For stands younger than 20 years. damage is accumulated for 9 9 eventual set up of an initial stand at year 20. Damage for older 9 9 stands are applied to the stand the year that they occur. 9 OQIQIOOOOCIOOIOIQOCQ{QIOOOOOIGIOIOQOOOICDOOOIIOOOQOCGOIGOOIQ90.09.9060 UAR ‘ JPBUMORTALITY=REALz TEMPREALzREAL; ) PROCEDURE EARLY_DAMAGE: (I...IIOOO¢9DO{CODDIQIOOOQOIIIQOI.OOOQQOOOG§OGIOOIOOJGQIIIQQQIIQIOOQO 9 -Called from SET_DAMAGE 9 -Sets growth loss based on Jack pine populations and BUD_TABLE 9 Sets mortality based on jack pine populations over the last 9 years. Mortality function is designed so that mortality is at 9 one percent except in extreme population levels where it can 9 rise as high as 90 percent. Proportion of trees hit once. twice 9 etc. by the weevil are determined. Trees hit more than four 9 times are considered unmarketable. 09.9099...IiiIOCO.IO!!!I.IO‘II‘OIIIQOOOOIOGQQ.9009...IDOCQOOOOOIOQOIO) BEGIN acetate (9 growth loss 9) TEMPREAL:IBUD_EFFECT(BU1_U_CONTROL.BU2_U_CONTROL.Bw3_U_CONTROL); P_GRO_U_CONTRO:-P_GRO_U_CONTROL + TEHPREAL: TEMPREAL=L-BUD_EFFECT(BU1_UO_CONTROL.BU2_UO_CONTROL.BU3_UO_CONTROL); P_GRO_UO_CONTROL=-P_GRO_UO_CONTROL + TEMPREAL: ' (9 mortality 9) TEHPREAL=-BUI_U_CONTROL + BU2_U_CONTROL + BU3_U_CONTROL: IF (TEMPREAL ( 20) THEN TEMPREAL=IZ0.0: TEMPREALt--l.563 + 0.09409TEHPREAL; 1(33 JPBUMORTALITY==TEHPREAL9TEHPREAL9TEHPREAL9TEMPREAL; IF (JPBUMORTALITY < 0) THEN JPBUMORTALITYt-0.0; TEMPREAL =1 - JPBUMORTALITY; P_LIUE_U_CONTROL=eP_LIUE_U_CONTROL9TEHPREAL; TEHPREAL==BU1_UO_CONTROL + BU2_UO_CONTROL + BU3_UO_CONTROL: IF (TEMPREAL <= 20) THEN TEMPREALz-20: TEHPREAL:=-l.563 + 0.09409TEHPREAL; JPBUMORTALITY:=TEMPREAL9TEHPREAL9TEMPREAL9TEHPREAL; IF (JPBHMORTALITY < 0) THEN JPBWMORTALITYz-0.0; TEMPREAL =1 - JPBUMORTALITY; P_LIUE_UO_CONTROLI=P_LIUE_UO_CONTROL9TEMPREAL; (9 weevil damage 9) TEMPREAL:=wa_U_CONTROL/100; HIT_4X_U_CONTROL==HIT_4X_U_CONTROL + TEMPREAL9HIT_3X_U_CONTROL: I HIT_3X_U_CONTROL==HIT_3X_U_CONTROL + TEMPREAL9SS) THEN TEMPREAL=-(BA_CHARTI3.KI)9PR0P_GR0 ELSE TEMPREAL:=PROP_GRO9(BA_CHART[L,K] + ((SITE_INDEX - LOUER_SI)/l0)9(BA_CHART[L+l.K] - BA_CHARTIL.K])) ELSE IF (SITE_INDEX - LOUER_SI < 0.001) THEN IF (NUM_TREES>ISSS) THEN TEMPREALt-BA_CHARTIK,4]9PROP_GR0 ELSE TEMPREAL1-PROP_GRD9(BA_CHART[L,K) + ((NUM_TREES - LOUER_NUM_TREES)/S00)9(BA_CHARTIL.K+1) - BA_CHART[L.KI)) ELSE BEGIN ESTl=-BA_CHART[L.K] + ((SITE_INDEX - LOUER_SI)/l0)9(BA_CHARTIL+1.KI- BA_CHART[L.K]): ESTZr-BA_CHARTIL+1.KI + ((NUM_TREES - LOUER_NUH_TREES)/S00) 9(BA_CHART[L+I,K+II - BA_CHART[L+1.K]); EST3=-BA_CHARTIL.K+lI + ((SITE_INDEX - LOUER_SI)/l0) 9(BA_CHARTIL+1.K+II - BA_CHART[L.K+II); EST4=-BA_CHART[L.KI + ((NUM_TREES - LOUER_NUH_TREES)/S00) 9(BA_CHARTIL,K+lI - BA_CHARTIL.K]); TEMPREAL=-((EST1 + ESTZ + EST3 + EST4)/4)9PR0P_6R0; END; BASAL_AREA=-TEHPREAL; END; (9 of init basal area 9) PROCEDURE DECIDE_CHECK; (see. GOOD...OIICIDOOIOOGOIQIQOI§IOOQOQIIOOIOIOIOQOIOQOOOOOOOiiiOOOQOOOO 9 -Called from main program BANKSIANA O 9 -If the program is running automatically. this procedure 9 9 determines whether or not to monitor or manage this year based on 9 9 what options within automatic run were chosen and whether or not 9 9 those options call for monitoring/managing. 9 O0090.........IOQQOOOOQOOOOOOQOO.....OIQQIIOOOOOQQODGOOOOOIGOOOOOOOOQO) VAR A.E.C.D,E=BOOLEAN; 0K_DO_BU.OK_DO_UU=BOOLEAN; BEGIN Az-FALSE; Bz-FALSE; Ct-FALSE; D=-FALSE; Er-FALSE: IF (COUNTYR)-START_BU_PLAN) AND (COUNTYR<-END_BU_PLAN) THEN OK_DO_BWt-TRUE ELSE OKnDO_BU=9FALSE: ’1' 1(36 IF (COUNTYR‘=START_UV_PLAN) AND (COUNTYP€=END_UV_PLAN) THEN OH_DO_UU:=TRUE ELSE OK_DO_UU==FALSE; IF (BU_PLAN = 'Spray') AND (NEXT_BUDUORM = 0) AND OK_DO_BU THEN A =TRUE; IF (BU_PLAN = 'MonSpray') AND (BU_MON_PLAN = ‘Every 77 yrs‘) AND (BU_CHECH = BUD_COUNT) AND OH_DO_BU THEN :=TRUE; IF (BU_PLAN = 'HonSpray') AND (BU_MON_PLAN = 'During outbrks') AND (NEXT_BUDUORM = 0) AND OK_DO_BU THEN C =TRUE; IF (UEEU_PLAN = 'Spray‘) AND (UEEU_CHECK = UEEU_COUNT) AND OH_DO_UU THEN D =TRUE; IF (UEEU_PLAN = ‘MonSpray‘) AND (UEEU_CHECK = UEEU_COUNT) AND OH_DO_UU THEN E =TRUE; IF A 09 B OR 6 OR D OR E OR CUT THEN CHECH_STAND; END; (9 of decide check 9) BEGIN (9 Main Programl 9) INITIALIZE; INIT_BIOL; REPEAT SETPESTS; IF (AUTO) THEN DECIOE_CHECK ELSE IF (CHECK<-0) THEN CHECKSTAND; SETDAMAGE; CHECKi-CHECK — 1; IF (CHECK<0) THEN CHECKz-0; TREE_AGE=-TREE_AGE + 1; IF AUTO THEN IF (TREE_AGE >- START_UU_PLAN) AND (TREE_AGE <- END_UU_PLAN) THEN UEEU_COUNT=-UEEU_COUNT + l: COUNTYR I-COUNTYR + 1; PAGE(0UTPUT); GOTOXY(0.8); NRITELN(' Year ‘.COUNTYR=2); UNTIL(TREE_AGE>-20); UEEU_COUNTt-0; IF (CUT) THEN URITELN ELSE BEGIN P_GRO_U_CONTROL:=P_GRO_U_CONTROL/18; P_GRO_UO_CONTROL=-P_GRO_UO_CONTROL/18. BA_U_CONTROL==BASAL_AREA(N_TRS_U_CONTROL.P_LIUE_U_CONTROL. P_GRO_U_CONTROL.SITE_INDEX); BA_UO_CONTROL==BASAL_AREA(N_TRS_UO_CONTROL,P_LIUE_UO_CONTROL. P_GRO_UO_CONTROL,SITE_INDEX); REPEAT SETPESTS; IF AUTO THEN BEGIN IF (TREE_AGE - ROTATION) THEN CUT -TRUE. DECIDE-CHECK; END ELSE IF (CHECK(=0) THEN CHECKSTAND; SETDAHAGE; GROUTHESTAND; CHECK 9CHECH ' 1; IF (CHECK<0) THEN CHECH:‘@. 107 TREE_AGEI=TREE_AGE + 1; IF AUTO THEN BUD_COUNT==BUD_COUNT 9 l; COUNTYR‘=COUNTYR +1; PAGE(0UTPUT); GOTOXY(0.B); URITELN(' Year '.COUNTYR:2); / UNTIL (COUNTYR\=70) OR (FINISHED). 1F (TREE_AGE)=70) THEN BEGIN URITE('Your stand is at least 70 years old.‘); NRITELN(' .......... TIME TO CUTIII'Ill'); GOTOXY(@.20);UBITELN(' RETURN'); READLN(CH); MANAGE. END; APPENDIX B Text Files Associated with the Program J ACK PINEJAC KPINEJACKPI NEJACKPINEJACKP INEJACHPINEJA CKPINEJACHPINEJAC KPINEJACKPINEJACHPINE JACKPINEJACHPINEJACKPINEJ ACKPINEJACKPINEJACHPINE JACKPINEJACKPINEJACKPINEJ ACHPINEJACHPINEJACHPINEJACK JACKPINEJACKPINEJACKPINEJ ACHPINEJACKPINEJACKPINE JACKPINEJACKPINEJACKPINEJ ACHPINEJACKPINEJACKPINDJACK JACKPINEJACKPINEJACKPINEJACKP JACKPINEJACKPINEJACKPINEJ ACKPINEJACKPINEJACKPINEJACK PINEJACKPINEJACHPINEJACKP INEJACKPINEJACKPINEJACK PINEJACKPINEJACKPINEJACKP PINE Figure B1. The text from file NELCOME TO PROGRAM BANKSIANA 'HELLO.TEXT.' 109 JACK PINE MANAGEMENT MODEL -- INITIALIZATION PHASE 1) Type of user: ----------------- P-J Type of run: ---------- Number of acres (10 - 989): ~-- bl 4) Site index (45 - 50): -- 5) Discount rate X (0.0 - 15.0): _____ Interactive vs. Automatic run. (Default = interactive) 0') 7 v Initial weeVil density: ———————— 8) Initialize management costs 8) Select site preparation and planting 10) Run model 11) EXIT program Figure B2. The text from file 'MASK1.TEXT' ITO PACK PINE MANAGEMENT MODEL -- MANAGEMENT COSTS Initialize wages of personnel. 1) Hourly wage of pest scout: 2) Hourly wage of forest technic1an: Initialize management costs for pestiCide application. Pine Budworm Applications targeted against Jack 3) Aerial, chemical spray: ——.—— + 4) Ground, cheMical spray: ——,—— + 5) Aerial7 biological spray ——_—— + 8) Ground, biological spray --.-- + Applications targeted against White Pine 7) Aerial, chemical spray: ~—.—- + 8) Ground, cheMJcal spray: ——.—— + 9) Go back to the initialization menu 10) Exit program Figure B3. _’.~“ per _“." DEF _'.-" per ’_.__ per weevil —-.—- per _—.“ DEF The text from file 'MASK2.TEXT' acre acre acre acre acre acre '— TIT JACK PINE MANAGEMENT MODEL -~ SITE PREPARATION AND REGENERATION 1) Burn: ~-- Herbicide: --~ (‘J 3) Lop and scatter: ——— 4) Scarify: -*— S) Rollerchogz ——— 5) Method of regeneration: ——————————————————————— 7) Go bac) to the initialization menu Figure B4. The text from file 'MASK3.TEXT' 112 s uIIIIIIIIIIIIIIIlII-IIIIIIIIIIIIII!III.... . . m u m 3 o m H m 3 o H m m m “ am. am . Hm H mm i am . am m " em ” mm H mm H me mm U MP “ GP H mm “ 8d se H mm H mm N mm H mm N . Ne . me i am i am ma “ mm i 8m “ ma ” mm a i as i mi N am i N m . m . m . m . ma H M H a ea H H _ H m 8m mm 8m U me ” mcfifia>om3 wcmucmu” x w O 2 H w H H m ***#**#*x.*******#**.x.#x#****#**tt******.¥**$*xt*********t#***t mommou wsjfioo x Umpomfiocd The text from file 'WEEVCHART.TEXT' Figure B5. APPENDIX c ' Library Procedures used in the Program 113 PROCEDURES BORRONED FROM UNIT ”UTILITIES.“* PROCEDURE PAUSE(* SECONDS:INTEGER *); CONST 0NE_SECOND = 3600; VAR I,J: INTEGER; BEGIN IF SECONDS > 0 THEN FOR I := 1 T0 SECONDS D0 FOR J:= 1 TO ONE_SECOND DO END; PROCEDURE BEEP; BEGIN NR1TE(CHR(BELL)); END; PROCEDURE CAP(* VAR CHzCHAR *) BEGIN IF CH IN ['a'. 'z '] THEN CH:=CHR(0RD(C H)- 0RD (' a') + 0RD('A'); END; PROCEDURE FILL_FIELD(* X,Y FIELD_LENGTH:INTEGER; CH:CHAR *) VAR IzINTEGER; BEGIN GOTOXY(X,Y); IF FIELD_lENGTH > 0 THEN FOR I:=1 T0 FIELD_lENGTH DO NRITE(CH); GOTOXY(X,Y); ENDS *Version 3.0. Released August 27, 1984. Programmers: Edward Dawson, Stuart Gage, Robert Kriegel, and Aubrey Moore. 114 PROCEDURE STR;TO_INT(* VAR NUMBERleTEGER; STR:STRING; VAR 0K:BOOLEAN*) VAR IzINTEGER; NEGATIVEzBOOLEAN; BEGIN NUMBER:=0; 0K:=TRUE; NEGATIVE:=FALSE; IF LENGTH(STR) = 0 THEN 0K:=FALSE ELSE BEGIN FOR I:= 1 T0 LENGTH(STR) D0 BEGIN IF STRTI] IN ['0'..'9'] THEN BEGIN NUMBER:= NUMBER * 10; NUMBER = NUMBER + 0RD(STR[I]) - ORD('O'); END ELSE IF (S TR [I] = ' ') AND (I= LENGTH(STR)) THEN ELSE IF (I =1)A D(STR[I] IN [ '+', '1 HEN BEGIN IF STR[1] = '-' THEN NEGATIVE:=TRUE; END ELSE 0K:= FALSE; END, IF NEGATIVE THEN NUMBER:=-1 * NUMBER; END; END; PROCEDURE STR_TO_REAL(* VAR NUMBERzREAL; STR:STRING; VAR 0K:BOOLEAN *); VAR ANY DECIMALS, NEGATIVE, ANY EXPONANT, 0K_ TEMP: BOOLEAN; I, COUNTER, TEMP, EXPONANT, :INTEGER; WHOLE, FRACTION, POWER, TEMP_STR: STRING;, INT, DECIMAL:REAL; BEGIN OK_TEMP:=TRUE; DECIMAL:=0.0; TEMP:=O; IF LENGTH(FRACTION) > 0 THEN FOR I:= LENGTH(FRACTION) DOWNTO 1 DO BEGIN TEMP _STRI1] := FRACTION[I]; STR TO _INT(TEMP, TEMP STR, 0K _TEMP); DECIMAL: =(DECIMAL + TEMP) / 10.0; IF NOT 0K_TEMP THEN 0K:=FALSE; 115 END; NUMBER:=INT + DECIMAL; IF NEGATIVE THEN NUMBER:=-1.0*NUMBER; 0K_TEMP:=TRUE; EXPONENT:=0; TEMP:=0; IF ANY_EXPONENT THEN BEGIN STR TO _INT(EXPONENT, POWER, 0K TEMP); IF NOT OK TEMP THEN OKF FALSE; IF EXPONENT:=O THEN NUMBER:=1.0 LSE NUMBER:= NUMBER*EXP(EXPONENT*LN(10.0)); END; END; END; PROCEDURE NRITE_INT(* X,Y,NUMBER, TOTAL_FIELD:INTEGER *); BEGIN GOTOXY(X,Y); WRITE(NUMBER:TOTAL_FIELD); END; PROCEDURE INT_REPLACE(* VAR NUMBERzINTEGER; X,Y, TOTAL_FIELD: INTEGER *); VAR STR:STRING; 0LD_NUMBER:INTEGER; DONE, 0K:BOOLEAN; BEGIN WRITE _INT(X, Y, NUMBER, TOTAL FIELD), OLD NUMBER: =NUMBER; DONE: “FALSE REPEAT GOTOXY(X, Y); READLN(STR); FILL_FIELD(X, Y,TOT L_FIELD,' '); IF LENGTH(STR ) = THEN BEGIN NUMBER:=0LD_NUMBER; DONE:=TRUE; END ELSE IF LENGTH(STR) IN [1..TOTAL_FIELD] THEN BEGIN STR T0 _INT(NUMBER, STR ,0K); IF 0K THEN 116 DONE:=TRUE; END; IF NOT DONE THEN BEGIN WRITE('?',' ':(TOTALfiFIELD - 1)); BEEP; PAUSE(1); END; UNTIL DONE; WRITE_INT(X,Y,NUMBER,TOTAL_FIELD); WRITELN; END; PROCEDURE REAL_REPLACE(*VAR NUMBERzREAL; X,Y, TOTAL_FIELD, DECIMAL_FIELD: INTEGER *); VAR STR:STRING; OLD_NUMBER:REAL; DONE, OK: BOOLEAN; BEGIN WRITE_REAL(X,Y,NUMBER,TOTAL_FIELD,DECIMAL_FIELD); OLD_NUMBER:=NUMBER; DONE:= FALSE; REPEAT GOTOXY(X,Y); READLN(STR); FILL_FIELD(X,Y,TOTAL_FIELD,' '); IF LENGTH(STR) = 0 THEN BEGIN NUMBER:= OLD_NUMBER; DONE:=TRUE; END ELSE IF LENGTH(STR) IN [1..TOTAL_FIELD] THEN BEGIN STR_TO_REAL(NUMBER,STR,OK); IF OK THEN DONE:= TRUE; END IF NOT DONE THEN BEGIN WRITE('?',' ':(TOTAL_FIELD — 1)); BEEP; PAUSE(1); END; UNTIL DONE; WRITE_REAL(X,Y,NUMBER,TOTAL_FIELD,DECIMAL_FIELD); WRITELN; END; 117 PROCEDURE WRITE_§TRING(* X,Y:INTEGER; STR:STRING; TOTAL_FIELD: INTEGER *); BEGIN GOTOXY(X,Y): WRITE(STR:TOTAL_FIELD); END; PROCEDURE WRITE_LONG_§TRING(* X,Y:INTEGER; LONG:SC_LONG_§TRING; BREAK_CHAR:CHAR *); VAR I:INTEGER; BEGIN GOTOXY(X,Y); IF LENGTH(LONG) > 0 THEN FOR I:=] T0 LENGTH(LONG) DO IF LONG[I] = BREAK_CHAR THEN BEGIN Y:=Y + 1; GOTOXY(X,Y); END ELSE WRITE(LONG[I]); END; FUNCTION CHAR_REPLACE(* X,Y:INTEGER; RETURN_ON_MATCH:SC_CHSET) :CHAR * ; VAR DUMMY_CH:CHAR; BEGIN GOTOXY(X,Y); SC_GETC_CH(DUMMY_CH, RETURN_ON_MATCH); WRITE(DUMMY_CH); CHAR_REPLACE:=DUMMY_CH; END; PROCEDURE CH_PROMPT(* X,Y:INTEGER; PROMPT:SC_LONG_§TRING; BREAK_CHAR:CHAR; NEN_x, NEw_y:INTEGER; RETURN_pN_NATCH:sc_pHSET):CHAR *); BEGIN SC_ERASE_T0_EOL(X ,Y); WRITE_LONG_§TRING(X,Y,PROMPT,BREAK_CHAR); CH_PROMPT := CHAR_REPLACE(NEN_x, NEN_y, RETURN_ON_MATCH); END; 118 PROCEDURE INT _PROMPT(* X, Y. INTEGER; PROMPT: SC_ LONG_ STRING; BREAK_ CHAR: CHAR; NEW X, NEW Y: INTEGER; VAR NUMBER. INTEGER; TOTAL_FIELD: INTEGER *); BEGIN SC ERASE TO _EOL(X, Y); WRITE LONG _STRING(X, Y, PROMPT, BREAK CHAR); INT _REPLACE(NUMBER, NEW_ X, NEW_ Y, TOTAL _FIELD); END: PROCEDURE REAL _PROMPT(* X, Y: INTEGER; PROMPT. SC LONG_ STRING; BREAK CHAR: CHAR; NEW X, NEW Y. INTEGER; VAR NUMBER. REAL; TOTAE_FIELD, DECIMAL_FIELD:INTEGER *); BEGIN SC ERASE TO _EOL(X, Y); WRITE LONG _STRING(X, Y, PROMPT, BREAK CHAR); REAE_REPLACE( NUMBER, NEW_X, NEW_Y, TOTAL_FIELD, DECIMAL_FIELD); END; PROCEDURE SCREED_MASK(* FILE_NAME:STRING;VAR 0K:BOOLEAN *); VAR A;FILE:TEXT; IORES:INTEGER; ONE_LINE:STRING; CONSOLEleTERACTIVE; BEGIN SC_CLR SCREEN; GOTOXYT0,0); (*$I-*) REWRITE(CONSOLE,’CONSOLE:’); RESET(A_FILE,FILE_NAME); IORES:=IORESULT; IF IORES = 0 THEN BEGIN 0K:=TRUE; WHILE NOT EOF(A;FILE) DO BEGIN READLN(A_ FILE, ONE LINE), WRITELN(CONSOLE, ONE _LINE); END, END ELSE BEGIN 0K:=FALSE; WRITELN('Error in writing screen mask: ', FILE_NAME); END: CLOSE(A_FILE); CLOSE(CONSOLE,LOCK); (*$I=*) END; mTTTTTITTTgTTTEmmi