COMPUTATIONAL MODELING FOR IRRIGATED AGRICULTURE PLANNING . PART II : RISK ANALYSIS 1

Techniques of evaluation of risks coming from inherent uncertainties to the agricultural activity should accompany planning studies. The risk analysis should be carried out by risk simulation using techniques as the Monte Carlo method. This study was carried out to develop a computer program so-called P-RISCO for the application of risky simulations on linear programming models, to apply to a case study, as well to test the results comparatively to the @RISK program. In the risk analysis it was observed that the average of the output variable total net present value, U, was considerably lower than the maximum U value obtained from the linear programming model. It was also verified that the enterprise will be front to expressive risk of shortage of water in the month of April, what doesn't happen for the cropping pattern obtained by the minimization of the irrigation requirement in the months of April in the four years. The scenario analysis indicated that the sale price of the passion fruit crop exercises expressive influence on the financial performance of the enterprise. In the comparative analysis it was verified the equivalence of P-RISCO and @RISK programs in the execution of the risk simulation for the considered scenario.


INTRODUCTION
Uncertainties regarding several factors are inherent to agricultural activities.Instability regarding the financial return is consequence of variability of price of agricultural products, costs, productivity, climate factors, among others.Techniques that allow evaluate a priori the risks from these uncertainties, should follow the planning studies.The risk analysis can be performed by using techniques of sensitivity analysis and risk simulation.(FRIZZONE & SILVEIRA, 1996), among others.
Sensitivity analysis consists in the application of variations in input variable or parameters values and verification of effects on output variables.As the concomitant variation of all input variables and parameters of a model would result in a large number of combinations, making the analysis difficult, it is convenient to choose some input variables and parameters, varying one at a time (FRIZZONE & SILVEIRA, 1996).Usually, the procedure is applied in analysis of postoptimization of mathematical programming models, in which the solution stability is assessed, under a ceteris paribus condition, whereby the effect a change in a single coefficient is considered, while all the other coefficients are held constant (HAZELL & NORTON, 1986).Solver tool (Frontline Systems, Inc.), applied to obtain the solution of linear programming models implemented in Excel  electronic spreadsheets (Microsoft Corporation), also generates reports with the sensibility analysis, as present on Part I of this work.
On the other hand, risk simulation involves simultaneous variation of random input variables of a model, observing the probability distribution of output variables, using sampling techniques as Monte Carlo, Hypercube Latino or Descriptive Sampling (SALIBY, 1997;BORGES JÚNIOR et al., 2003;HARDAKER et al., 2004).Essentially, Monte Carlo method is applicable to simulate the pattern of processes depending on random factors (HARR, 1987).The correlation between input variables and parameters, stochastic-dependent, should be considered in their variation.Opposite from what happens for the sensitivity analysis; software to risk simulation performance are not available as free accessories along with electronic spreadsheets.
It is observed that techniques of sensibility analysis and risk simulation are complementary in risk analysis.On the first technique, the focus is on input variables and parameters, i.e., it is verified separately the impact of a variation in each variable or parameter upon a determined output variable.Differently, when risk simulation is applied, the focus is on the output variable, seeking to generate, based on the probability distribution of input variables and parameters and in correlations between these variables and parameters, the cumulative distribution function for the output variable.
At irrigated agriculture, the uncertainties regarding irrigation requirement are particularly important.Mostly, a strong positive correlation is verified among technical coefficients of irrigation or irrigation requirements each month.This implies that, in certain months, total irrigation requirement can reach values considerably above average.Counterpart, the volume of water available for irrigation, in this month, may be below average, because, in general, the irrigation requirement and water available for irrigation are correlated in a negative way.This stress the importance of considering the variability on technical coefficients of irrigation and evaluating the risks of water shortage occurrence for farming patterns obtained from linear programming.
In this Part II of the work, the purpose was to develop a computer program in order to apply risk simulations in linear programming models, according to what has been described on Part I; to apply this program to the model described on Part I and to test the results through comparison with the @RISK program (PALISADE CORPORATION, 2002).

MATERIAL AND METHODS
Linear programming model (MPL) presented on Part I of this work has constraints as monthly and annual water availability, represented, respectively, by equations( 1) and (2), to be considered in the objective function for maximization of total net present value, U (R$), and minimizing total irrigation requirement during the entire analysis period or in critical periods.This second objective function is presented in equation ( 3), stressing that it can be structured to be applied in specific periods, especially those with water shortage risk.
where, N ym -total number of activities in year y and month m; y -integer number representing the year; m -integer number representing the month; w jym -monthly irrigation requirement for activity j, year y, and month m, m 3 ha -1 ; j -integer number representing activity; X j -j-th level of activity or cropped area, ha; V ym -monthly constraint regarding water available for irrigation, in year y and month m, m 3 ; na -total number of years in the model (planning horizon); N y -total number of activities in year y; Vt y -annual constraint regarding water available for irrigation, in year y, m 3 , and Wt -total irrigation requirement during the entire period of analysis, m 3 .
Technical irrigation coefficient or monthly irrigation requirements, represented by w jym on equations (1) and (3), are subject to the expressive variability.The main sources of this variability are instabilities in the quantity and rain frequency, evapotranspiration demand and upward flow arising from water table, in which depends, among other factors, on the depth of the water table.In addition to the variability in irrigation requirements, the variability in crop yield Y (kg ha -1 ), product price P (R$ kg -1 ), variable costs and annual discount rate DR (%), among others are also relevant to the planning of irrigated agricultural.
Risk analysis technique, emphasized herein, is based on risk simulations, more specifically, Monte Carlo simulations (HARDAKER et al., 2004).For the processing of these simulations, it has been developed a computerized program in Delphi (Borland Corporation), named P-RISCO, in which the input variables (monthly cropping irrigation requirement, crop yield, prices of products, variable costs and annual discount rate), every ones or those defined by the user, are considered in stochastic form.With these simulations, information is obtained about the probability distribution of output variables, i.e., total net present value and monthly and annual total irrigation requirement, RMI and RAI (m 3 ha -1 ), respectively.This information is applied in risk evaluations in which the cropping patterns are subject, in terms of financial viability and water shortage, in situations in which water resources for irrigation are limited.
The primary idea for the Monte Carlo simulation method is to obtain output random variables values, from input random variables values.Input random variable values are generated according to its cumulative distribution function, obtained from its probability density function (PDF).
For the monthly irrigation requirement, P-RISCO operates with PDF of standard normal distribution, truncated in extremities, on probability levels to be defined by the user (the program default is 5% and 95%).For other input variables, it is allowed to work in the present version with PDFs of the following distributions: normal, normal truncated, triangular and uniform.
It is considered that irrigation monthly requirements have correlation coefficient equal to one.This is done by obtaining, at each month, from the procedure inherent to Monte Carlo method, a value for the standard normal variable and, then, calculating the values for irrigation monthly requirements through equation ( 4): where, wr jym -values obtained for w jym equivalent to generated values of z, m 3 ha -1 ; SD w -standard deviation of w jym , m 3 ha -1 , and z -standard normal random variable.
It is observed that monthly mean values of w jym are used in equations ( 1) to (3).SD w value is obtained by multiplying the ratio of the standard deviation to the mean, RDPM (coefficient of variation), which should be informed by the user, by w jym .This ratio can be obtained from applications of the MCID program (BORGES JÚNIOR, 2004;FERREIRA et al., 2006).
RDPM varies each month.On the other hand, RDPM values in each month differ from RDPM in a yearly basis.Based on simulations performed with MCID, it has been verified that RDPM is, usually, less for the months in which the irrigation requirement is higher, approaching RDPM in a yearly basis.The highest interest to analyze the variability of irrigation requirement occurs in the months in which such requirement is higher, and the probability of water shortage for irrigation is also higher.Due to this aspect, RDPM should be provided in annual terms.This makes adequate, not only the irrigation analysis for the months in which the irrigation requirement is higher, but also the annual irrigation variability analysis.Thus, the RDPM value demand for each month is avoided, that would not provide expressive qualitative advantage for analysis and would make the procedure for obtaining and handling of those data harder.
As follows, a procedure implemented at P-RISCO is shown, considering stochastic the input variables: monthly irrigation requirement, crop yield, price of products, variable costs and annual discount rate.Begin

Repeat ni times Begin
-Obtain, ∀ j, y and m, from Monte Carlo method, a group of values for w jym , Y j , P j , C j and DR; -Calculate and store, ∀ j, y and m, values of the output variables U, RMI e RAI, i.e.: Ur = U(wr jym , Yr j , Pr j , Cr j , DR) RMIr ym = RMI my (wr jym ) RAIr y = RAI y (wr jym ) End Calculate distribution statistics of ni outputs of U, RMI and RAI End where, ni -number of iterations; Y j -crop yield of j-th activity, kg ha -1 ; P j -present value of price of a product for the j-th activity, R$ kg -1 ; C j -present value of costs, per area unit, for the j-th activity, R$ ha -1 ; DR -yearly discount rate, % Yr j -calculated value for Y j , kg ha -1 ; Pr j -calculated value for P j , R$ ha -1 ; Csir j -calculated value for Csi j , R$ ha -1 ; Ur -calculated value for U (R$) upon wr jym , Yr j , Pr j , Cr j , DR; RMIr ym -calculated value for total monthly irrigation requirement for the year y and month m, m 3 ha -1 , function of wr jym , and RAI y -calculated value for total annual irrigation requirement for the year y, m 3 ha -1 , function of wr jym .
The number of iterations should be defined by the user, reaching, at a maximum, 10,000 in the present version of the program.As results, the distribution of output variables is obtained, also being reported the mean, standard deviation, maximum and minimum values, as well as percentiles of the cumulative distribution of each output variable.
Another procedure related to risk simulation implemented on P-RISCO is the scenario analysis that identifies input variable combinations that result in specific values of output variables.On P-RISCO, this analysis can be led to output variable total net present value, aiming to get answers for questions such as: which variables contribute to a total net present value below zero or which input variables are significant so the total net present value can be superior to the value equivalent to a specific percentile.
The scenario analysis is based on a conditional median analysis.The procedure embraces the following steps: a) Median and standard deviation to each input variable are calculated for all iterations; b) A subset is created, containing only the iterations in which the total net present value (output variable) achieves the target defined by the user in the scenario analysis; c) Median is calculated for the subsets of input variables attached to the output variable subset, mentioned on item b; d) For each input variable, the difference between the median for all iterations (step a) and the subset median (step c) is calculated and compared to the standard deviation of input variables (obtained on step a).If the absolute value of the difference in medians is greather than 1/2 standard deviation, such input variable is, then, named "significant".Otherwise, the input variable is ignored in the scenario analysis, and e) Each significant input variable (step d) is listed in a table, containing results of scenario analysis.P-RISCO program was applied to the linear programming model described on the Part I of the work.Annual discount rate, irrigation requirement, crop yields and prices of products were considered as stochastic variables, according to TABLE 1.As output variables, the total net present value (U), yearly irrigation requirement and irrigation requirement in April months were considered.April has been chosen due to the fact that this month has been pointed out as critical in which refers to water available for irrigation, according to results obtained with the linear programming model (Part I).The simulations involved 10,000 iterations.Scenario analysis has been conducted in order to define which input variables are determining factors for the output variable total net present value in two subintervals: total net present value inferior to the corresponding to the 25th percentile and superior to the corresponding to the 90th percentile, i.e., U < U 25% and U > U 90% .
Aiming to verify the performance of P-RISCO program in the conduction of risk analysis, results generated by this program were compared to those obtained with the @RISK program version 4.0 (PALISADE CORPORATION, 2002).Output variables, in which a comparative test has been performed, were total net present value, irrigation requirement for year 1 and irrigation requirement for April of the first year.Results from scenario analysis obtained with two programs were also compared.

RESULTS AND DISCUSSION
The results from simulation performed for considered output variables, obtained with P-RISCO program, are presented on Table 2.For output variable total net present value (U), it is observed that all values resulting from simulations were positive.However, the mean of R$ 215,033.00 was considerably inferior to the maximum U value obtained in the linear programming model, equal to R$ 372,723.00(Part I of the work).This happened due to the distribution of probabilities accentually asymmetric for price and discount rate, as indicated on TABLE 1, observing that the price and discount rate values considered in the linear programming model are given as moda and not mean, in the respective probability distributions.The value of U corresponding to 10% of probability is R$ 166,193.13,i.e., it is verified a probability of 90% in obtaining U higher or equal to this value.Standard deviation of R$ 37,463.55 has been obtained.2, that a mean of 132,071 m 3 was obtained, for the annual irrigation requirement for Year 1, and maximum value of 147,663 m 3 , inferior to the constraint imposed in the linear programming model of 150,000 m 3 .With standard deviation equals to 4,234 m 3 , coefficient of variation was only of 3.2%, being low, as expected for probability distribution to annual irrigation requirement.TABLE 2. Simulation results for the variables total net present value (U), irrigation requirement for the first year (TIRY1), and monthly irrigation requirement for the April months for years 1; 2; 3 and 4 (TIRApr1, TIRApr2, TIRApr3 e TIRApr4, respectively).Also on Table 2, it is observed that, in monthly irrigation requirement for April of every year, values near constraint of the linear programming model equal to 15.000 m 3 , on the percentile 50th were obtained.These results were expected, considering this constraint has been limiting in the linear programming model and was considered normal probability distributions for monthly irrigation requirement (w jym ).Thus, in case there is implemented a cropping pattern determined in the linear programming model relative to the maximum total net present value (Parte I from work), the farm would be ahead of an expressive risk of water shortage, which could compromise the financial performance.

It is observed in Table
It is possible to apply the linear programming model to minimize the irrigation requirement at different total net present values (see Figure 3 on Part I of the work), varying only levels of activities that affect the irrigation requirement in April, in similar procedure as the one described by BORGES JÚNIOR et al. (2003).
On Figure 1 it is shown cumulative probability distributions for the requirement of irrigation in April, of year 1, for two cropping patterns: April-1A, related to the maximum total net present value of R$ 372,732.00, and April-1B, related to the cropping pattern obtained with minimization of the irrigation requirement in April, on the four years considered, fixing the total net present value in R$ 370,000.00(0.7% inferior to maximum value).It is also stressed that, for the second cropping pattern, in spite of an undermost reduction in the total net present value, there was an expressive decrease of 19% of total irrigation requirement in April, in four years.In the second case, it is observed a non-indication of risk that the irrigation requirement in April of year 1 exceeds the constraint of 15,000 m 3 .Similar results are obtained for April in the years 2; 3 and 4.
In Table 3, the results from scenario analysis were presented, obtained through P-RISCO program.It is observed that, for the interval U < U 25% and interval U > U 90% , critical input variables were the selling price for passion fruit crop, presented in the optimum solution of linear programming model, in the first and second cropping, in years 2 and 4, respectively.This result indicates selling price for passion fruit has and expressive influence over the financial performance of the enterprise.The comparison of simulation results obtained with P-RISCO and @RISK programs is presented in Tables 4 to 6.
In Table 4, it is observed that, with the exception of extreme values (minimum and maximum), the absolute values of percentage differences obtained for the output variable total net present value were inferior to 0.6%.By dealing with the simulation results using the Monte Carlo method, the results are not expected to be equal.Most differences in the extremes are also expected, since the sampling process in the Monte Carlo method is completely random (opposite to techniques as the Latin Hypercube and the Descriptive Sampling) and eventual discrepancies in the extreme may occur inclusive in results obtained with the same program in two different simulations.TABLE 4. Comparison of results obtained by P-RISCO and @RISK programs, for output variable total net present value (U).
U (R$) P-RISCO @RISK Difference (%) The scenario analysis results obtained with @RISK are presented in Table 7. Comparing these results with those obtained with P-RISCO, presented in Table 3, it is verified that the same input variables were indicated as significant, in both U subintervals considered (U < U 25% and U > U 90% ).The parameters probability equivalent of input variable (Percentile, %), input variable value and the ratio of the median difference to the standard deviation (MD/SD), obtained with the two programs, were also near.Percentiles differences varied from -1.48 to 0.93%, while, the values ranged from -1.89 to 0.17%.These differences were expected due to the fact that were results obtained from simulations based on random sampling by Monte Carlo method.It should be stressed that, in P-RISCO results, MD/SD parameter is given in absolute value.Obviously, the values are negative for the interval U < U 25% , according to what was indicated by @RISK.
The small differences presented in Tables 4 to 6 and the results related to scenario analysis, presented in Tables 3 and 7, indicate the equivalence between two programs to perform the risk analysis based on simulations from the linear programming model considered.

CONCLUSIONS
In the risk analysis, it was observed that all generated values, resulting from simulations, were positive for the total net present value (U), indicating the non-expectation of a financial failure risk.However, the mean R$ 215,033.00 was considerably inferior to the maximum U value of R$ 372,723.00obtained in the linear programming model.It has been verified that the enterprise would be ahead the expressive water shortage risk in April, which does not occur for the cropping pattern obtained with the minimization of irrigation requirement in April of four years.Scenario analysis indicated that the selling price for passion fruit farming has expressive influence over the development financial performance.
Based on the comparison of cumulative probability distribution of output variables total net present value, irrigation requirement for year 1 and irrigation requirement for April of the first year, as well as in the comparison of scenario analysis results, an equivalence of P-RISCO and @RISK programs were verified in the conduction of risk simulation for the scenario considered.

TABLE 1 .
Stochastic variables in risk analysis, with respective probabilities distributions and distribution parameters -minimum value (min), maximum value (max), moda (mo) and standard deviation (SD).

TABLE 5 .
Comparison of results obtained by P-RISCO and @RISK programs, for output variable irrigation requirement for the year 1 (TIRano1).

TABLE 6 .
Comparison of results obtained by P-RISCO and @RISK programs, for output variable irrigation requirement for April month in year 1 (TIRAbrA1).

TABLE 7 .
Results of scenario analysis obtained by @RISK program, pointing the ratio of the median difference to the standard deviation (DM/SD).