Content area
In order to analyze, understand and prescribe natural resource management strategies, the decision making framework should ideally capture the dynamics of inter-dependency between the economic and ecological systems in an integrated manner. However, by including two complex systems within a single integrated framework makes many of the present analytical tools redundant. Computational models on the other hand are ideally suited to meet this challenge. The size and complexity of models solved through numerical techniques have increased exponentially over the last decade. This is especially true for non-linear optimization models. However, although the science of solving non-linear models has improved significantly, the solving of these models is still an art. In this paper, we look at the critical parameters that a modeler needs to be aware of when developing integrated economic-ecology models and some "tricks" to solve them with the minimum of effort through the use of the optimization software GAMS (General Algebraic Modeling System). [PUBLICATION ABSTRACT]
*u*n*s*t*u*r*t*u*r*e**t*e*x*t*
Computational Economics 18: 193-215, 2001. (C) 2001 Kluwer Academic Publishers. Printed in the Netherlands. 193
Formulating and Solving Nonlinear Integrated Ecological-Economic Models Using GAMS
ANANTHA KUMAR DURAIAPPAH Institute for Environmental Studies, Free University, De Boelelaan 1115, 1081 HV Amsterdam, E-mail: [email protected]
(Accepted 27 January 2000) Abstract. In order to analyze, understand and prescribe natural resource management strategies, the decision making framework should ideally capture the dynamics of inter-dependency between the economic and ecological systems in an integrated manner. However, by including two complex systems within a single integrated framework makes many of the present analytical tools redundant. Computational models on the other hand are ideally suited to meet this challenge. The size and complexity of models solved through numerical techniques have increased exponentially over the last decade. This is especially true for non-linear optimization models. However, although the science of solving non-linear models has improved significantly, the solving of these models is still an art. In this paper, we look at the critical parameters that a modeler needs to be aware of when developing integrated economic-ecology models and some `tricks' to solve them with the minimum of effort through the use of the optimization software GAMS (General Algebraic Modeling System).
Key words: non-linear, optimization, integrated, computational, GAMS
1. Introduction In order to analyze, understand and finally prescribe policies related to the management and use of natural renewable resources, the decision making framework should ideally have adequate knowledge of the interactions between economics and ecology. One without the other can only give a partial and in many cases erroneous view of the problem. However, for various reasons, the integration has been slow, both from the ecological and economic sciences. Many reasons can be cited for this inertia but inter-disciplinary communication problems plus the lack of quantitative tools must definitely come top of the list. This paper addresses the limitations in tools and puts forward a programming platform which will hopefully accelerate the integration process.
One factor is common to both disciplines and therefore sets the conducive environment for integration: this is the predominant use of mathematical models to analyze and study behavioral relationships. However, they differ in: (1) the degree of detail they capture the `other' system; and (2) the techniques they use to solve these models. Ecologists use what are termed ecology-cum-economic models (Ver194 ANANTHA KUMAR DURAIAPPAH bruggen, 1998) and rely on the use of system dynamics to formulate and solve their models. They are primarily interested in investigating how the ecological system behaves under a specified set of policy instruments. They then go on to use sensitivity analysis to observe changes in these endogenous variables for different policy scenarios. Economists have been quick to criticize these studies, arguing that the economic system is not an inert system as presently modeled by ecologists (de Bruyn, 1999). They argue for a more dynamic representation of the economic system that incorporates simultaneous reactions by the economic system to changes in the ecological systems.
Economists, on the other hand, use economic-cum-ecology models, and are interested in deriving optimal policy responses to a specified system. They have been diligent in modeling robust dynamic economic systems, but have been as guilty as the ecologists in being less attentive to capturing the dynamics of the `other' system. One reason for this behavior may be traced to their dependence on analytical optimization tools to find solutions to their models. Analytical tools have provided valuable insights into the understanding of economic systems and their mechanisms. Analytical methods, however, are constrained in the degree of complexity and size of models that can be studied. Models need to be relatively simple and small in order to preserve their tractability, so adding ecological dynamics would only make the system unwieldly and difficult, if not impossible to solve.
Over the last five to ten years, economists working in the field of climate change have begun to incorporate more complex ecological systems (the climate system) within conventional economic growth models (Nordhaus, 1994; Duraiappah, 1993). A number of factors have influenced this trend. First, the development of computer technology, both hardware and software, has played an integral role in motivating economists to adopt numerical techniques to solve larger and more complex problems than analytical tools would have allowed them. Second, the nature of the problem highlighted the fact that any analysis which did not include and capture the dynamics between the economic and climate system would be erroneous and policy prescriptions evolving from analysis might exacerbate rather than mitigate the problem. However, this trend has been localized within the climate change community and there is very little similar momentum in other areas of environmental economic research. Natural resource management models can still be classified as either economic-cum-ecology or ecology-cum-economic models. It is an area where much work still needs to be done.
This paper is a response to the above challenge. It begins by highlighting some of the critical issues which arise and which need to be addressed if proper integration of ecological and economic models is to be achieved. It then goes on to address the problems that are encountered while trying to solve these integrated models in an optimization framework. In order to make the exposition clear, an integrated economic ecological model developed for the shrimp sector in Thailand is used as an illustrative example in this paper.1
SOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 195
The paper is structured as follows. Section 2 presents a brief description of the complexities which arise when ecological and economic systems are integrated within a single decision making framework. Section 3 highlights some typical problems encountered while solving this class of models using the programming language GAMS2 (Brooke et al., 1992) and techniques for solving these problems are discussed. The paper ends with some concluding remarks.
2. The Formulation of Integrated Ecological-Economic Models There are three unique dimensions which need to be addressed in IEE (Integrated Ecological-Economic) models.
* Non-linearity.*
Units of measurement.* Aggregation.
All three factors can cause IEE models to become mathematically complex and make analytical solutions unwieldy. The response to this inherent difficulty is to turn to numerical techniques to help solve the models. However, the solution of non-linear mdoels by numerical methods is nontrivial and is still considered an art rather than a science, even with the impressive improvements in both computer hardware and software. This paper attempts to provide a systematic approach to the formulation and solution of nonlinear IEE models. The paper does not claim to present new and novel techniques for solving nonlinear IEE models. The primary objective is to highlight critical issues that need to be resolved when IEE models are formulated and also to provide a `bag of tricks' to resolve problems encountered when solving these models using the GAMS programming language.
In the remainder of this section, I begin by first demonstrating why nonlinearity is an inherent property of IEE models and then go on to illustrate how scale and aggregation issues emerge within and complicate an integrated framework.
2.1. NONLINEARITY The complexity of an integrated system varies, depending in turn on the complexities of the individual systems. The critical factor that makes ecological and economic models complex is the presence of feedback loops.3 Each system has a good number of these relationships and it is the presence of these that make the models rich and takes us one step closer to reality. When systems are integrated, we are now faced not only with feedforward and feedback links within the systems but also between systems. The inclusion of these feedback links between systems has an important implication for the soltuion of the model; feedback links between systems inevitably produce a nonlinear integrated model. A simple example
196 ANANTHA KUMAR DURAIAPPAH should illustrate the point. A simple economic identity equation is presented below whereby output can be used for either consumption or investment.
yt = ct + it . Next, a waste generation equation is introduced which states that waste is generated by economic input.
wt = \Upsilon yt . To illustrate the inherent nonlinearity that arises from IEE models, all explicit relationships are modeled as linear formulations. The Greek terms used in this model all represent constant coefficients. Next, a simple capital output Leontieff type production function is used. The capital output ratio is time varying.
zt yt = kt . Again, to keep things simple, a linear relationship is adopted to link capital output coefficient to the state of environmental resource. This equation states that the productivity of capital can be influenced by changes in the environmental state.
zt = \Omega St . The state of environmental resource is modeled as a first order difference equation. The relationship is linear and is determined primarily by the generation of waste.
st+1 = flst + ffiwt . The fl factor captures the intrinsic properties of the environmental resource system. In reality, this will be itself a function of many other factors but we keep it simple just to elaborate our point. The ffi coefficient tells us the rate of degradation that waste contributes. This coefficient is negative. The last equation is the standard capital accumulation equation, which stipulates that capital depreciates (ffl) and can accumulate through investment.
kt+1 = fflkt + it . This completes our simple economic-ecological model.
Now, if we substitute w in the environmental resource state equation we get the following reduced equation.
st = flst-1 + i kt\Omega s
t .
A relatively simple linear model now becomes a relatively complex nonlinear model. This model can undoubtedly still be solved using analytical tools available in programs like Mathematica and Matlab. However, the model presented above can be considered as the one of the simpler representations of an IEE model. In
SOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 197 reality, IEE models will be highly nonlinear and larger in size than the model presented above.
2.2. UNIT OF MEASUREMENT One of the major differences between ecology and economic systems is the unit used for measuring: (1) indicators of system performance; (2) time; and (3) space. In economics, the main indicators are always denoted in monetary units and, depending on the level of analysis (micro, sector, macro), can run from thousands of currency units to billions or even trillions. Therefore, the unit of denomination can be either a dollar or a billion-dollar. In the case of the former, if the final value of an economic variable is 100 billion, then the actual value used in model computations will be 100,000,000,000. However, if the unit of denomination is a billion, then the numbers used in model computations will be in the range of 100. Computationally, working in the range of three digits is definitely an advantage to working in magnitudes of the order of 12.
In the case of ecological systems, the indicators used are very different from those in the economic systems and so, inevitably, are the units of measurement. Physical units like kilograms for weight, hectares for areas, meters for distance etc. are common in ecological systems. These indicators can also vary in scale and in most models these variations can be quite large, running in the order of 12-18. The same dynamics that dictate the choice of units in the economic system are relevant for the ecological system.
The challenge in the choice of units really arises when the two systems are integrated, as in the case of IEE models. A choice of unit in an ecological model by itself may become inappropriate when it is integrated within an economic model and vice versa. The modeler will need to ensure that choice of units within the two systems is such that the rules adopted within single systems are the same as in the integrated system. In other words, 100 billion dollars in the economic system will not be in complementarity with 100,000,000 kilograms per hectare. A more appropriate unit of denomination in this case would be a million kilograms per hectare which then brings the level to 100; similar to levels in the economic system. In the event that there is a transformation of the physical unit to a monetary value by a price mechanism, then careful attention must be paid to ensure that the monetary values are expressed in billion dollars and not in some other denomination. The rule of thumb for nonlinear models is that the range over which values lie should not exceed a magnitude of 104 (Drud, 1996; MacCarl et al., 1997).
Time is another item where there can be vast differences between the two systems. Within the time dimension, there are two levels that need to be differentiated. The first level involves determining the time step for analysis. The time step relates to the time unit over which the dynamics of a system are modeled. The second level of time refers to the time horizon over which the model is solved. The link between the two occurs when the time steps are aggregated over the time horizon.
198 ANANTHA KUMAR DURAIAPPAH
Table I. Model options and model size. The numbers are computed by multiplying the number of equations by the time step and the time horizon.
Model option Number of equations Ecological model 1260 Economic model 45 IEE (ecological time step and horizon) 2520 IEE (economic time step and horizon) 90 IEE (compromise) 300
Economists are comfortable working in time steps ranging from quarters to annuals and solving models for time horizons ranging from a year to a decade. Very rarely do economic models span time horizons extending over a hundred years. Ecologists, on the other hand, work in time steps and time horizons ranging from days to millennia, depending largely on the scope of the study. The problem in IEE model formulation arises when the topic under investigation has very different economic and ecological time steps and horizons. For example, in the case of shrimp management the ecological system's time steps are dictated by shrimp growth dynamics: this therefore requires ideally a monthly time step, while economic systems are usually dictated by accounting conventions, ideally requiring annual time steps. When it comes to time horizons, a time span of approximately 5 years is required for the ecological system in order to capture disease outbreaks, while in the case of the economic component, a 3 year time horizon is sufficient to capture the essential dynamics of investment and financial returns.
A number of options are possible. Let us assume that the number of equations describing each system if modeled in isolation is 15 while in the integrated framework the number of equations is 30, as in the case of the shrimp model discussed in this paper (Duraiappah, 1999). The number of equations for a number of model options is shown in Table I.
The IEE model with the ecological dominated time step and horizon produces the largest model. A 2520-equation model with nonlinearities will be difficult and time consuming to solve. On the other hand, the 90-equation IEE model will lose the essential properties of the ecological system's dynamics, making the model redundant. A compromise in which the one-month time step is changed to a sixmonth time step (losing some information on shrimp growth dynamics) but keeping the time horizon at 5 years (maintaining dynamics on shrimp diseases), produces a manageable model size of 300 equations. The actual size is to a large extent determined by the objectives of the study and the degree of comprise which can be made by each discipline, without losing the essential properties crucial to the objectives of the study. Once the initial model prototype has been formulated,
SOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 199 solved and made robust, then extensions to time steps and time horizons can easily be added without too much investment of time and effort.
In a similar fashion, spatial steps and spatial horizons pose the same problem of resolution convergence as the time dimension. Ecological systems have spatial boundaries that are clearly differentiated by the properties of the system. For example, in the shrimp sector it is postulated that differences in soil may have significant impacts on shrimp growth rates. If the model does not make this distinction, then results from the model may be wrong. But, similar to time, caution must be exercised in determining the number of soil classifications to be captured in the study; too large a number can result in an unnecessarily large model. The spatial horizon, on the other hand, is defined in a majority of cases by the objectives of the study. In the case of the shrimp model, the spatial horizon covered was determined by geographical boundaries like mountains, rivers and swamps as well as the suitability of the land for shrimp cultivation.
Economic systems have very different criteria for defining spatial boundaries. The need for a spatial step does not normally arise in economic models. In a majority of cases, the need for a spatial dimension arises because of price differentials caused by spatial dynamics. The spatial span is then determined by the size of these differences as well, of course, as the objectives of the study; for example, if the study focuses on regional issues, then the spatial horizon should be limited to regional borders, etc. In IEE models, the general rule of thump is that spatial step is normally determined by ecological properties and study objectives while the spatial horizon is determined jointly by both economic and ecological properties as well as the study objectives.
2.3. AGGREGATION DYNAMICS In IEE models, the objective is in a majority of cases the maximization or minimization of a discounted sum of net welfare benefits or costs respectively. In either case there will come a point where variables, both economic and ecological, will need to be aggregated over both time and space. Although the process of aggregation is by itself a trivial task, the size of the final aggregated values can become very large and pose numerical problems when solved.
For example, in the case of the shrimp model, the initial decision to use seed input quantities in single unit denominations was found to be too small by a magnitude of six. The aggregation of seed purchase over a six-month time interval and over a five-year time horizon and using a spatial step of 4 rai4 spanning a spatial horizon of 9 million rai resulted in levels of magnitude of the order of 10E + 15. This required a re-scale of the unit of denomination for seed input by a factor of 10E + 6 and the spatial units by an equal magnitude, thus bringing final levels down to 10E + 3, thus satisfying the rule of thumb.
This section of the paper has focused primarily on critical issues that arise when IEE models are formulated. Formulation, however, is only the first step. The next
200 ANANTHA KUMAR DURAIAPPAH
Figure 1. The error correction procress for nonlinear IEE models in GAMS. step involves discovering, optimal and realistic solutions to the model. This is the next topic of discussion.
3. Solution of Nonlinear IEE Models in GAMS GAMS (General Algebraic Modeling System) is a powerful program which allows modelers to solve a range of models from simple linear models to highly nonlinear dynamic models. In this paper I focus on nonlinear IEE models. The first part of this section highlights and discusses the main problems encountered while solving nonlinear models. The second part then focuses on techniques for solving these problems.
The program has two platforms. The first can be considered as the language translation part, whereby the mathematical model is translated into a format compatible with the nonlinear algorithms. This paper assumes that the reader has some basic knowledge of the GAMS program and therefore does not describe syntax and programming attributes of the program.
Figure 1 gives a schematic illustration of the various stages through which a solution process passes in GAMS. I shall not go into the first three stages of error detection and correction in detail. The procedures to correct them are relatively straightforward and GAMS provides adequate diagnostic help in guiding the modeler to rectify the mistakes. However, very briefly, compilation errors are caused by mistakes in syntax and involve the not too difficult a task of debugging the mistakes. Evaluation errors are primarily caused by instances where a division by
SOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 201 zero, log of a negative number or an exponential overflow are encountered. The best method of overcoming these is through the use of bounds on the appropriate variables. Solver errors are similar to evaluation errors but are detected by the solver and not by GAMS. A typical example in this category is when, in the case of nonlinear models, first derivatives are taken and evaluated and a division by zero is encountered in the process. The safe step to take is to set lower bounds (e.g., 0.0001) on these variables and the problem shuold be rectified. However, be warned, setting lower bounds of 0.0001 on a variable which is also used in a log operation can cause some very nonsensical results, even if a feasible and optimal solution is established (stage 7). For example, in the translag equation illustrated below and used in the shrimp model, a lower bound of 1 is used for variables that undergo a log operation in the model.
SR(R, P, D,\Pi \Pi OP\Pi \Pi , TP) = E = 5.1037 * LOG(FI(R, P, D,\Pi \Pi OP\Pi \Pi , TP)) + 1.6557 * LOG(SI(R, P, D,\Pi \Pi OP\Pi \Pi , TP)) -
0.3244 * LOG(FMD(R, TP)) + 0.05 * SQR(LOG(FMD(R, TP))) - 0.1189 * SQR(LOG(FI(R, P, D,\Pi \Pi OP\Pi \Pi , TP))) -
34.42 * (LOG(FI(R, P, D,\Pi \Pi OP\Pi \Pi , TP))/LOG(SI(R, P, D,\Pi \Pi OP\Pi \Pi , TP) + 0.0001)) -
0.18 * SQR(LOG(SI(R, P, D,\Pi \Pi OP\Pi \Pi , TP))); FMD.LO(R, T) = 1; FI.LO(R, P, D, W, TP) = 1; SI.LO(R, P, D, W, TP) = 1;
Note: Also notice that a 0.0001 has been added to the LOG(FI)/LOG(SI) term. This has been done to prevent a division by zero operator which will occur at the lower bound for SI.
The real task of solving a nonlinear model begins at stage 4. A number of solver messages can then be produced, depending on the problems encountered. Although the messages can vary across the various nonlinear solvers that come with the GAMS package, in general the messages are highlighting the same problem. There are two main problems which can arise when solving nonlinear models: (1) an unbounded solution; and (2) a infeasible solution.
3.1. UNBOUNDED SOLUTION An unbounded solution can occur for two reasons:*
Model inconsistency;* Bad scaling.
Model inconsistency can occur when bounds inherent to the problem being solved are not included within the model structure. These are called model bounds (Drud, 1996). These are relatively easy to trace and correct in GAMS. The more common reasons for nonlinear models becoming unbounded is related to poor scaling of the model. In the process of finding a solution to a nonlinear model, functions and their derivatives are evaluated continuously using values for the various variables in the model. If the model has not been well scaled, then values for variables can become
202 ANANTHA KUMAR DURAIAPPAH very large and the evaluations of the functions and their derivatives can exceed the default upper bounds set by the solver. If this occurs then two remedies are possible. The first is to adjust the default level higher through the use of an option file. This sometimes solves the problem but, in many instances, the values just get larger and the unbounded error message is produced again. The second option is to identify the variables which are becoming too large and re-scale them. A section on scaling techniques is presented later in this paper.
3.2. INFEASIBLE SOLUTION This message is one, if not the most frequently received when nonlinear models are being solved. There are many reasons, which can cause the model to become infeasible. The three most common are:*
Model inconsistency;* Bad scaling;* Bad initial conditions.
Model inconsistency in feasible solutions involves slightly more work than just adding bounds on a number of key variables. First, check on parameter values used in the model needs to be carried out to ensure that there is no inconsistency with the values and the constraints. Second, a diagnostic check on the constraints should be carried out to check again for any consistency violations within the overall model structure. A simple example from the shrimp model should illustrate the point. Assume that there is an upper limit on the total amount of abandoned land allowed at terminal period. Next, there is a fixed amount of abandoned land specified at the start of the planning period and there is a behavioral equation which computes the amount of land abandoned in each time step and adds this to a land abandonment accumulation equation. However, there is no scope of abandoned land becoming available for shrimp farming again. The model becomes infeasible if there is an inconsistency between the initial amount and the terminal condition. These problems are relatively easy to rectify. Infeasible constraints are highlighted in the GAMS output listing and therefore help the modeler to identify the problem equations relatively easily.
Bad scaling can also cause the model to become infeasible. This problem is significant in the class of models discussed in this paper because of the different units used for time, space and physical measurement between the economic and ecological systems. It is therefore imperative to resolve scale issues while formulating the model and follow the 104 rule for scale ranges. Some solvers offer automated scaling options and these are discussed in the section on overcoming scaling problems later in the paper.
Bad initial condition is the third most common reason for a model to become infeasible. A solver needs help and guidance in finding a solution. One way is to point it in the right direc tion to look for the solution. If initial conditions are
SOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 203 not explicitly specified, the solver always starts evaluations from zero (the default) initial conditions and depending on the degree of nonlinearity, the solver may not be able to move away from this initial point. Moreover, the problem is exacerbated if there are relatively flat surfaces around the default initial conditions. There are numerous ways to provide `good' initial conditions and these will be discussed below.
3.3. OVERCOMING SCALING PROBLEMS Why are scaling problems considered one of the primary obstacles to finding solutions to IEE nonlinear models? Scaling becomes a critical issue in the class of models we are discussing in this paper. Two systems with very different physical units of measurements - time profiles and finally space - are being integrated into one framework. As far as the nonlinear solver is concerned, it does not make a distinction between the two but treats it as one system, which needs to be solved. Nonlinear solvers have a low tolerance threshold for a wide range of values. This is true for both the values of the variables as well as their derivatives. The modeler needs always to keep at the back of his or her mind the range over which all variables lie and ensure that this range does not extend beyond a magnitude of four. This in essence is one of the primary challenges in formulating these integrated models.
For example, in the equation below, a scaling factor of a 1000 is used to scale down the values for four input purchases. The reason for the scaling was primarily caused by the very large numbers generated by seed purchases as can be observed in the input-output table A in the GAMS file (see GAMS file in Appendix 1).
MBR(CFV, R, P, D, W, TP).. U(CFV, R, P, D, W, TP) * 1000 = E = A(CFV, P, D, W) * Z(R, P, D, W, TP);
Another important point to observe is that the purchase variable `u', has been scaled by the same factor throughout the model in order to ensure consistency. This is one aspect, which must be remembered and in many instances overlooked or ignored. Another point to note is the use of the scaling factor. Rather than divided the lefthand side by a 1000, a multiplication factor is used on the right-hand side. This is to prevent unnecessary introduction of nonlinear components in the model. Another approach would have been to scale the need input by a factor of 6 and convert area units from rai to hectares within the A matrix. This would immediately reduce the present range of values, which lie in the region of 10E + 15, by 10E + 12. But in this case, the prices must be revised in order to reflect the new levels. These scaling operations should be applied to all variables, regardless they are intermediate or final variables.
There may be instances where, even with the use of appropriate units, the values in the model are still large. This can happen in particular to IEE models due to the vast differences in units and ranges over which values can lie. This then requires
204 ANANTHA KUMAR DURAIAPPAH a scaling of the entire `problem' constraint or equation. This basically requires all variables and terms in the equation to be scaled in a manner such that the 10E + 4 rule is satisfied. But a word of caution is necessary. Scaling all terms in an equation may in turn cause one or more variables within the equation to become excessively large or small and cause problems for the solver. This may in turn require the problem variable within the equation to be scaled accordingly, which in turn requires the scaling operation to be done throughout the model for that particular variable. Ensuring consistency of variables and consistency across equations can become a tedious and non-trivial but necessary task.
GAMS offers an option whereby automatic scaling is done during processing. This option is turned off by default. The automatic scaling option is in a majority of cases insufficient to rectify the scaling problems encountered in the IEE class of nonlinear models. Moreover, scaling the model manually often provides the modeler with new insights into model behavior.
3.4. OVERCOMING BAD INITIAL CONDITIONS A solver needs to start its search for an optimal solution from some point. The default starting point for all solvers is zero by default. Therefore, first derivatives are evaluated at this point and the search begins. In many cases, depending on the degree of nonlinearity and the smoothness of the functions, the solver may get stuck at the zero point or very near to this point and after a number of attempts it gives up and returns with an infeasible solution. In the case of Integrated EconomicEcological (IEE) models, the zero default assumption is in many cases redundant. In intertemporal models, initial conditions have to be explicitly specified in the model. For example, in the shrimp model presented in Appendix 1, initial levels for land uder shrimp farms and the amount of land abandoned for the first time period is fixed at some level based on empirical data. If these values are not explicitly fixed within the GAMS models, a value of zero is taken and this is empirically wrong. In this way, initial levels for all `state' variables should ideally have fixed initial conditions. But this by itself is not sufficient.
It is important, and in many cases essential, to assign initial values to nonlinear variables. In this case, assignment does not imply fixing the values but rather suggesting plausible values the variables migth take. This is different from the initial levels specified for the model's state variables, which are fixed at historical levels. In the GAMS model in Appendix 1, there are variables that have representative values explicitly specified. These values are not fixed and only represent plausible values for these variables. The solver will use these variables as initial points and a search is made within the neighborhood of these values to see if improvements can be made to the objective function. In instances of high nonlinearity one may need to specify a nominal path or, in other words, plausible values over the whole time path.
SOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 205
In many instances, the modeler may not have a clue about the values for some of the nonlinear variables. What then? A number of options are available and we shall look at these in turn, beginning with the simplest and easiest to implement. The first option would be to have a couple of solve statement. This means that if an infeasible result is returned in the first solve, than the solver uses the results from that solve as initial conditions for the next solve and hopefully finds convergence. If this does not work, the next option is to use another solver, in this case MINOS5. If the model is still infeasible, than a little more work is necessary.
Start small and simple is universal advice for all nonlinear modelers. However, as mentioned earlier, in IEE models, small and simple is already complex from a numerical perspective. But a number of options are available. First, identify the variables and equations which are being `difficult'. These can be identified from the variable and equation listing in the output file. These variables or equations will be marked with an `infeasible' message. Once these have been identified, there are two ways to proceed. The first option would be to build the model up by starting with the simplest version and then add in the nonlinear equations one by one in each subsequent solve statement. As mentioned earlier, GAMS will use the values provided in the last solve as initial conditions for the next solve. In this manner, the modeler can build the model piecewise. The second way is by replacing nonlinear equations with linear versions and then using the solution as initial condition for the subsequent solve which has the nonlinear equation.
A combination of these techniques is used in the shrimp model. In the first solve statement (OSIA), a simple linear economic model is solved. In the second solve statement (OSIA1), the ecological model is included but is not taken into account in the optimization process. The economic model is still linear. In the third solve statement (OSIA2), the ecological model still has no influence on the economic model. The economic model is upgraded to the nonlinear version. The fully integrated model is run in the fourth solve statement (OSIA3). It is interesting to note that with a change in certain parameters, an infeasible solution is returned by the solver (OSIA4) but a subsequent solve statement (OSIA5), in which no changes are made to the model structure but with just a set of different initial conditions which were provided by OSIA4, yields an optimal solution.
This process of using a series of solve statements could be time consuming were it not for the save and restart feature of GAMS. This property of GAMS allows solutions from an earlier solve to be saved and used for subsequent solves. This eliminates the time required to solve the initial model again each time an adjustment is made in the later solve statements. In other words, the solution from OSIA3 or OSIA5 can be used as the starting point for any subsequent model solutions whereby changes to model structure of parameters are made and tested.
The last piece of advice for the modeler is to keep a log of the solution process. The log will help: (1) the modeler keep track of and monitor all adjustements and modifications made in the process of solving the model; and (2) help eliminate
206 ANANTHA KUMAR DURAIAPPAH many of the problems encountered earlier and prevent the repetition of similar mistakes in future modeling exercises.
4. Conclusion It can be seen from the discussion above that solving nonlinear models is still an art rather than a science. However, the improvements over the last decade in solver algorithms have reduced many of the tasks which in the past were left to the modeler. Heuristic checks are being continuously upgraded and built into the solver algorithms. These advances in software technology, together with improvements in computer processing speed, can only contribute to the adoption and use of IEE models in the field of natural resource management. Significant strides have been made by climate change IEE models and their contribution to policy prescription has been significant. It is hoped that this paper will in a small way open the door to more IEE models, addressing a wide range of natural resource management issues to be formulated for policy analysis and prescription.
SOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 207 Appendix 1 208 ANANTHA KUMAR DURAIAPPAHSOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 209210 ANANTHA KUMAR DURAIAPPAHSOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 211212 ANANTHA KUMAR DURAIAPPAHSOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 213214 ANANTHA KUMAR DURAIAPPAHSOLVING NONLINEAR INTEGRATED ECOLOGICAL-ECONOMIC MODELS USING GAMS 215 Notes
1 The mathemaical model can be accessed at the following web site: http://sites.netscape.net/ aduraiappah/
2 This paper assumes that the reader has basic knowledge of the GAMS program. The reader can
acquire a quick overview of the program in the papers by Duraiappah (1991), and Kendrick and Mercado (1998).
3 Feedback loops are defined in this paper as behavioral relationships whereby an effect produced
by a causal factor has an impact, in turn, on the causal variable itself.
4 A rai is a unit of measurement for land area in Thailand. 1 hectare= 6.25 rai.
References Brooke, A., Kendrick, D. and Meeraus, A. (1992). GAMS: A User's Guide. Scientific Press Series,
Boyd and Fraser Publishing Co., Danvers, MA 01923. De Bruyn, S.M. (1999). Economic Growth and the Environment: An Empirical Analysis. Tinbergen
Institute Research Series, No. 216. Amsterdam, The Netherlands. Drud, A.S. (1996). CONOPT: A system for large scale nonlinear optimization. In Reference Manual
for CONOPT Subroutine Library. ARKI Consulting and Development A/S, Bagsvaerd, Denmark. Duraiappah, A.K. (1993). Global Warming and Economic Development: A Holistic Approach to
International Policy Cooperation and Coordination. Kluwer Academic Publishers, Dordrecht. Duraiappah, A.K. (1991). GAMS: A stylistic approach to economic modeling. Computer Science in
Economics and Management, 4, 303-309. Kenrick, D.A. and Mercado, P.R. (1998). Teaching macroeconomics with GAMS. Computational
Economics, 12, 125-149. MacCarl, B. and Spreen, T.H. (1997). Applied Mathematical Programming. The book is available at
site: http:agrinet.tamu.edu/mccarl/regbook.htm Nordhaus, W. (1994). Managing the Global Commons: The Economic of Climate Change. MIT
Press, Cambridge, Massachusetts. Verbruggen, H. (1998). Environmental research and modeling. In P. Vellinga (ed.), Managing a
Material World, 97-110. Kluwer Academic Publishers, Dordrecht, The Netherlands. Tol, R.S.J. and Vellinga, P. (1998). The European forum on integrated environmental assessment.
Environmental Modeling and Assessment, 3, 181-191.
Copyright Kluwer Academic Publishers Oct 2001