United States
Environmental Protection
Agency
Integration of an
Economy under Imperfect
Competition with a
Twelve-Cell Ecological Model

-------
                                                  EPA/600/R-06/046
                                                  July 2006
Integration of an Economy under Imperfect

                  Competition with a

          Twelve-Cell Ecological Model

                               by

                     Harland Wm. Whitmore, Jr.
                       Department of Economics
                       University of Cincinnati
                        Cincinnati, OH 45221

                               and

              Christopher W. Pawlowski,* Heriberto Cabezas,
                Audrey L. Mayer, and N. Theresa Hoagland
                    Sustainable Technology Division
              National Risk Management Research Laboratory
                        Cincinnati, OH 45268
                           Project Officer
                         Heriberto Cabezas
                    Sustainable Technology Division
              National Risk Management Research Laboratory
                        Cincinnati, OH 45268
              National Risk Management Research Laboratory
                   Office of Research and Development
                  U.S. Environmental Protection Agency
                        Cincinnati, OH 45268
 Postdoctoral Research Fellow, Oak Ridge Institute for Science & Education (2001-2005)

-------
                                      Notice

The U.S. Environmental Protection Agency, through its Office of Research and Development,
funded and collaborated in the research described here under the Simplified Acquisition Order
Number 4C-R101-NASA to H.W. Whitmore. It has been subjected to the Agency's review and
has been approved for publication as an EPA document.
                                    Disclaimer

Mention of trade names or commercial products does not constitute endorsement or
recommendation for use.

-------
                                      Foreword

The U. S. Environmental Protection Agency (EPA) is charged by Congress with protecting the
Nation's land, air, and water resources. Under a mandate of national environmental laws, the
Agency strives to formulate and implement actions leading to a compatible balance between
human activities and the ability of natural systems to support and nurture life. To meet this
]mandate, EPA's research program is providing data and technical support for solving
environmental problems today and building a science knowledge base necessary to manage our
ecological resources wisely, understand how pollutants affect our health, and prevent or reduce
environmental risks in the future.

The National Risk Management Research Laboratory (NRMRL) is the Agency's center for
investigation of technological and management approaches for preventing and reducing risks
from pollution that threaten human health and the environment.  The focus of the Laboratory's
research program is on methods and their cost-effectiveness for prevention and control of
pollution to air,  land, water, and subsurface resources; protection of water quality in public water
systems; remediation of contaminated sites, sediments and ground water; prevention and control
of indoor air pollution; and restoration of ecosystems. NRMRL collaborates with both public
and private sector partners to foster technologies that reduce the cost of compliance and to
anticipate emerging problems. NRMRL's research provides solutions  to environmental problems
by: developing and promoting technologies that protect and improve the environment; advancing
scientific and engineering information to support regulatory and policy decisions; and providing
the technical support and information transfer to ensure implementation of environmental
regulations and  strategies at the national, state, and community levels.

This publication has been produced as part of the Laboratory's strategic long-term research plan.
It is published and made available by EPA's Office of Research and Development to assist the
user community and to link researchers with their clients.
                                       Sally Gutierrez, Director
                                       National Risk Management Research Laboratory
                                           in

-------
                                       Abstract

This report documents the scientific research work done to date on developing a generalized
mathematical model depicting a combined economic-ecological-social system with the goal of
making it available to the scientific community.  The model is preliminary and has not been
tested or fully explored.  The model system described here is intended to represent the first steps
in combining (in simple fashion) the basic dynamic elements of an ecosystem functioning with a
human society and an economy in a closed system with a non-limiting supply of energy (the
model is based on flows of mass between system compartments while the total mass is
conserved).  In this preliminary model, optimizing economic agents (firms and households)
interact in specific markets and with an ecological system consisting of resource pools and
several domesticated and wild species. The result is an interdependent system that attempts to
model macroeconomic variables (based on underlying property rights) and environmental stocks
and flows. The report contains four chapters.  Chapter 1 introduces the project's objective and
approach; provides a background on sustainability as a complex system composed of several
dimensions interacting through time; and provides a brief overview of the integrated
economic/ecological model and its development. Chapter 2 gives a detailed description of the
integrated model as it currently exists with equations and explanations. Chapter 3 provides the
model solution and operational equations.  Chapter 4 provides a summary of the report.  The
appendices contain a glossery of terms and the computer code used to implement the model in a
form suitable for simulating  different scenarions.

A portion of this report was submitted in partial fulfillment of Simplified Acquisition Order
Number 4C-R101-NASA by H. W. Whitmore, under the sponsorship of the United States
Environmental Protection Agency. This report covers a period from March 3, 2004 to August
15, 2005. The work was completed as of February 28, 2006.
                                           IV

-------
                                Table of Contents
Notice	ii
Disclaimer	ii
Foreword	iii
Abstract	iv
Tables	vi
Figures	vi
Chapter 1 Introduction	1
  Objective and Approach	1
  Background	2
    Ecological	4
    Economic	5
    Social/Legal	6
  Model Overview	8
Chapter 2 Integrating the Economic Sector and Ecological Base	10
  Economic Decisions of Firms and Households	11
    Optimal Economic Behavior for P1 Industry	13
    Optimal Economic Behavior for H1 Industry	17
    Optimal Economic Behavior for IS Industry	21
    Government Sector	24
    GDP	24
    Optimal Economic Behavior of the Household Sector	24
    Gross Domestic Product	27
  Naturally Occurring Changes in Biological and Physical Resources	28
    Growth of Non-domesticated Plants, P2	28
    Growth of Non-domesticated Herbivores,	29
    Growth of Non-domesticated Carnivores, Cl	29
    Growth of Non-domesticated Plants, P3	30
    Growth of Non-domesticated Herbivores, H3	30
    Growth of Non-domesticated Carnivores, C2	30
    Growth in Human Population and Growth inHumanMass	31
    Resource Pool	31
    Inaccessible Resource Pool	31
Chapters Model Solution and Operational Equations	33
  Model Solution	33
  Operational Equations	34
Chapter 4 Summary	41
Appendix A Symbols Used in the Report	44
Appendix B SIMULINK Graphical Model	48
Appendix C SIMULINK Code	49
Appendix D MATLAB Code	59
References	88

-------
                                      Tables

Table 3-1 State variables	34
Table 3-2 Additional model outputs	35
Table 3-3 Parameters and their nominal values	39
Table 3-4 Corresponding state variable initial conditions	40
                                     Figures

Figure 1-1 Conceptual path of a complex dynamic system	3
Figure 1-2 The integrated model	8
Figure 2-1 The ecomonic model illustrating flows of income and spending	11
Figure B-l Root level SIMULINK model	48
                                         VI

-------
                                  Chapter 1

                                 Introduction
Objective and Approach

In many attempts to model economic and ecological systems, the coupling of the
economic to the ecological in one model is limited, typically interacting through a single
link or pathway.  This method of modeling is inherently inappropriate and perpetuates the
misconception that human activities can operate outside of the ecological systems on
which the economic system and human societies depend (O'Neill and Kahn 2000, Rees
2002).  In other cases, economic decision making is integrated into an ecosystem model,
although the modeling of market mechanisms and the feedbacks between these and the
ecosystem are limited (e.g., the lake eutrophication and fisheries models of Carpenter et
al. 1999, Brock and Starrett 2003, Ludwig et al. 2003, and Carpenter and Brock 2004;
Brock and Xepapadeas 2002; and the Patuxent River watershed models of Voinov et al.
1999 and Costanza et al. 2002).  All of these models were developed to better understand
and manage human impacts on specific ecological systems;  however, they generally have
very high data requirements for estimating model parameters.

Several more abstract models have been developed to understand the general behaviors of
an integrated ecological/economic system, bypassing the need for large amounts of
ecosystem-specific data. Van den Bergh (1996) offers a basic model that integrates the
essential features of an ecological system with a fairly simplified production economy.
His production functions account for materials balance, waste and recycling. In addition,
he allows for renewable resources to regenerate and for the biosphere to assimilate a
portion of pollution created during the production process. However, the economic
portion of his model does not allow for labor services, a pricing mechanism or
endogenous consumption. The extremely large GUMBO (Global Unified Metamodel of
the Biosphere) includes an elaborate ecosystem together with production functions and an
economic welfare function, but no explicit system of market prices (see, for instance,
Baumans et al. 2002). A wide variety of Computable General Equilibrium (CGE) models
exist which integrate certain features of the environment into an economic framework;
they are lucidly reviewed by Conrad (2002).  These models  do account for the fact that
emissions and the stock of pollution adversely affect the environment's ability to provide
basic services.  In addition, they permit environmental quality to influence economic
efficiency or human welfare.  These models contain well developed input-output matrices
that include material flows across industries. Consumption, production and investment
are derived endogenously using optimization techniques.  Typically however the  price of
labor and the price  of capital are exogenously determined. Product prices are determined
either through perfect competition or by assuming that price is set equal to a constant
average (and marginal) cost.  In the latter case, product demand alone determines the
level of production. CGE models do not incorporate the dynamics of the regeneration of
renewable resources, endogenous population growth or the capacity of the biosphere to

-------
assimilate a portion of the pollution generated.

The preliminary model described here differs in several respects.  First, resource limits
are addressed by explicitly modeling the system as closed to mass; economic decisions
and biological interactions between species determine how mass is distributed throughout
the system, and consequentially whether some resources are scarce or some species go
extinct (i.e., species with zero mass). Second, a legal foundation is incorporated by
identifying the mass in terms of its property type.  Third, an explicit market system of
decision making is implemented in the form of a price setting model.  The model
introduced here has evolved from much simpler, ecosystem-only models (see Cabezas et
al. 2003, Path et al. 2003) and from an ecosystem with economic-like behavior (Cabezas
et al. 2005). This model also includes an industrial process subsystem in addition to the
macroeconomic decision-making system and legal foundation.

The ultimate objective of this modeling  effort is to gain general insight as to which legal
and economic strategies might contribute to or degrade desirable system regimes and
resilience in an  integrated ecological-economic-legal system. It also hoped that some
understanding is gained about which policies or laws (theoretically) could  change
economic and social behavior to increase the stability of this system. At this point, the
model is a preliminary one and has not been tested or fully explored. Nor  is the model
calibrated  or tied to any real-world systems; rather, it is meant to retain a degree of
abstractness and generality that may lead to the drawing of general conclusions about the
interaction between economic markets, ecosystems, and the law.
Background

Interest in sustainability has grown exponentially as it has become increasingly obvious
that the supporting biological systems of the Earth can not indefinitely support current
rates of human population growth and resource consumption (Millennium Ecosystem
Assessment Synthesis Reports, 2005).  Consider, for example, that according to the
United States Census Bureau (2005) the human population of the earth grew from 2.5
billion in 1950 to about 6.4 billion in 2005. Human population growth continues. Also
consider that from  1970 to 1995, consumption expenditures in 1995 U.S. dollars
increased from $8.3 to $16.5 trillions in industrialized nations, and from $1.9 to $5.2
trillions in developing nations (United Nations Development Programme 1998).  Lastly
consider that the human population presently appropriates about 20% of the world net
terrestrial primary production, leaving a vastly reduced resource pool for all other species
(Imhoff et al., 2004, Haberl et al.  2004). Here, net primary production is defined as the
net amount of solar energy used to convert mass to terrestrial plant organic matter by
photosynthesis.

Sustainability is fundamentally an effort to create and maintain a regime in which the
human population and its necessary energy and material consumption can be supported
indefinitely by the biological system of the Earth.  Hence, sustainability is not a goal but
a path or corridor through time. Figure 1-1 illustrates conceptually the sustainable path

-------
through time of a system through a corridor in a space where the coordinates are
measurable ecological, industrial, economic and other variables. A sustainability corridor
is, therefore, defined such that, for example, biodiversity and human population sizes are
appropriate, the industrial processes perform at high efficiency with minimal
environmental impacts, and the level of economic activity is adequate to provide
employment and meet human needs. However, in an integrated system such as this one,
deviations in any dimension have repercussions elsewhere. For example, inefficient and
wasteful production causes pollution which damages ecosystems. Therefore, the
construction of a sustainable corridor requires at least a basic understanding of the
relationship between production processes, ecosystems, and economies.
            Economic
            Dimensions
Technological
Dimensions
 Self-Correcting
 Unsustainable \
 Regime
                                               Sustainable
                                               Regime
                            Catastrophic
                            Unsustainable
                            Regime

                              Ecological
                              Dimensions
                                 Legal/Social
                                 Dimensions
                                                                   Time
Figure 1-1 Conceptual path in time for a complex cyclic dynamic system having economic, techno-
logical, ecological, legal, and social components. Note the conceptual limits that define sustainable
regimes shown here as a tunnel, and the three categories of regimes: sustainable, self-correcting un-
sustainable, and catastrophic unsustainable.
Hence, as already discussed the definition, assessment, and attainment of sustainability
are by nature multidisciplinary (Goodland and Daly 1996, Dasgupta et al. 2000, Cabezas
et al. 2003, McMichael et al. 2003, Cabezas et al. 2005; Figure 1).  Popular definitions of

-------
environmental sustainability abound, some of which can be contradictory (World
Commission on Environment and Development 1987, Gatto 1995, Goodland and Daly
1996). The overarching concept of sustainability for all disciplines, when applied to
humanity as a whole or a particular society, highlights the level of activity that can be
sustained for a given length of time without diminishing the productivity of the system or
its capacity to recover function following disturbances.  While the time frame over which
this concept is applied can differ markedly between disciplines, all disciplines approach
sustainability with a reasonably consistent idea of which characteristics of the system are
desirable, and which are not.  From the many possible dimensions of sustainability, three
which most relevant to the work in this report (ecological, economic, and social/legal) are
described below.
Ecological

Ecological sustainability usually infers that an ecosystem can retain an ability to function
through environmental changes and disturbances, and over the long term has the
evolutionary capacity (through genetic and species diversity) to form adaptive ecosystem
structures and functions. Ecosystems are comprised of collections of species that operate
in fairly characteristic trophic (feeding) levels, and that engage in a wide variety of
positive, neutral, and negative interactions.  The stability and productivity of ecosystems
is dictated by the biodiversity of a system, although the role of a specific species or
population in an ecosystem is not known in all cases with certainty (Tilman 1999, Bond
and Chase 2002, Hooper et al. 2005).  However, due to habitat loss, overharvesting,
invasion by non-native species, and other anthropogenically induced pressures, many
species are currently at risk of extinction (Ehrlich 1995).

As species are lost from systems, the connectivity (and perhaps redundancy) of the
system declines, and critical functions (such as nutrient recycling, waste treatment or
pollination) may either no longer be provided (Kearns  1997, Hooper et al. 2005) or are
provided at reduced capacity. Extinction rates have generally risen proportionately to the
area of natural habitat impacted by human activity (MacArthur and Wilson 1967, Doak
and Mills 1994, Pimm and Askins 1995). Extinction (either at the population or species
level) reduces the evolutionary capacity  of ecosystems, and with it their  ability to adapt to
changing environments. Loss of biodiversity in ecosystems would only  be sustainable if
immediate restoration of these systems were possible, but this is unlikely as restoration of
ecosystems depends heavily on the order of species reintroduced into a system.
Community assembly rules, resistance to invasion, and the characteristics of each species
are all critical determinants of restoration efforts, but are at best vaguely understood for
selected ecosystems (Levin et al. 2001, Sakai et al. 2001, Ferenc et al. 2002).

Ecosystems are complex, dynamic systems that often display characteristic regimes of
behavior dictated by their internal dynamics and the  disturbances that act on them
(Scheffer et al. 2001, Mayer and Rietkerk 2004). A dynamic regime, or "alternative
stable state," is characterized formally by a particular multidimensional neighborhood or
set of values over which the system state varies. About each set of such steady states, a

-------
basin of attraction is formed such that absent any changes in external disturbances or
random variations within the system, the system will remain in that basin of attraction
and tend toward the steady state.  In this analogy, a change in regime is a change to
another basin of attraction.  The size of disturbance that can be tolerated by an ecosystem
before a change in regime occurs is a measure of its resilience (Holling 1973, 1996,
Gunderson 2000). Disturbances can range in size, intensity, and frequency, and can
originate from natural (e.g., lightning strike, fires, floods) or anthropogenic sources (e.g.,
agriculture, deforestation).  Although ecosystems may naturally pass through many
regimes, the functions and services that ecosystems can provide human societies do vary
under different regimes (Wardle et al. 2000, Portela and Rademacher 2001). In this
respect, some regimes may be more desirable to humans than other regimes (Carpenter et
al. 2001).
Economic

All economic activity is dependent upon natural resources provided by the environment,
both as inputs and as sinks for waste mass, e.g., pollutant treatment.  Over human time
scales, these resources can either be renewable (such as fish populations, timber stands,
or the capacity of the environment to absorb some forms of pollution) or non-renewable
(such as coal or copper), but renewable resources can be exhausted if harvest rates are too
high (Slade 1982, Reed 1986, Pauly  et al. 2002). Depletion rates of natural resource
stocks are often dictated by the scarcity of the stock (which influences its price), or the
economic discount rate used by the industry, instead of the biological limits of
regeneration of the stock. This discrepancy can lead to extraction and harvest rates for
renewable resources that are not sustainable.

Goods and services that ecological systems provide to human economies and societies are
rarely directly valued in economic markets (Daily 1997).  Historically, economists have
not internalized pollution and other negative impacts to ecosystems in economic analyses,
but rather have treated these impacts as externalities (Samuelson  1954, Freeman 1984,
Bird 1987).  However, feedback loops between ecological and economic systems can
significantly alter projected resource availability and economic productivity, and are
important in the determination of sustainable resource use (Settle et al. 2002).  Several
studies have attempted to make the costs of these services explicit, and estimate that the
planetary value of all ecosystem services is around $16-54 trillion per year (Costanza et
al. 1997, although see Heal 2000). Some of these estimates are based on the cost of
designing and building  a technological system that could provide the same services, such
as reverse osmosis or desalinization technology to produce freshwater in the place of
wetlands (Postel and Carpenter 1997). Other estimates are based on a variety of hedonic
pricing, contingent valuation or other more indirect methods (Farber et al. 2002). The
purpose for valuing ecosystem goods and services is not necessarily to include them in
regular market transactions, but rather to provide an accounting system that is
recognizable to economic analysts and can be used to monitor rapid depletion or
unsustainable use of these goods and services.

-------
In many analyses of economic sustainability, the discount rate chosen and the
substitutability of environmental capital for other resources and for manmade capital can
greatly influence the perceived sustainability of an activity. Higher discount rates cause
firms to extract natural resources faster earlier, saving less for later, and thus leaving a
reduced (or exhausted) resource base for future generations (Costanza et al.  1997, Barbier
and Markandya 1998). On the other hand, resources for which there are many
substitutable sources may be more likely to be used sustainably, as economic agents can
more easily shift from one resource to another when prices rise (due to increasing
scarcity).  However, as some things have no substitution, such as breathable air or fresh
water, and economists have long been at odds regarding the degree of substitutability
between natural and manmade capital (Krutilla 1967).
Social/Legal

Since sustainability is ultimately about human well-being, the social aspect in general and
its legal component in particular must also be considered. Human societies have always
interacted with and depended upon ecosystems, but the nature of the relationship changed
dramatically with the onset of agriculture about 10,000 years ago and with the evolving
concept of property rights.

The domestication of animals and plants allowed for an exponential increase in human
population size and density.  Food surpluses resulted in job  specialization, centralized
conflict resolution and decision making, collection and redistribution of wealth,
technology development, and amalgamation of smaller territories into larger ones
(Diamond 1999). To reflect modern society and the current state of affairs, the plant and
animal species can be divided into two categories: domesticated and non-domesticated.
Transfers of mass associated with domesticated species are  substantially affected by
society's economic system. Transfers of mass associated with non-domesticated species
are more often affected by the legal and political systems, and/or by biological rules
alone.  Humans have also become adept at appropriating and storing a large portion of the
nutrient pool by making nutrients unavailable to themselves and the rest of the ecosystem
for long periods of time (e.g. covering soil with asphalt, water consumed by industry or
contaminated by pollutants is no longer available for drinking).  This is in addition to the
massive physical infrastructure and energy needed to transport, process, and distribute the
agricultural products and other resources used to support other societal goals (i.e.,
production of non-food goods and services).

From a legal standpoint, the ecosystem is less about mass and more about the rights (or
the lack of rights) associated with the mass.  Property is commonly divided into three
general types: private, state (also referred to as government or public) and commons
(Heller 2000). Private property has come to be considered a "bundle of rights" that can
be separated (or "unbundled") and owned and transferred separately.  An example of this
unbundling, one person (the landlord) may have the ownership rights to a parcel of land,
while another (the renter) holds the right of possession, and a third  (the landlord's heir)
has a right to own the parcel at some time in the future. State or government property is

-------
owned or controlled by the sovereign, e.g., a national park.  Some legal scholars refer to
"the commons," as meaning property which is available to everyone in the world and use
the term, "common property" to denote a separate category, meaning property available
to a specific group and excluding others outside that group (Yandle and Morriss 2001).
Others refer to the former as "open-access commons" and the latter as "closed-access
commons."  In any case, the difference between the two types of commons is in who has
the right to use the resource and who has the legal right to exclude others from using it.

Additional property types have also been identified. Yandle (1999) uses "regulatory
property" to refer to property which is created and allocated by the government. Air
pollution permits are an example of this type of property.  Heller (1998) describes a type
of property he calls "anticommons" to account for situations in which property rights are
so divided among individuals that any one of them can exclude others from effective use
and the result is underuse of the resource.  This is the opposite of open-access commons,
the well known subject of the Tragedy  of the Commons (Hardin 1968), in which no one
can be excluded and everyone maximizes his/her use of the resource resulting in its
overuse.

In many ways, the property rights assigned to the mass in the ecosystem form the basis
for the economic system because "the process of defining property rights defines wealth
and its distribution in society" (Yandel and Morriss 2001). Using barbed wire as an
example, the authors illustrate that it is the transaction costs of defining, defending, and
devising the property that ultimately determines its fate.  Before the invention of barbed
wire, it was too expensive to  enclose and defend large areas of rangeland and so it
remained open-access.  Once the wire was created, it became economically feasible to
enclose the area (define it) and enforce the exclusion of others (defend it). At that point,
the rancher had sufficient ownership control to have something worth selling to others
(devise it). The other option  would have been for the rangeland to stay in or revert to
government ownership with grazing rights sold as "regulatory property." There are still
transaction costs involved in this option, but they are borne by taxpayers as well as the
permit purchaser.

Transaction  costs  for open-access commons resources are lower because no rights must
be defined, defended, or devised, but mass in private hands is more subject to control and
manipulation for maximum utility.  Therefore, the hunter-gatherer has more in common
with the other mobile species of the foodweb. Both value open-access commons or
common property because enclosures and exclusive rights pose problems for moving
across space. The food producer has opposite goals, because enclosures and exclusive
rights increase wealth—the food producer benefits most by separating its domesticated
species from others. The modern consumer is aligned with the food producer, since food
production allows for a much more stable and convenient lifestyle.

Thus, human society with its legal system  of property rights affects ecosystem
sustainability in several ways.  It manipulates foodwebs in favor of domesticated species,
potentially affecting resources available to non-domesticated species.  It appropriates
portions of the resource pool  for physical and social infrastructure.  Finally, it raises the

-------
bar on sustainability by a cyclical process of continually increasing its needs through
population growth made possible by food surpluses brought about by manipulation of the
food web.
Model Overview

The model (Figure 1-2) was developed in stages. The process began by establishing a
basic ecological model with the total mass distributed among all compartments within a
foodweb (Path et al. 2003).  The compartments were then differentiated in terms of
human control over them by identifying species as being either domesticated or non-
domesticated, assigning property rights to each compartment, and indicating intentional
changes to the natural flows of mass, such as fences. Finally, a generic industrial process
was added to account for resources diverted to human (non-food) consumption and use
(Cabezas et al. 2005).
[
                               Resource Pool
        '•Ik...
             _M_      •   ..*
          I   I}!  F*
          l——*»-
                          Inaccessible Resource Pool
Figure 1-2 Integrated model showing flows of mass between compartments and property types. PI,
HI, and IS are private property. P2 is state-owned property, but HI has access to it through grazing
leases issued by the government. Cl is a protected species, thus, Hi's access to it is limited. P3, H2,
H3, C2 are open-access commons to which no property rights attach. The resource pool in this
model is open-access commons. Dotted lines indicate mass flows that occur under anthopogenic in-
fluence. Gray lines from the inaccessible resource pool to P2 and P3 indicate slow transfers of mass
as a result of bacterial decay (this is the only natural outlet for mass to escape the inaccessible re-
source pool). Some mass is also transferred from each compartment to the resource pool represent-
ing the death of biological mass; however, to avoid confusing lines, these transfers to RP are not
shown.

-------
The resulting integrated model comprises twelve compartments, including two resource
pools (RP and IRP), three primary producers (plants PI, P2, and P3), three herbivores
(HI, H2, and H3), two carnivores (Cl and C2), an industrial sector (IS) and humans
(HH). The system flows throughout are specified in terms of mass.  The system is closed
to mass  (i.e., mass is conserved) and open to energy. Individual compartments, including
those composed of private property, observe conservation of mass; that is, any difference
between input and output in a compartment results in a corresponding change in mass in
the compartment.  Primary producers make available resources from an accessible
resource pool (RP) to the rest of the food web.  Although not shown on Figure 1-2, all
biological compartments (i.e., all compartment except for IRP and IP) recycle mass back
to the RP through death.  There is a flow of mass from all biological compartments to RP
proportional to the death rate of the species represented by the compartment.  Mass from
the IRP  is recycled very slowly back to P2 and P3 through the action of bacteria; thus, it
is "inaccessible"to the other compartments. The flow of mass through the biological part
of the system is determined by a set of Lotka-Volterra type expressions, while the
resource pools (RP and IRP) simply follow a simple mass balance, and the industrial
sector (IP) follows a simple flow through with no mass accumulation.

As discussed, the model structure depicted in Figure 1-2 does not represent any particular
real ecosystem. Rather it is meant to capture some of the typical features of combined
ecological-economic-social systems such as: (1) an organization based on trophic levels,
(2) decreasing number of species with higher tropic levels, (3) species  specific
preferences for food source (e.g., Cl consumes H2 but not HI), (4) the presence of
humans with industrial production, agricultural production, an economy, and law
including private property, and (5) the presence of mass that is biologically unavailable as
result of industrial activity. While the specific  structure is arbitrary, it is carefully
constructed to try to capture as many of these typical features as possible. It is hoped that
it has enough generality to produce some basic insights into the mechanics of combined
ecological-economic-social systems. In essence, the model is the analog of a simple
machine (e.g., a pendulum), which while simple and arbitrary, can still be used to study
and illustrate basic laws of mechanics that are applicable to more complex machines
(e.g., a gear box).  It is expected that the model, perhaps with some modification, can be
used to simulate the  ecological consequences of different economic and regulatory
strategies. In this sense this model would be a valuable tool for genetically exploring
sustainable environmental management strategies, but without the risk of experimenting
with real ecosystems and people.

-------
                                  Chapter 2

           Integrating the Economic Sector and Ecological Base

This chapter provides the equations and rationale for integrating the economic and
ecological aspects of the model. It includes the optimal economic behavior of industry,
government, and households, the natural growth of non-domesticated species and the
human population, as well as the growth and depletion of the resource pools.

From an economic perspective the model contains human households (HH), an industrial
sector (IS), and two private firms: one a producer of plants (PI) and one a producer of
herbivores (HI). The households are the ultimate owners of the factors of production
used to produce the goods that are traded in explicit markets. In addition to markets for
the three goods (PI, HI, IS), there is a labor market. Households must decide between
devoting time to working for one of the three industries or to leisure.  Household income
comprises labor income and profits generated by the three industries (PI, HI and IS).  In
this model the stock of physical capital is held constant. A single period planning
horizon is assumed, therefore savings and investment are ignored.  Any dividend income
is divided equally  among the households.

The PI firm uses resources (RP) and labor to produce plant inventory (PI). Households,
the HI firm and the industrial sector are economic consumers of this PI inventory. H2, a
wild herbivore, preys on PI. The PI producer devotes labor to build and maintain fences
to keep H2 out.. The HI firm uses PI and P2 to produce an inventory of herbivores, H2.
The households are the only economic consumers of this inventory. A carnivore (Cl)
preys on the HI inventory, but the HI firm  cannot kill or otherwise interfere with Cl
because Cl is a protected species.  The HI  firm's only recourse is to invest labor in
fences. The HI firm pays a fee to have grazing access to P2. It is assumed that this
access is limited, and that the HI firm takes the maximum that it is allowed. The
industrial sector combines resources (RP) with plants (PI) and labor to produce goods
consumed directly by the households. Unlike the PI and HI inventory, which transferred
to their respective  consumers, the mass associated with the consumption of IS inventory
is not resident in the human compartment.  Rather, it goes directly to an inaccessible
resource pool.

The circular flow of income and spending is illustrated in Figure 2-1. Symbols used in
this figure and throughout this report are in Appendix A.
                                       10

-------
        Circular Flow of Income and Spending
          Firms

         P1,   --

           t
         H1

          IS «--
Consumption spending ($)
pp1P1HH+pH1H1HH+plsISHH
                        n ($) + Fixed Costs
                             Households
                    Entrepreneurship + Cap. Services

               Wages($) = WhNd .	.  Wages($)
             hNd
                                Labor Market
                         Labor Services
                   Grazing fee
                                                            Tr
                                                 Government
Figure 2-1. The economic model illustrating the flows of income and spending by Firms, Labor,
Government, and Households.  Note that in this model, taxes and "social costs" are not included.
Economic Decisions of Firms and Households

The households are the ultimate owners of the factors of production used to produce the
goods that are traded in explicit markets. Factor incomes consist of labor incomes and
profit incomes generated by the three industries, PI, HI and IS.  All production functions
are specified in accordance with the law of conservation of mass: the mass emerging
from a production process cannot exceed the total mass entering that process as inputs.
In this  initial model, the stock of physical capital is held constant. One possibility for
introducing labor and capital into the production process is to view these inputs as simply
reducing the amount of mass wasted in the production process. However, labor and
capital provide a much greater service than merely reducing waste occurring in the
production process. In particular, while labor and capital cannot  create mass, they are
nevertheless essential to the creation of value.  Labor and capital  provide necessary
transformation services that alter the location of or the physical, chemical, biological,
and/or  aesthetic properties of the raw materials applied to the production function. Labor
and capital can be substituted for each other in providing these transformation services,
but neither labor nor capital nor a combination of the two factors  can be substituted for
raw materials in creating a given output mass.  One possible exception is the extent that
labor and capital can reduce waste, a possibility that is ignored here.

Therefore, for this purpose, the appropriate production function views transformation
services and raw materials as being combined in fixed-proportions. However, the
transformation services alone may be provided by a number of combinations of labor and
                                        11

-------
capital. It is further assumed that each industry and the households operate within a
single-period planning horizon.  Therefore, all saving and real investment in man-made
capital are ignored.  However, because they announce the price of their products before
they know the actual demand for their goods, every industry may engage in unintended
(dis)investment as they accumulate inventories (experience unfilled orders) over the
current period.  Each industry has a fixed number of equity shares (stock certificates)
outstanding.  Every  household holds the same number of shares issued by a particular
industry. Any dividend income the households receive  is divided equally among the
households.  No market exists for these shares. Prices are set in terms of an abstract unit
of account ($).  Otherwise, the financial sectors are ignored. A stock of money
presumably exists that facilitates transactions among the firms and the households, but
any decision making as to the amount of money the agents desire to hold at any point in
time is abstracted from.  Also ignored are the social costs that the private industries
producing plants and animals impose upon the ecosystem by growing their products,
thereby removing nutrients from the  resource pool. As  a result, the market prices paid by
the households and by the HI industry for PI reflect only the private out-of-pocket costs
associated with the production of those plants.

Also, the market price that the HI industry charges for its product will not reflect the full
social cost of depleting the resource pool to produce food for the domesticated
herbivores. In addition, the households are not required to reckon with the social cost
they impose upon the ecosystem by adding to the inaccessible resource pool as a result of
their consumption of the various plants and animals, either through an increase in
consumption  per capita or as a result of human population growth. The HI industry does
pay a grazing fee to the government for access to P2, but otherwise all economic agents
in this model  ignore the ecological benefits of P2, H2 and C2.

Households are free to decide how many hours they prefer to work based upon their
preferences for PI, HI, IS, and leisure as well as upon the product prices, wage rate and
the non-wage income they face. However, at the wage rate set by the IS firms,
involuntary unemployment may result. The private industries use at least some of the
revenue they  receive from their current-period sales to pay for labor services.  The PI
industry pays part of its revenue to labor.  The HI industry also uses some of its revenue
to pay the PI  industry for the plants it purchases from that industry and to pay a grazing
fee to the government for access to P2. The IS industry pays for labor and for the PI it
buys. All three private industries then distribute any remaining profits to the households
as dividends.  In the present model, the PI, HI and IS industries set the price of their
respective products before trade takes place during the current period. The prices they set
conform to their forecasts of the demand functions  they will face during the current
period.  Trade takes place in the domesticated sector even though markets may fail to
clear. Industries may hold unanticipated inventories (unfilled orders) at the end of the
period.  It is assumed that the IS industry sets the money wage rate at the beginning of the
current period, based upon its forecasts of the household sector's supply of labor and the
demand for labor by the PI and HI industries. Involuntary unemployment (or unfilled
job vacancies) is possible. Note that in the following equations, g; is the growth
parameter of species i and and ni; is the mortaility parameter of species i.
                                        12

-------
Optimal Economic Behavior for PI Industry

The PI industry applies a variable amount of labor and a fixed amount of capital to
transform the mass of PI that would otherwise grow naturally into a marketable product.
The producer of PI must also deal with the fact that H2 eats some PI during the
production process.  The PI industry hires labor to reduce the consumption of PI by H2.

The production function for PI is given by (2-1):
                                                         PI
PI = min[gpi-Plt -RPt -mpi-Plt -cP1H2(h PiNt)-H2t, Pl(hP1Nt, Krit)]               (2-1)
The production (growth) of PI (gn) is viewed as positively related to: (a) the size of the
resource pool at the beginning of the period, RPt, (b) the initial stock of PI, Plt, at the
beginning of the period, and (c) the level of transformation services, Pl('), provided by
(variable) labor hours, hPiNt, during the period and the (given amount of) physical
capital, Kplt, held by the industry at the beginning of the period.  From the point of view
of the PI industry, the amount of PI lost during the current period (mortality, mPi) due to
consumption by H2, is assumed to be proportional to the initial stock of H2, H2t, with the
size of the "consumption coefficient," Cpm2, and negatively related to the labor hours
devoted to reducing the amount of PI that H2t eats during the period.  Assuming the PI
industry wastes neither the transformation services of labor and capital nor the net
amount of PI available for transformation (after deducting the loss due to the presence of
H2), the amount of (transformed) PI  produced may be viewed as equal to Pl(hPiNt, Kplt):

PI = Pl(hpiNt, Kplt)                                                         (2-2)

Note that the characteristics of PI may differ considerably from those that would occur if
PI were to grow naturally without the transformation services provided by labor and
capital.

In addition, the amount of PI transformed in the production process may be viewed as:

gPi-Plt -RPt -mpi-Plt -cPiH2(h*PiNt)-H2t = Pl(hP1Nt, Kplt)                         (2-3)

In principle (2-3) may be solved for h PrNt. To obtain the (linear approximation of)
labor hours devoted to reducing H2's consumption of PI (and holding gPi, mPi and KP1
constant), totally differentiate (2-3) and solve for d(h*PrNt ):
d( hpi-Nt ) = [gPi- Pit 'd(RPt) + [gpi- RPt - mpi] -d(Plt) -[3P1/ 5(hP1Nt)]-d(hP1Nt)
                  -(dH2t)] / {c'Pm2 -H2t }                                      (2-4)
where c'pm2 denotes the derivative of the consumption coefficient with respect to h PrNt;
this derivative is negative.  Consequently, according to (2-5), the number of hours the PI
industry devotes to limiting the amount of PI consumed by H2 is negatively related to
                                        13

-------
RPt and Plt, but positively related to both the number of labor hours it devotes to
transforming PI and the size of H2t.  Therefore, the following general function is given:

 h*Pi-Nt = h*P1-Nt( Pit, RPt, H2t, hP1Nt)                                           (2-5)
The economic stock of PI at the end of the period, Plt+i, is represented by (6):

Plt+i = Pit + Pl(hpiNt, Kplt) -P1H1 -P1IS-P1HH                               (2-6)

where P1H1 corresponds to the amount of PI purchased by the HI industry during the
period, PUS represents the amount of PI purchased by the IS industry during the period
and P1HH denotes the amount of PI purchased by the households during the current
period.

Taking the current wage rate and the PI  industry's forecast of the current period demand
function for domesticated PI plants as given, the PI industry attempts to maximize the
dividends they pay to its shareholders, subject to the restriction that the end-of-period
stock of PI is maintained at some predetermined level, P 1 . Then the firm's desired
sales of PI (in terms of mass) is given by:

(P1H1 +PlIS+PlHH)de = Pl(hpiNt, Kplt) -(FT -Pit )                          (2-7)

Dividends equal current net income minus net business saving. Net income is equal to
the value of current production minus current expenses (wages and a fixed cost
associated with the fixed stock of physical capital). Therefore, dividends are equal to the
value of current production minus current expenses and minus net business saving. Net
business saving is necessarily equal to the sum of the  sector's net increase in assets minus
the net increase in liabilities during the period. In the present model, the sector's planned
accumulation of assets consists only of the market value of its planned accumulation of
PI during the current period; according to the assumptions, it does not plan to borrow
during the current period. Therefore, current dividends are equal to the value of current
production minus the current expenses and minus the  value of the planned accumulation
of the inventory of PI during the period.  From (2-7),  the value of current production
minus the value of the planned accumulation of inventory during the current period
represents the value of desired current sales of PI to other sectors during the period.
Therefore, current dividends correspond to the current revenue from the sale of PI to the
producers of domesticated herbivores HI and to the IS producers minus the current
expenses of the PI industry.

Maximize:

HP1 = pPi-{Pl(hpiNt, Kplt) - (P I- Pit) }
     -W-[ hpi-Nt  + h*pi-Nt(Plt, RPt, H2t, hPiNt)] -FPi                            (2-8)

where FPI denotes the current period's fixed cost.  Since the PI industry is viewed as
                                        14

-------
owning the PI that it produces and harvests, the amount of PI harvested does not enter
directly into its cost considerations because the industry does not voluntarily consider the
social cost of its production of PI.

At the beginning of the period, the PI industry announces its product price, PPL  Let the
PI industry's forecast of the current period demand for its product be represented by the
following demand function:

Plde = Plde( pP1, com, cois, COPIHH) = PlHlde(pP1, coHi) + PHSde(pPi, cois)              (2-9)
                                   +(PlHH/N)de(pP1, Q)piHH)-Nt

This demand function denotes the PI industry's forecasted total (market) demand for PI
by the HI and IS industries and by the households. It is assumed that the derivative of
Plde with respect to pPi is negative (the sign will be verified later when the economic
behavior of the HI and IS industries and the households is specified); COHI , cois and COPIHH
denote vectors of shift parameters. Solving the inverse function for pP1 yields:
PPI = ppi(Plde, com, cois, CQFiHH, Nt )                                              (2-10)
where:

5pPi/5(Plde) = I/ [5(Plde)/ dpPi ] < 0
 dpPi/dcoi = - [5(Plde)/ dco; ]/[5(Plde)/ dppi ] >  0
and dpPi/dNt = - [(PlHH/N)de]/[5(Plde)/ 5pPi ] >  0.                               (2-1 1)

An increase in co; or Nt represents an  outward shift in the PI industry's forecast of the
market demand for its product.

The price pPi given by (2-10) represents the maximum uniform price the PI sector
expects it can value each alternative quantity of PI it produces during the period.  Based
upon this function, the sector's forecasted current revenue function is given by:

Rpie = PPI- Plde = ppi(Plde, com, cois, COPIHH, Nt) • Plde
    = RPie(Plde, com, cois, COPIHH, Nt)                                             (2-12)
Substituting the right hand side of (2-7) for Plde in (2-12) yields:

RP1e = RP1e[Pl(hP1Nt, Kplt)  -(P T- Pit), com, cois, COPIHH, Nt]                       (2'13)

Substituting the right hand side of (2-13) for the first term on the right hand side of (2-8)
yields:

HPI = RPie{Pl(hPiNt, Kplt) -(P T- Pit), com, cois, COPIHH, Nt }
              -W-[hpi-Nt + h*pi-Nt(Plt, RPt, H2t, hPiNt)] -FPi                     (2-14)
                                         15

-------
The only independent choice variable for the industry in (2-14) is the number of hours
that its employees work transforming PI, hpiNt.  Maximizing (2-14) with respect to
hpi-Nt yields the necessary condition:

[SRP17S(Plde)] •[ d(Pl)/d(hP1Nt)] = W-[ 1 + [ S(h*P1-Nt)/S(Pl)]- [5(Pl)/5(hP1-Nt)]]
                              = W-[ 1 - [S(Pl)/S(hri-Nt)]/{c'riH2 -H2t }]          (2-15)

The left hand side of (2-15) represents the marginal revenue product of labor used in the
PI industry to transform PI into a marketable product, and the condition requires the
profit-maximizing firms in the industry to hire labor up to the point at which the marginal
revenue product of labor equals the money wage times Equation 2-1 plus the extra labor
required to reduce the amount that H2 eats as the sector adds to PI .  Holding Plt, RPt,
and H2t constant, if the firm hires more labor to transform PI into a  marketable product,
it must also hire more labor to reduce the loss of PI due to its consumption by H2, in
order to obtain the extra PI that will be used as the raw material input.

Assuming a diminishing marginal product of labor in transforming PI, a diminishing
marginal product of labor in reducing loss, and that marginal revenue decreases as the
number of units sold increases, then from (2-15), the profit maximizing level of labor to
be used in the PI industry becomes a decreasing function of the money wage.  The PI
industry's demand functions for both types of labor are given by (2-16) and (2-17):

(hP1-Nt)d = hP1-Ntd(W, (P  I- Pit), com, OK, CDFIHH, Nt, Pit, RPt, H2t)                (2-16)
                        +        +++     ++   +   _
(h*P1-Nt)d = h*P1-Ntd(W, (P I- Pit), com, cois, CDPIHH, Nt, Pit, RPt, H2t)              (2-17)
From (2-16) an increase in (P 1 - Plt) reduces, ceteris paribus, the amount of PI the
sector plans to sell, thereby raising the marginal revenue product of labor used to
transform PI; an increase in com, cois, CQPIHH, or Nt shifts the market demand for PI
outward, thereby increasing the price that buyers  are willing to pay for a given amount of
PI, and raising the forecasted marginal revenue product for a given amount of labor used
to transform PI.  The effect upon the amount of labor used to conserve PI responds in the
same direction as the demand for labor used to transform PI . However, holding the
amount of labor used to transform PI unchanged, in accordance with (2-3), an increase in
either Plt or RPt reduces, ceteris paribus, the amount of labor required to conserve PI,
causing the demand for that type of labor to diminish. As the quantity of h*PrNt
decreases, its marginal product increases, thereby reducing the marginal  cost of adding a
unit of hpi-Nt; the industry's demand for hPrNt increases with an increase in Plt or RPt.
The larger the  stock of H2t at the beginning of the period,  however, the greater will be the
industry's demand for h*PrNt and the smaller will be its demand for hPrNt.  Substituting
the right hand side of (2-16) into the PI industry's transformation function, (2-2), yields
the PI industry's current production of domesticated plants consistent with profit
maximization in that industry:
                                        16

-------
= PP1{P1S (hP1-Ntd[W, (P T- Pit), COHI, cois, coP1HH, Nt, Pit, RPt, H2t], Kplt)
Pls = Pls (hP1-Ntd[W, (P  1 - Plt), com, cois, copiHH, Nt, Plt, RPt, H2t], Kplt)         (2-18)

The price that the PI industry announces for the current period is then given by:

PPI = ppi{Pl e, com, ^is, COPIHH, Nt}
                     , (P T- Pi
                     -(P 1-Plt), COHI, COis, COPiHH,Nt}

The actual inventory of PI at the end of the period is given by:

Plt+i = Pit + Pls -P1H1 -PUS -P1HH.                                         (2-20)


Optimal Economic Behavior for HI Industry

HI industry buys PI, labor and grazing rights to P2 and sells output to the households.
The assumptions are that the government sector fixes the grazing fee, p2, and that the HI
industry buys the maximum amount of P2, denoted by P2H1, permitted by the
government. Cl also consumes HI; the HI industry hires labor to limit the amount of HI
eaten by C 1 .

The production function for HI is shown by (2-21):

HI =  min[P!Hl + P2H1 -mHrHlt -cHici(h*HiNt) -Clt , Hl(hmNt, KH1t)]          (2-21)

where Hl(-) denotes the transformation services provided by labor and capital.

Assuming that the HI industry wastes neither the transformation services provided by
labor and capital nor the net amount of HI available for transformation, the amount of HI
available to the market during the current period may be written as:

HI =  Hl(hmNt, KH1t)                                                        (2-22)

and also:

P1H1 + P2H1 -niHi-Hlt -cHici(h*HiNt) -Clt = Hl(hmNt, KH1t)                  (2-23)
The consumption coefficient, CHICI, is positive; the first derivative of this coefficient is
negative and its second derivative is positive.

In principle, (2-23) may be solved for h*HiNt in terms of hHiNt, P1H1, Clt , and P2H1.
Totally differentiating (2-23) yields the following:

d(h*mNt) = [d(PlHl) +d(P2Hl) -mHrd(Hlt) -[SHI/ 5(hHiNt)]-d(hHiNt)
           - CHICI 'd(Clt)] / (C'HICI -Clt }                                     (2-24)
                                       17

-------
Therefore, in general:

h*mNt = h*HiNt(PlHl, P2H1, Hlt, hHiNt, Clt)                                   (2-25)
                       -   +    +    +

The stock of HI at the end of the current period is then given by:

Hlt+i = Hit + Hl(hmNt, KH1t) -H1HH.                                        (2-26)

H1HH denotes the amount of HI sold to the households during the period.

Taking as given the current wage rate and its forecast of the current period demand
function for domesticated herbivores, HI, the HI firms attempt to maximize the
dividends to their shareholders, subject to the restriction that they maintain the end-of-
period stock of HI at some predetermined level, H 1. The firm's desired sales of HI (in
terms of mass) is given by:

(HlHH)de = Hl(hmNt, Kp2t) -(H T-Hlt )                                     (2-27)

Therefore, the objective of the HI industry is to maximize:

Hm =pHr{Hl(hHiNt,KH1t) -(FT-Hlt)}-pPi-PlHl-pP2-P2Hl
      -W-[hmNt + h*HiNt(PlHl, P2H1, Hit, hniNt, Clt)]  -FHi                  (2-28)

where FHI represents the industry's fixed cost.

The product price, PHI, is announced by the HI industry at the beginning of the period.
Let the HI industry's forecast of the current period demand for its product be given by
the following demand function:

HlHHde = (HlHH/Nt)de(pm, CGHiHH>Nt                                         (2-29)

This demand function denotes the HI industry's forecast of the households' demand for
HI. The assumption is that the derivative of Hlde with respect to pm is negative (the sign
will be verified later when the economic behavior of the households is specified); COHIHH
denotes a vector of shift parameters.  Solving the inverse function for pm yields:

PHI= pm(HlHHde, COHIHH, Nt)                                                 (2-30)

where

5pHi/5(HlHHde) = I/ {[5(HlHH/N)de/5pHi]-N} <0                               (2-31)
         iHH = - [S(HlHH/N)d7 SCDHIHH ]/{[5(HlHHde)/ dpm ]-N} > 0             (2-32)
         = - [(HlHH/N)de]/{[5(HlHHde)/ dpHi ]-N} > 0                          (2-33)

and where a rise in COHIHH or Nt represents an outward shift in the demand for HI function
                                       18

-------
facing the HI industry.

The price PHI given by (2-30) represents the maximum uniform price the HI sector
expects it can value each alternative quantity of HI it produces during the period. Based
upon this function, the sector's forecasted current revenue function is given by:

Rme = pm-HlHHde = pm(HlHHde, COHIHH, Nt>HlHHde = Rme(HlHHde, COHIHH, Nt )   (2-34)

Substituting the right hand side of (2-27) for HlHHde in (2-34) yields:

Rme = RHie[Hl(hHiNt, Kp2t) -(H T-Hlt ), COHIHH, Nt ]                            (2-35)
Substituting the right hand side of (2-35) for the first term on the right-hand-side of (2-
28) yields:

HHI  = RHie{Hl(hHiNt, Kp2t) -(H T-Hlt ), COHIHH, Nt} -pn-PlHl -pP2-P2Hl
       -W-[hHiNt + h*mNt(PlHl, P2H1, Hit, hmNt, Clt)]  -FHi                  (2'36)

Given//  1, two choice variables confront the HI industry in this simplified model: the
number of hours that employees work in the industry transforming PI and P2 into HI;
and the amount of the intermediate good, PI, the HI industry buys from the PI industry.
The amount of labor the HI industry employs to reduce Cl's consumption of HI then
follows from (2-25). Maximizing (2-36) with respect to hm'Nt yields the necessary
condition:

[5RHie/5(HlHHde)]-[5(Hl)/5(hHiNt)]=W-[l+[5(h*HiNt)/5(Hl)]-[5(Hl)/5(hHiNt)]]
                                 = W-[l-{[S(Hl)/S(hHiNt)]/(c'Hici -Clt)}]       (2-37)

The left hand side of (2-37) represents the marginal revenue product of labor used in the
HI industry to transform mass into marketable HI. The condition requires the profit-
maximizing firms in the industry to hire this type of labor up to the point at which the
marginal  revenue product of labor equals the money wage, plus the marginal cost of
adding as well the requisite amount of labor to further limit the consumption of HI by Cl
in order to obtain, ceterisparibus, the extra HI mass to be transformed.

The first-order condition for P1H1 is given by:

-W-[ d (h*HiNt)/ S(PIHI)] = ppi                                                (2-38)
or:
 -W/{c'Hici-Clt} = pPi                                                       (2-39)

According to condition (2-38), the industry should continue to buy PI up to  the point at
which the marginal revenue to the industry from an extra unit of PI, namely the wages it
saves because it can reduce its use of labor to limit Cl's consumption of HI, is equal to
the price  of pi.
                                       19

-------
Assuming a diminishing marginal product of labor and assuming that marginal revenue
decreases as the number of units sold increases, then taking total differentials of (2-37)
and (2-39) yields a set of equations that can be solved for the responses in the choice
variables to various parametric changes.  In particular, the following demand functions
are found for labor hours, hHiNt, and for P1H1 :
 (hm-Nt)d = hm-Ntd(W, pP1 , (H T-Hlt ),  COHIHH, Nt)                             (2-40)
                 -   -        +       +
(PlHl)d = PlHld(W, PPI, (H T-Hlt ),  CDHIHH, Nt)                               (2-41)
Since, ceteris paribus, the inputs P1H1 and labor that is used to transform HI, hHiNt, are
technical complements, an increase in the price of either input results in the HI industry
demanding less of both inputs. Substituting the right-hand sides of (2-40) and (2-41) into
(2-25) yields the HI industry's demand for labor for the purpose of limiting the amount
of HI consumed by Cl:
(hmNt)a =(hHiNt)a[(PlHl)a(W,pPi,(#  1-Hlt ), COHIHH, Nt), P2H1, Hlt,
                                                                            (2-42)
                   (hHiNt)d(W, PPI, (H 1-Hlt),  COHIHH, Nt),Clt]
or:
(h*mNt)d = (h*HiNt)d [W, PPI, (H T-Hlt), WHIHH, Nt P2H1, Hlt, Clt]
(2-43)
where it has been assumed that the own-price effects upon (PlHl)d and (hniNt)d
dominate the indirect, or cross-price effects.

Substituting the right hand side of (2-40) into (2-22) yields the amount of HI the industry
desires to supply to the market during the current period:

Hls =  Hls[hm-Ntd(W, PPI , (H T-Hlt ), COHIHH, Nt) , KH1t]
                  -  -       +       +     +

     = H1S(W, PPI , (H T-Hlt ),  COHIHH, Nt) , KH1t)                              (2-44)
           -  -       +        +

The price that the HI industry announces for the current period is then given by:
              de
PHI= pm(HlHHe, COHIHH)_ _                          _ _
   = pm(Hls(W, PP1 , (H 1 -Hit ),  COHIHH, Nt) , KH1t) -(H 1 -Hlt ), COHIHH, Nt)    (2-45)
             -   -       +       +

The actual inventory of HI at the end of the period is given by:

Hlt+i = Hit + Hls -H1HH.                                                    (2-46)
                                       20

-------
Optimal Economic Behavior for IS Industry

The IS industry buys PI and combines PI and RP in fixed proportions. Since RP is
"free" the industry would use only RP if it could produce IS using variable proportions of
PI and RP. PI and RP are combined with a variable amount of labor that is used to
transform PI and RP into IS.  This arrangement is slightly more complicated than the HI
industry, since both PI and RP vary.  The IS industry buys PI, combines it with RP using
variable labor and a fixed amount of capital to produce IS, which it sells to the
households.  Therefore the production function for IS may be written as:

IS = min[PlIS/0, RP/X, IS(hiSNt, Kist)]                                          (2-47)

where 0 denotes the amount of PI necessary to produce a unit of IS and X denotes the
amount of RP necessary to produce a unit of IS.  The function IS(-) denotes the
transformation services provided by labor and capital in the process of producing a
marketable unit of IS.

Assuming that the IS industry wastes neither the transformation services provided by
labor and capital, nor PI  nor RP, the number of units of IS available to the market during
the current period may be written as:

IS = IS(hisNt, Kist)                                                           (2-48)

where,

PUS = 0-IS(hisNt, Kist)                                                       (2-49)
RPIS = X-IS(hisNt, Kist)                                                       (2-50)

In terms of mass, the stock of IS at the end of the current period is given by:

(0+A)ISt+i = (0+A)ISt +(0+X)-IS(hisNt, Kist) -(0+X)-ISHH.                         (2-51)

where ISHH denotes the number of units of IS purchased by  the households and
(0+X)TSHH represents the amount of IS purchased by the households during the period in
terms of mass.

Assuming that the IS industry sets the current wage rate, the  assumption is that the
industry formulates an anticipated net supply of labor function, Ns, which presumably
reflects the industry's estimate of (a) the amount of labor the household sector is willing
to supply to the labor market during the current period at each money wage, W, less  (b)
the amount of labor that the PI and HI industries demand at  each money wage.  It is
assumed that the estimated net supply function is given by:
                                       21

-------
(hiSN)se = (hiSN)se(W)                                                          (2-52)
                  +

Taking the industry's estimated labor supply function and its forecast of the household
sector's current period demand function for IS as given, the IS firms attempt to maximize
the dividends to their shareholders, subject to the restriction that they maintain the end-
of-period stock of IS at some predetermined level,  I S . The firm's desired sales of IS
(in terms of units of IS) is given by:

(ISHH)de = IS[(hiSN)se(W) , Kist]   -(/S-ISt)                                  (2-53)

Therefore, the objective of the IS industry is to maximize:

His = pis-{IS[(hiSN)se(W) , Kist] -(/ S-lSt )} -W- (hiSN)se(W) -FiS -pPi-PHS      (2-54)
or:
 His = pis-{IS[(hiSN)se(W) , Kist] -(/ S-lSt )}
      -W- (hISN)se(W) -Fis -PP1-6- IS[(hISN)se(W) , Kist]
where FIS represents the industry's fixed cost.

The product price, pis, is announced by the IS industry at the beginning of the period.  Let
the IS industry's forecast of the current period demand for its product be given by the
following demand function:

ISHHde = (ISHH/N)de(pis, (DisHH)-Nt                                             (2-56)
This demand function denotes the IS industry's forecast of the households' demand for
IS.  It is assumed (it will be verified later when the economic behavior of the households
is specified) that the derivative of (ISHH/N)de with respect to pis is negative; COISHH
denotes a vector of shift parameters. Solving the inverse function for pis yields:

pis= pis(ISHHde, COISHH, Nt )                                                     (2-57)
where:

5pis/5(ISHHde) =  l/{[5(ISHH/N)de)/5pis]-Nt} <  0
Spis/dcGisHH =  -[5(ISHHm)de/5(DisHH]/{[5(ISHHm)d75pis]-Nt} >  0

and
apls/5Nt= -(ISHH/N)de/{[5(ISHHde)/5pis]-Nt}  > 0

and where a rise in COISHH or Nt represents an outward shift in the demand for IS function
                                        22

-------
facing the IS industry.

The price pis given by (2-57) represents the maximum uniform price the IS sector expects
it can value each alternative amount of IS (in units) it produces during the period. Based
upon this function, the sector's forecasted current revenue function is given by:

Rise = pis' ISHHde = pis(ISHHde, COISHH, Nt)-ISHHde = RiSe(ISHHde, COISHH, Nt)         (2-58)

Substituting the right hand side of (53) for ISHHde in (58) yields:

Rise = Rise[IS[(hISN)se(W) , Kist]  -(/ S-ISt ), COISHH, Nt]                         (2-59)

Substituting the right-hand-side of (2-59) for the first term on the right hand side of
(2-55) yields:

Us = Rise[IS[(hiSN)se(W) , Kist]  -(IS -ISt), COISHH, Nt ]
        -W- (hiSN)se(W) -Fis -pPi-0- IS[(hiSN)se(W) , Kist]                         (2-60)

Given I S , the only choice variable for the IS industry in this simplified model consists
of the wage rate that it announces to attract the appropriate number of employees to
transform PI and RP into IS products; the amount of the intermediate good PI the IS
sector buys, PUS, must then conform to the amount of mass necessary to produce that
amount of IS.  Maximizing (2-60) with respect to W yields the necessary condition:

[5Rise/5(ISHHde)]-[5(IS)/5(hiSNt)]-[5(hiSNt)/5W]
         = (hiSN)se(W) +W-[S(hisNt)/SW]+ pPi-0-[5(IS)/a(hisNt)]-[5(hisNt)/5W]      (2-61)

The left hand side of (2-61) represents the marginal revenue product of labor in the IS
industry in terms of transforming PI and RP into IS; the condition requires that the profit-
maximizing firms in the industry continue to raise the wage rate, and therefore continue
to hire labor up to the point at which the marginal revenue product of from the extra labor
induced by the higher wage rate equals the marginal cost of raising the money wage,
(hisN)se(W) +W-[3(hisNt)/(3W], plus the marginal cost of adding as well the requisite
amount of PI to the production process to obtain the extra IS. The extra amount of RP
that must accompany the extra PI is considered to be a free good and is given by (2-50).

Assuming a diminishing marginal product of labor and that marginal revenue decreases
as the number of units sold increases, then from (2-61), the profit maximizing wage to be
announced by the IS industry is a decreasing function of the price of p?i and an
increasing function of the shift parameters, (7 S -ISt ) and COISHH. The money wage
function for the IS industry becomes:

W = W( PPI -0, ( I S -ISt ), COISHH, Nt )                                          (2-62)
          -       +       +    +

Substituting the right hand side of (2-62) into (2-53) yields the amount of IS the industry
                                        23

-------
desires to supply to the market during the current period:

(ISHH)S = IS[(hISNf[W (pPi-0, (7 S-ISt ), COISHH)] , Kist]   -(/ S-IS,)          (2-63)

Substituting the right hand side of (2-63) into (2-57) yields the price pis announced by the
IS industry:

Pis= pis(IS[(hiSN)se[W (ppi'0, (7 S -ISt ), COISHH, Nt )], Kist], COISHH, Nt )            (2-64)

In terms of mass, the stock of IS at the end of the period is given by:
(0+X)-ISt+i = (0+X)-ISt + (0+X>IS[(hisN)se[W(pPi-0, (/ S -ISt), CDISHH, Nt)], K t]
             -(0+X)-ISHH.                                                   (2-65)

From (2-49) and (2-50), the amount of mass transferred from PI and RP to IS is then
given by:

PUS  = 0-IS((hisNt)d (W, Kist, ppi-0, (7 S -ISt ), CDISHH, Nt ), Kist)                  (2-66)
RPIS = X-IS((hisNt)d (W, K\ ppi-0, (7 S -ISt ), CDISHH, Nt ), Kist)                  (2-67)


Government Sector

The only revenue the government sector receives is from the grazing rights it grants to
the HI industry equal to pp2'P2Hl. For the time being, the  assumption is that the
government transfers this revenue to the households:

Tr = pp2-P2Hl.                                                               (2-68)
GDP

The level of nominal GDP is defined as the total market value of all units of final goods
produced in the economy during the period, which also corresponds to the sum of all
spending on final goods plus the values of the changes in inventories of all goods:

GDP = ppi-{PlHH} +pHr{HlHH} + PiS-{ISHH}
       + pPi(Plt+i -Pit) +pm(Hlt+i -Ht) +pis(ISt+i -ISt)                          (2-69)
Optimal Economic Behavior of the Household Sector

In the present section the household sector's market demands for PI, HI, and IS as well
as its market supply of labor is obtained.  It is assumed that the objective of the household
sector is to maximize current utility, which is assumed to be a positive increasing
                                       24

-------
function of consumption per capita of PI, HI, IS and leisure, /.  It is assumed that
marginal utility is positive, but decreasing.  For simplicity, cross-partials are ignored.

Maximize:

U = U(PlHH/Nt, HlHH/Nt, ISHH/Nt, / )                                       (2-70)

The households attempt to maximize utility subject to their budget constraint.  This
constraint stipulates that total household spending on all three products equals its current
income, consisting of wage and non-wage income. It is assumed that the households take
their current non-wage incomes as given, but attempt to choose their wage income.  The
households are not permitted to make adjustments based on how their current non-wage
income may be affected by their work/leisure choice, or by the market basket of goods
they decide to purchase. In terms of the abstract unit of account, the budget constraint
facing the household sector is given by:

n +Tr +W-(h*-/)'Nt = pPi-(PlHH/Nt)-Nt + pHr(HlHH/Nt)-Nt +pis-(ISHH/Nt>Nt     (2-71)

where:

n = n PPI +FPPI  + n m +Fm +n K +FK.                                        (2-72)

Equation (2-70) is rewritten by dividing all terms by WNt, thereby expressing the terms
in the constraint in units of labor per capita:

(n +Tr)/(W-Nt) +(h*-/) = (ppi/W)-(PlHH/Nt)+ (pm AV)-(HlHH/Nt) +(piS/W)-(ISHH/Nt).    (2-73)

The following Lagrangean function is set up:

Max U = U(PlHH/Nt, HlHH/Nt,  ISHH/Nt, / )
   +X{(n+Tr) /(W-Nt) +(h*-/) -(pPi/W)-(PlHH/Nt) -(pm /W)-(HlHH/Nt)
                                  -(pis/W)-(ISHH/Nt)}                        (2-74)

The first-order necessary conditions for the maximization of (2-74) with respect to
PlHH/Nt, HlHH/Nt, ISHH/Nt and / are given by (2-75)-(2-78). From (2-71), the sum
inside braces in (2-74)  must equal zero; this  restriction is added as condition (2-79):

aj/d(PlHH/Nt)-MpPi/W) = 0.                                                (2-75)
aj/d(HlHH/Nt) -A, (pniAV) = 0.                                               (2-76)
aj/d(ISHH/Nt) -A, (pisAV) = 0.                                                 (2-77)
cU/d/-A, = 0.                                                                 (2-78)
(n+Tr)/(W-Nt) +(h*-0 -(pPi/W)-(PlHH/Nt)
              -(pHi/WKHlHH/Nt) -(Pls/W)-(ISHH/Nt) =0.                       (2-79)

According to (2-75)-(2-79),  only non-wage income (in labor units, (n+Tr)/W), and the
relative prices, ppi/W, pm/W, and pis/W (expressed here in labor units as well) matter in
                                       25

-------
terms of the optimal combinations of/, PlHH/Nt, HlHH/Nt and ISHH/Nt selected by the
households. The budget constraint, expression (2-79), is homogeneous of degree zero in
W, n+Tr, ppi, PHI and pis.  A doubling of all prices (including W) and non-wage income
is consistent with the same combination of/, PlHH/Nt, HlHH/Nt and ISHH/Nt. Taking
the total differentials of each of (2-75)-(2-79) yields the following system of equations,
which are written in matrix form as (2-80):
          Un        Uj2       Un     UM   -(PPI/W)


          U2i        U22       U23     U24   -(pm/W)


          U31        U32       U33     U34


          U41        U42       U43     U44


       -(ppi/W)    -(PHI/W)   -fas/W)   -1
d(P!HH/Nt)

d(H!HH/Nt)

d(ISHH/Nt)
                                                                           (2-80)
           Xd(pP1/W)
           Xd(pIS/W)

               0


          -d[(n+Tr)/(W-Nt)] +(PlHH/Nt )d(pP1/W) +(HlHH/Nt >d(pm/W) +(ISHH/Nt )d(pIS/W)
The coefficients u;j denote the second partials of utility; the own-second partials, u;;, are
assumed to be negative.  For simplicity, the cross-partials are treated as small relative to
the own-partials as the signs of the effects of the parametric changes upon the choice
variables are determined. Pre-multiplying the column vector on the right hand side of (2-
79) by the inverse of the bordered Hessian matrix yields total differentials of the
household sector's demands for PlHH/Nt, HlHH/Nt, ISHH/Nt and /.  Assuming that the
substitution effects dominate the income effects, these total differentials indicate the
following responses in the household sector's demand functions for PlHH/Nt, HlHH/Nt,
ISHH/Nt and / respectively:
(PlHH/Nt)d = (PlHH/N)d[(n+Tr)/WNt, pPi/W,  pm/W,
                           +                  +
(HlHH/Nt)d = (HlHH/N)d(H+Tr/WNt, pPi/ W, pm/W,
                  (2-81)

                  (2-82)
                                        26

-------
(ISHH/Nt)d = (ISHH/N)d(n+Tr/WNt, pPi/ W, pm/W, pis/W)                      (2-83)

? = A n/WNt, pPi/W, pm/W, pis/W)                                          (2-84)
Expression (2-79) imposes restrictions on the responses in (2-81)-(2-84). From (2-79),
and the fact that the hours spent working, h, equals total hours in the period, h , minus
leisure time, /, the household sector's per capita supply of labor, hs, is given by (2-85):

hs = hs[ (n+Tr)/WNt, pPi/W, pm/W, pis/W).                                    (2-85)
Substituting (2-81)-(2-84) into constraint (2-79) yields:
(n+Tr)/(W-Nt) +h -  ((H+T^AVNt, pPi/W, pm/W,
  - (pPiAV)-(PlHH/N)d((n+Tr)AVNt, pPi/W, pm/W,
  -(pm/WXHlHH/N)d((n+Tr)/WNt, pPi/ W, pm/W,
  -(pisAV)-(ISHH/N)d((n+Tr)AVNt, pPi/ W, pm/W, pis/W)  = 0.                  (2'86)
Since (2-85) must hold identically, the following restrictions apply:

1 =  5/d/5(nAVNt)+(pPiAV)-[5(PlHH/N)d/5(riAVNt)]
   +(pm/W)-[d(HlHH/N)d/d(n/WNt)] +(piSAV)-[5(ISHH/N)d/5(nAVNt)]           (2-87)
0 =  a^/a(ppiAV) +(pPiAV)-[5(PlHH/N)d/5(pPiAV)] +(PlHH)d
   +(pm/W)-[d(HlHH/N)d/d(pPi/W) +(piSAV)-[a(ISHH/N)d/5(pPiAV)]              (2-88)
0= d/Vd(pHi/W)  +(pPi/W)-[d(PlHH/N)d/d(pm/W)]
   +(pm/W)-[d(HlHH/N)d/d(pHi/W) +(HlHH)d +(piS/W)-[d(ISHH/N)d/d(pm/W)]    (2-89)
0= d/VdftWW) +(pPi/W)-[d(PlHH/N)d/d(pis/W)]
   +(pm/W)-[d(HlHH/N)d/d(pis/W) +(piSAV)-[5(ISHH/N)d/5(piSAV)] +(ISHH)d     (2-90)
Gross Domestic Product

As shown in expression (2-69), repeated here for convenience, nominal gross domestic
product, GDP, is defined as the total market value of all units of final goods and services
produced during a period of time. In the present context, the market value of the goods
the households purchase from the private firms plus the changes in inventories of all
goods represent nominal GDP:
GDP = ppi-jPlHH} +pHr{H!HH} + PiS-{ISHH}
       + pPi(Plt+i -Pit) +pm(Hlt+1 -Ht) +pis(ISt+i -ISt)                         (2-69)

Profits are defined as value added in production minus current expenses.  In this model,
current expenses consist of wages, rental income to the owners of physical capital ("fixed
cost"), and fees paid to the government for grazing rights. Therefore, profits plus wages,
plus rental income to the owners of physical capital, and fees paid to the government for
                                      27

-------
grazing rights are equal to the value added in production (value of the goods produced in
a stage of production minus the purchase of intermediate goods entering that stage). In
this model, the fees paid by the HI industry for grazing rights are returned to the
households as transfer payments.  Therefore, the sum of profits plus wages plus rental
incomes plus transfers is equal to the value of production minus the purchase of
intermediate goods.  Since the value of production coincides with the value of sales plus
the change in inventories,  the following three relationships hold for the PI, HI, and IS
industries respectively:
HPI +Fpi +W-[hpi-Nt +hpi-Nt] = pPr{PlHH +P1H1 +P1IS + (Plt+i -Plt)}         (2-91)
H*HI +FHI +W-[hmNt +h*mNt] +Tr = pm-{HlHH +(Hlt+1 -Ht)} -pP1-PlHl        (2-92)
H*is +Fis +W-(hISN) =piS-{ISHH+(ISt+i-ISt)} -ppi-PlIS                       (2-93)

Summing across (91)-(93) yields:
H  + Tr +WhNt = ppi-jPlHH + (Plt+1 -Plt) }+ pHr{H!HH +(Hlt+1 -Ht) }
                  +pis- (ISHH +(ISt+i -ISt )}                                   (2-94)

Since the right hand side of (2-94) corresponds to the right hand side of (2-69), nominal
GDP is also equal to total non-wage income, H", plus transfers plus total wages:

GDP = H" +Tr +W-h-N.                                                      (2-95)

Note that non-wage income corresponds to profits plus the rental income to owners:

n" = n*P1 +n*m +n*IS +FPI +Fm +FIS                                          (2-96)

Profits of the individual industries correspond to the dividends they pay to the households
plus net business saving (additions to retained earnings). In this model net business
saving corresponds to the change in inventories.  Therefore,

H*P1 = HP1 + PPi-(Plt+i -Pit)                                                   (2-97)
H*HI = HHI + pHr(Hlt+1 -Hlt)                                                 (2-98)
H*IS = His + pis'(ISt+i -ISt)                                                     (2-99)

Real GDP, or RGDP, written in terms of units of goods, is given by:

RGDP = P1HH + H1HH +ISHH +(Plt+i -Plt) +(Hlt+i -Ht) +(ISt+i -ISt )          (2-100)
Naturally Occurring Changes in Biological and Physical Resources


Growth of Non-domesticated Plants, P2

The production (natural growth) of non-domesticated plant P2 during the current period
                                       28

-------
is viewed as proportional to both the volume of P2 at the beginning of the current period
and the size of the resource pool at the beginning of the current period.  In addition, since
plant P2 is able to draw mass from the inaccessible resource pool, plant P2's growth is
also proportional to the size of the inaccessible resource pool as well. But the growth of
P2 is diminished by the amount of the plant eaten by the domesticated, HI, and non-
domesticated herbivores, H2 and H3, during the period. Net growth of P2 is shown by
(2-101).

P2 = P2f(gP2-RPt +giRpp2-IRPt) -mP2-P2t -P2H1 -H2fgH2-P2t-H3fgp2H2-P2t.       (2-101)

The volume of P2 at the end of the current period is equal to the volume at the beginning
of the current period, plus the net natural growth of P2, minus the amount of the plant
eaten by the domesticated and non-domesticated herbivores, H2 and H3, during the
period:
P2t+1 = P2t +P2t-(gP2-RPt +gKPP2-IRPt) -mP2-P2t -P2H1 -H2t-gH2-P2t -H3t-gP2H2-P2t.        (2- 1 02)

Growth of Non-domesticated Herbivores, H2

The production (natural growth) of H2 during the current period is viewed as
proportional to both the amount of H2 at the beginning of the current period and the
amount of plant P2 at the beginning of the current period. In addition the growth of H2 is
increased by the amount of PI that H2 eats during the current period, but diminished by
the amount  of H2 eaten by Cl and C2.  Net growth is given by (2-103):

H2 = P1H2  +H2t-gH2-P2t -mH2-H2t -H2C1 -C2fgH3c2-H3t                        (2-103)

and the end-of-period stock of H2 is given by:

H2t+i = H2t + P1H2 +H2fgH2-P2t -mH2-H2t -H2C1 -C2fgH3C2'H3t.                (2-104)


Growth of Non-domesticated Carnivores, Cl

The mass of Cl increases during the period by the amount of mass that Cl eats of HI,
cmcrClt, and H2, H2C1; its mass decreases by its natural mortality, nicrClt.  Net
growth of Cl during the period is represented by (2-105) and the end-of-period stock of
Cl is given  by (2-106):
Cl = CHicrClt + H2Cl-mcrClt                                             (2-105)

and the end-of-period stock of Cl is given by:

Clt+i = Clt + cmcrClt + H2C1 -mcrClt                                      (2-106)
                                      29

-------
Growth of Non-domesticated Plants, P3

The production (natural growth) of non-domesticated plant P3 during the current period
is viewed as proportional to both the volume of P3 at the beginning of the current period
and the size of the resource pool at the beginning of the current period. In addition, since
plant P3 is able to draw mass from the inaccessible resource pool, plant P3's growth is
also proportional to the size of the inaccessible resource pool as well.  The growth in P3
is diminished by the amount of the plant eaten by the non-domesticated herbivores H3
during the period. Net growth of P3 is shown by (2-107):

P3 = P3f(gp3-RPt +giRpp3TRPt)  -mP3-P3t -H3t-gp3H3-P3t.                         (2-107)
The volume of P3 at the end of the current period is equal to the volume at the beginning
of the current period plus the net natural growth of P3, minus the amount of the plant
eaten by the non-domesticated herbivores H3 during the period:
P3t+i = P3t + P3f(gp3-RPt +giRpp3-IRPt) -mP3-P3t -H3t-gp3H3-P3t.                  (2-108)
Growth of Non-domesticated Herbivores, H3

The production (natural growth) of H3 during the current period is viewed as
proportional to both the amount of H3 at the beginning of the current period and the
amounts of plants P2 and P3 at the beginning of the current period.  In addition, the
growth of H3 is diminished by the amount of H3 eaten by C2. Net growth is given by
(109):

H3 = H3t-(gP2H3-P2t + gp3H3'P3t) -niH3-H3t -C2fgH3c2-H3t                        (2-109)

and the end-of-period stock of H3 is given by:

H3t+i = H3t + H3t-(gP2H3-P2t + gP3H3-P3t) -mH3-H3t -C2fgH3C2-H3t                 (2-110)


Growth of Non-domesticated Carnivores, C2

The mass of C2 increases during the period by the amount  of mass that C2 eats of H2 and
H3; its mass decreases by its natural mortality, mC2'C2t.  Net growth of C2 during the
period is represented by (2-111) and the end-of-period stock of Cl is given by (2-112):

C2 =  C2f(gH2C2-H2t +gH3C2-H3t) -mC2-C2t                                     (2-111)

and the end-of-period stock of C2 is given by:

C2t+i = C2t + C2t-(gH2C2-H2t +gH3C2-H3t) -mC2-C2t                              (2-112)
                                       30

-------
Growth in Human Population and Growth in Human Mass

Human population at the end of the current period is equal to the human population at the
beginning of the current period, plus the number of people born during the current period,
minus human mortality during the period. The human birthrate, r|, during the period is
assumed to be a negative function of the real wage prevailing during the current period.
The rationale for this assumption is that the real wage represents the opportunity cost of
opting to remain outside the labor force (at least part-time) for the purpose of rearing
children.

Nt+i = Nt  + [r|(W/P*)-mN] -Nt+PlHH +H1HH                                  (2-113)


where P*  denotes a weighted average of the prices the households pay for PI, HI, and IS:

p* = [PPI-PIHH +PHI-HIHH +PIS-ISHH]/ [PIHH +HIHH +ISHH]                 (2-1 14)

The net addition to human mass is equal to human consumption of plants PI and
herbivores HI during the current  period, minus human mortality in terms of mass during
the current period. The net growth in human mass, N , is given by (2-115):

NAt+i = NAt + P 1HH +H1HH -mN-NAt                                          (2- 1 1 5)

Mass per human at time t,  Ut ,  is given by:

Ut = NVNt                                                                (2-116)
Resource Pool
The size of the resource pool at the end of the current period is equal to its size at the
beginning of the current period, plus the mass flowing to the resource pool generated by
plant and animal mortality, minus the amount by which the resource pool declines during
the current period in direct response to the growth in the domesticated and non-
domesticated plants during the current period. In addition the resource pool increases
over time because of mass transfer from the inaccessible resource pool. This is assumed
to be in proportion to the size of the inaccessible resource pool. Finally, mass is
transferred from the accessible resource pool to the inaccessible resource pool in direct
proportion to the level of production by the IS sector.

RPt+i = RPt +mpi-Plt +mP2-P2t +mHrHlt +mH2-H2t +mcrClt  +mN-Nt            (2-117)
         - Plt-gPi-RPt - P2fgP2-RPt  +riRPRp-IRPt - MS.
Inaccessible Resource Pool
                                       31

-------
The size of the inaccessible resource pool at the end of the current period is equal to its
size at the beginning of the current period, plus the volume of waste contributed to the
pool due to the scale of operations of the IS industry, minus the amount that the non-
domesticated plants P2 are able to recycle from the inaccessible resource pool during the
current period and minus the amount of natural decay that moves mass directly from the
inaccessible resource pool to the resource pool.

IRPt+1 = IRPt +(0+X)-ISHH -P2fgIRpP2-IRPt - rIRPRP-IRPt.                          (2-118)
                                        32

-------
                                  Chapter 3

                Model Solution and Operational Equations

This chapter provides a model solution based on the assumptions that firms attempt to
maximize the difference between the sale of their products less the costs (of materials and
labor), while households maximize their utility (incoming flow of goods balanced against
leisure).  The details and operational equations for the solution are described here.


Model Solution

Each firm (PI, HI, IS) seeks to maximize its profit (income minus wages paid and
purchases of supplies). These industries set their prices in accordance with their current
forecasts of demand for their products before the market clears.  A price setting
mechanism is used so that trades occur even if markets fail to clear (this is in contrast to a
general equilibrium setting). Excess inventory is carried to the next time step, and
shortfalls made up with current inventory. It is assumed that the industrial sector sets the
money wage rate at the beginning of the current period.  In this solution, one of the
industries, say the IS industry, becomes the dominant industry in the labor market.
Before any other price is announced, it sets the wage rate, W, at the rate at which it
anticipates that the amount of labor supplied, net of the sum of the amounts of labor
demanded by the PI and HI industries, will be sufficient to provide the level of labor
services the IS industry demands.  There are several approaches of constructing a solution
to the model.  For example, one could use PI or HI as the dominant industries for setting
wages.  However, IS was chosen as the dominant industry because in most modern
societies, wages tend to be set by the industrial or service sectors rather than the
agricultural sectors which PI and HI represent.

Once the IS industry has announced the wage rate, all industries  and the households take
that wage rate as given. Given the wage rate, the PI, HI and IS industries decide the
amount of labor that they want to hire, and the households decide the amount of labor
they wish to supply to the labor market. It is assumed that the supply of labor exceeds
the market demand for labor.  Thus the amount of labor hired by each industry is the
amount that each industry demands, given the wage rate announced by the IS industry.
The three industries  simultaneously decide how much labor to hire, decide how much
output to produce and announce the prices of their respective products, in light of the
money wage set by the IS industry. At the same time, the IS and HI industries decide
their demands for PI. The wage incomes the households receive from the three
industries, plus their non-wage incomes from the three industries, plus the transfers the
households receive from the government, plus the revenue from the industries' fixed
costs, equals the nominal GDP of the aggregate economy. From (2-95), in real terms,
GDP and real disposable income, also amounts to the sum: P1HH + H1HH +ISHH.
Given their real disposable incomes, and the prices the industries set for their products,
the households then decide their demands for the three products PI, HI, and IS.  In each
                                       33

-------
case, the end of period stocks of PI, HI and IS correspond to the amount of the product
produced during the period minus the amount of the item purchased by the various
sectors.
Operational Equations

Linear forms of demand and supply functions are used to simplify calculation. The
following are consistent with the optimization goal of the firms and the households.
Firms attempt to maximize the difference between the sale of their products less the costs
(of materials and labor), while households maximize their utility (incoming flow of goods
balanced against leisure).  The planning horizon in the current model is one time step.

The model has 19 state variables and 33 outputs. The state variables are given in Table
3-1.  These are in terms of mass, with the exception of the human population. The
deficits refer to the accumulated difference between the demand for  a good and the actual
quantity of that good delivered in a given time step. Deficits are restricted to being non-
positive.  Any surplus  of a good increases the inventory of that good. The compartment
masses are restricted to being non-negative.  In addition to the system state variables, 14
other internal system flows are output.  These additional outputs are given in Table 3-2.
All system flows are restricted to being non-negative.

Table 3-1  State variables, on a mass basis unless otherwise indicated.
1
2
3
4
5
6
7
PI
P2
P3
HI
H2
H3
Cl
8
9
10
11
12
13
14
C2
Humans (HH)
IS
RP
IRP
PI deficit for HI
(PlHldef)
PI deficit for IS
(PlISdef)
15
16
17
18
19


PI deficit for HH
(P\HHdef)
HI deficit for HH
(HlHHdef)
IS deficit for HH
(ISHHdef}
Number of Humans
(NHH)
Human per cap mass
(/O


In what follows, the sum of total deficits of either PI, HI or IS and their current
inventories represents what the industry must make up in production for past over-
demand (or under-supply), in addition to what must be produced to meet the current
demand.  These total deficits to be made up are designated with a star superscript in the
following (Pi;, HI*, IS*):
                                       34

-------
Pl*=Pl
IS* =ISt+ISHH
                def
Table 3-2. Additional model outputs
20
21
22
23
24
RPP1
P1H2
PUS
P1H1
P1HH
25
26
27
28
29
RPIS
ISHH
P2H1
H1C1
H1HH
30
31
32
33

pPl
pHl
pIS
W

At a given time step t the IS industry first sets the wage (Wt~):
W = a-
                                                                        (3-1)
In the above, 9 and A convert IS mass to unit quantities.  In what follows, conversion
factors for the other industries are assumed to be unity.  The term (•) is the end-of-period
inventory target.  Deficits are made up in subsequent time steps, although customers
already have paid for the goods.

Based on the wage, the PI, HI and IS firms set their prices, p^, and production targets,
Of, (how much  they should produce) in order to maximize profit, given their forecasts
of demands. All  other symbols in the equations below are constant parameters.
                                                                         (3-2)
                                                                         (3-3)

                                                                         (3-4)
                                                                         (3-5)

                                                                         (3-6)

                                                                         (3-7)
PI? =3d-3eWt-cPlp(Pl*t-Pl)
H\>t=d-eWt-cmp(H\]-H\)
Pt  = "is + bISWt - cis (ISt  - IS) /(A + 0)
ISt?=d-eWt-cls(IS:-
Next, the industry and household demands for input goods are calculated. These are
expressed as flows between compartments. PlHlt is the flow of PI product to the HI
industry at time t in units of units, for example:

-------
PlHlf =d-eWt-Jp?- gpim (HI] - HI)                                  (3-8)
P2H\f = k                                                             (3-9)

P\HHf =d- kp?1 + Y2mpfl +Y2npIts + z(P\HHf + H\HHf + ISHHf )      (3-10)

                   ? l       1        Is
H\HHf = d +  2kp? l - mpf1 +2npIts + z(P\HHf + H\HHf + ISHHfe)     (3-11)

ISHHf = d + Y2 kppt l + Y2 mpf1 - npf + z(P\HHf + H\HHf + ISHH? )      (3-12)

The last three equations are in terms of units per capita and must be solved
simultaneously.  ISHHde represents the demand for IS by the humans. The flow of goods
ISHH passes through the human compartment (i.e., these goods are used by humans), but
does not contribute to the mass of humans. Instead, the mass flows into the inaccessible
resource pool (IRP).

Next, the flows that involve labor are calculated. Labor effort is expended to meet
production targets  P\pt and H\pt as discussed above. The labor goes into fences to keep
the wild herbivores (H2) and carnivores (Cl) from eating stocks:

PlH2t = gRPPlPltRPt -Plpt  -mPlPlt                                       (3-13)
H\C\t = P\H\t + P2Hlt - H\pt - mmHlt                                   (3-14)

This is completed by calculating IS industry demands flows. IS demand and supply is in
individual units and thus requires a conversion factor to mass for each input. This is true
of all goods,  but conversions for PI and HI are assumed to be unity (one unit requires 1
unit of mass).

P\ISfe=ISP9                                                           (3-15)
RPIS?=IS?A,                                                           (3-16)

For the next time step, in the  following, g; are growth rates and m\ are mortality rates for
the individual species i.  All state variables are in terms of mass, except forNHHt .  Checks
are done so that all flows are positive, and that compartments maintain a non-negative
mass (except the deficit state variables).  This latter requires that flows sometimes do not
meet demands.  Such deficits are accumulated in the deficit state variables and contribute
to the production functions as outlined above. These deficit state variables are given by:

P1H1% = P\Hlff + PlHlt - PlHlf                                       (3-17)

        = PUSfef + PUSt  - PUSfe                                          (3-18)

         = P\HHff + PlHHt - PlHHfeNHHt                                (3-19)
                                      36

-------
         = HlHHff + HlHHt - HlHHfeNHHt                             (3-20)

     ^ = ISHH?ef + ISHHt -(9 + X)ISHH? * NHH t                         (3-21)

The above simply track the difference between what was actually delivered versus
demanded. For example, PUS refers to the flow from PI to IS, which may be less or
greater than PUSfe , depending on the situation at that time step.

Excess surplus is carried over to the next time step, or is used to make up deficits flows
from previous time steps.  The remaining state equations are given as follows.

PIM = p\t + p\t (gRpplRPt -mpl)- P\H\t - PlH2t - P\HHt - PUSt           (3-22)
P2M =P2t +P2t(gRPP2RPt + rIRPP22IRPt-mP2 - gP2H2H2t - gP2H3H3t)- P2Hlt

                                                                      (3-23)
P3M = P3t + P3t(gRPP3RPt + rIRPP3iRp2IRPt-mP3 -gP3H3H3t)          (3-24)


HIM = Hlt + PlHlt + P2Hlt - mmmt - HlClt - HlHHt                    (3-25)

H2M =H2t + P\H2t +H2t(gP2H2P2t-mH2 -gH2Cldt -gH2C2C2t)          (3-26)

H3M = H3t + H3t(gp2H3P2t+gp3H3P3t-mH3 -gH3C2C2t)                  (3-27)

CIM =Clt +HlClt+Clt(gH2ClH2t -mcl}                                 (3-28)

C2M =C2t +C2t(gH2C2H2t +gH3C2H3t -mC2)                            (3-29)

HHM = HHt + P\HHt + H\HHt - mHHNHHtJut                             (3-30)

                  W /
NHHM = NHHt + (TJ( /.)- mHH - (p(/ut - ju, )2)NHHt                        (3-
                  /  t
      uu
      nrLt+\
            \f
            7V HHt+l
ISt+l = ISt + P\ISt + RPISt - ISHHt                                        (3-33)
                                     37

-------
RPM =RPt +mplPlt +mp2P2t + mp3P3t +mmHlt +mH2H2t + mH3H3t

       + mclC\t + mC2C2t + mHHHHt + m1RPRPIRPt - RPt (gRP1RPIRPt            (3-34)
IRPM =IRPt +ISHHt -IRPt(rIRPP2P2t + r1RPP3P3t +mmmp)                   (3-35)



Where


P* = (p?lP\HHt + pflH\HHt + pItsISHHt ) l(P\HHt + HIHH t + ISHHt )       (3-36)



  w   .      , w   ,                                                ,~ ~~
                                                                      (3-37)
All parameters and their nominal values are given in Table 3-3 along with the

corresponding state variable initial conditions in Table 3-4.
                                     38

-------
Table 3-3. Parameters and their nominal values*
Ecological Parameters
1. gRPP2=2.861325e-2
2. gP2H2=2.934352e-2
3. gP2H3=0.042
4. gRPP3=5.732733e-3
5. gP3H3=3.131235e-l
6. gH2Cl=9.174907e-l
7. gH2C2=1.312728e-l
8. gH3C2=2.938371e-l
9. rIRPP2=1.081656e-2
10. rIRPP3=0.9
11. mP2=4.932829e-l
12. mP3=4.658138e-l
13. mH2=0.001
14. mH3=4.903092e-l
15. mCl=2.302639e-l
16. mC2=4.286472e-l
20. gP!H2=0.1
21. gH!Cl=0.2











Economic Parameters
1. Aw=4.832249e-l
2. Cw=1.357181e-l
3. aPl=1.0
4. bPl=1.0
5. cPl=7.737088e-l
6. aPlp=5.732311e-l
7. bPlp=1.497375e-l
8. cPlp=3.380538e-2
9. aHl=7.524099e-l
10. bHl=0.001
11. cHl=2.527165e-l
12. aHlp=1.910770e-l
13. bHlp=4.991250e-2
14. cHlp=9.926235e-l
15. aIS=6.081040e-l
16. bIS=2.972103e-l
17. cIS=0.001
18. aISp=1.910770e-l
19. bISp=4.991250e-2
20. cISp=5.646818e-l
21. dP!Hl=1.910770e-4
22. eP!Hl=4.991250e-2
23. fP!Hl=4.240783e-l
24. gP!Hl=1.9
29. dP!HH=1.910770e-4
30. zP!HH=1.474467e-l
31. kP!HH=4.240783e-4


32. mP!HH=1.997642e-4
33. nP!HH=7.776176e-5
34. dH!HH=1.9108e-004
35. zH!HH=1.4745e-001
36. kH!HH=2.1204e-004
37. mH!HH=3.9953e-004
38. nH!HH=7.7762e-005
39. dISHH=1.9108e-004
40. zISHH=1.4745e-001
41. kISHH=2.1204e-004
42. mISHH=1.9976e-004
43. nISHH=1.5552e-004
44. KA=3.0000e-001
45. 0(Theta)=1.0199e-001
46. X(Lambda)=6.7668e-001
47. gRPPl=0.09
48. mPl=1.018295e-3
49. mHl=9.838862e-3
50. mHH=0.22
51. P T(Plbar)mass=0
52. # T(Hlbar)mass=0.4
53. I S (ISbar)mass=0
54. Dw=4.507354e-6
55. ri(Eta)a=1.5000e+000
56. TI (Eta)b=8.3333e-001
57. ri(Eta)c=1.6667e-002
58. (p(Phi)=1.0000e+001
59. Idealpercapmass=4.0556e-
003

 Note, these are grouped by their context in the software, not necessarily by number.
                                              39

-------
Table 3-4.  Corresponding state variable initial conditions.
1
2
3
4
5
6
7
PI
P2
P3
HI
H2
H3
Cl
1.55031758212386
10.00000000000000
1.46577689115230
0.14002360565832
0.25097142084356
1.34666957783805
0.12948354945840
8
9
10
11
12
13
14
C2
HH
IS
RP
IRP
pimdef
PlISdef
1.32270575776743
0.45073543305286
0.10089700803626
19.14708496882624
0.86413620441690
0
0
15
16
17
18
19


PlHHdef
H\HHdef
ISHHdef
NHH
V


0
0
0
10
0.004055586
60633


                                              40

-------
                                   Chapter 4

                                   Summary

Sustainability is fundamentally an effort to create and maintain a regime in which the
human population and its necessary energy and material consumption can be supported
indefinitely by the biological system of the Earth.  The model system presented in this
report consists of a foodweb with an integrated industrial sector, agricultural production,
a very simple economy, and the rudiments of a legal system. As such, it represents a
promising first step in understanding the relationship between ecology, economics,
technology, and society.  The purpose of this report is to document the model so as  to
make it accessible to the larger user community in  the hopes of stimulating further
research work.

The preliminary model described here was developed in stages. First, a basic ecological
model was created with the total mass distributed among all compartments within a
foodweb.  The compartments were then differentiated in terms of human control over
them (by identifying species as being either domesticated or non-domesticated, assigning
property rights to the  mass in certain compartments, and indicating intentional changes to
the natural flows of mass, such as fences). Finally, a generic industrial process (with
private property rights) was added that diverts resources to human (non-food)
consumption and use.

From an ecological perspective, the model contains two resource pools (one biologically
accessible and one inaccessible), three primary producers (PI, P2, and P3); three
herbivores (HI, H2, and H3), two carnivores (Cl and C2), and humans (HH). The system
flows are specified in terms of mass. The  system is closed to mass (i.e., mass is
conserved) and open to a non-limiting source of energy.

From an economic perspective the model  contains  human households, an industrial sector
(IS), and two private agricultural firms: one a producer of plants (PI) and one a producer
of herbivores (HI). The households are the ultimate owners of the factors of production
used to produce the goods that are traded  in explicit markets. In  addition to markets for
the three goods (PI, HI, IS), there is a labor market.

The optimal economic behavior of industry, government, and households is as follows.
The PI industry applies a variable amount of labor and a fixed amount of capital to
transform the mass of PI that would otherwise grow naturally into a marketable product.
The PI industry hires labor to reduce the consumption of PI by H2.  The HI industry
buys PI, labor and grazing rights to P2 and sells output to the households. The HI
industry hires labor to limit the amount of HI eaten by Cl. The IS industry buys PI and
combines  it with mass from the resource pool (RP) using variable labor and a fixed
amount of capital to produce IS, which it  sells to the households. The government sector
receives revenue from the grazing rights it grants to the HI industry and transfers this
revenue to the households. The objective  of the household sector is to maximize current
                                       41

-------
utility, which is assumed to be a positive increasing function of consumption per capita of
PI, HI, IS and leisure.  This economic activity is reflected in the nominal gross national
product (GDP), which is the total market value of all units of final goods produced in the
economy during the period, which also corresponds to the sum of all spending on final
goods plus the values of the changes in inventories of all goods.

The production (natural growth) of non-domesticated species during the period is
governed by biological rules, but is influenced by human economic behavior (i.e., fences
to protect domesticated species).

The human population at the end of the current period is equal to the human population at
the beginning of the current period, plus the number of people born during the current
period, minus human mortality during the period. The human birthrate during the period
is assumed to be a negative function of the real wage prevailing during the current period.
The net addition to human mass is equal to human consumption of plants PI  and
herbivores HI during the current period, minus human mortality in terms of mass during
the current period.

The size of the resource pool at the end of the current period is equal to its size at the
beginning of the current period, plus the mass flowing to the resource pool generated by
plant and animal mortality, minus the amount by which the resource pool declines during
the current period in direct response to the growth in the domesticated and non-
domesticated plants during the current period. In addition the resource pool increases
over time because of mass transfer from the inaccessible resource pool. Mass is
transferred from the resource pool to the inaccessible resource pool in direct proportion to
the level of production by the IS sector.

The size of the inaccessible resource pool at the end of the current period is equal to its
size at the beginning of the current period, plus the volume of waste contributed to the
pool due to the scale of operations of the IS industry, minus the amount that the non-
domesticated plants PI  and P2 are able to recycle from the inaccessible resource pool
during the current period and minus the amount of natural decay that moves mass directly
from the inaccessible resource pool to the resource pool.

This study is a preliminary one and did not include all possible parameters or model be-
haviors. For example, it is known that changes in the recycling parameter for P2 and P3
can cause the system to crash entirely.  The solution used in this report consisted of the
following iterative  steps.

       •   The industrial sector sets the wage rate. The  assumption is that this sector
          dominates the labor market.
       •   Based on the wage, all industries set their prices and their production targets
          according to their own utility functions and internal models of demand of their
          products.
       •   Humans determine their demands for goods.
       •   Industries determine their demands for goods and labor.
                                        42

-------
       •  Checks are done for internal consistencies of flows (to be sure they meet
          positivity constraints on flows and compartment masses).
       •  The next step is taken (flows are transferred) for both the economic and
          ecological parts of the model.

Some preliminary simulations have been conducted using this model (Cabezas et al.
2006). However, the modle behavior has not been explored in detail. Future uture work
entails further refinement of the model and methods of analysis.  Several options are
being considered for expanding the model and attempting to use it to suggest or evaluate
possible policy changes that would allow all species to continue while maintaining a
viable economic environment for the human population.  Some of these options include
adding economic and regulatory tools such a fee on waste generation, futher legal
protections of wild species, and inclusion of environmental quality valuation. The overall
general goal is to use the model as  rough generic screening tool for sustainable
environmental management strategies.  This might include the use of economic
incentives and regulation.
                                       43

-------
                                Appendix A

                        Symbols Used in the Report

Clt = the stock of Cl at the beginning of the period

CpiH2 = consumption of PI per unit of H2 (depends on the restrictions imposed by PI
industry)

gi = growth parameter for species i

gPi = growth parameter of PI

Hls = HI industry's supply of HI during the current period

Hlt = stock of HI at the beginning of the period

H 1  = the HI industry's desired end of period inventory of HI

H1HH = the amount of HI consumed by the households

(HlHH)d = household sector's demand for HI

H2t = stock of H2 at the beginning of the period

hm = average number of hours employees work in the HI industry producing HI

h HI = average number of hours employees are used in the HI industry to reduce the
amount of HI eaten by Cl

his = average number of hours employees work in the IS industry producing IS

hNd = labor hours demanded

hpi = average number of hours employees work in the PI industry producing PI

h PI = average number of hours employees are used in the PI industry to reduce the
amount of PI eaten by H2

hs = average number of hours the households would like to work during the period (for all
employers combined)

ISt = the initial stock of IS (in units of goods) held by the IS industry

(9+X)-ISt = the initial stock of IS (in units of mass) held by the IS industry
                                      44

-------
/ S = the ending inventory of IS (in units of goods) that the IS industry plans for the end
of the period

(ISHH)S = the amount of IS the IS industry desires to supply to the households

(ISHH)d = the household sector's demand for IS

KH1t = stock of physical capital held by the HI industry at the beginning of the period

Kist = stock of physical capital held by the IS industry at the beginning of the period

Kplt = stock of physical capital held by the PI industry at the beginning of the period

KA = P2H1  (the amount of P2 the government permits the HI industry to take)

m; = mortality parameter for species i

    = mortality parameter of PI

    = mortality parameter of HI

Ns = net supply of labor function

Nt = human population at time t

NA t = total human mass at time t

P = (weighted) average price of consumer goods

P1H1 = the amount of PI consumed by the HI industry

(PlHl)d = the HI industry's demand for PI

P1HH = the amount of PI  consumed by the households

(PlHH)d = the household sector's total demand for PI

(PlIS)d = the IS industry's demand  for PI

Pls  = PI industry's supply of PI during the period

Plt= stock of PI at the beginning of the period

P 1  = desired inventory of PI for the end of the period
                                       45

-------
P2H1 = amount of P2 the government permits the HI industry to take

PHI = price of HI announced by the HI industry

PPI = price of PI announced by the PI industry

RPt = mass of the resource pool at the beginning of the period

Tr =  the transfer payments received by the households from the government sector

W =  money wage rate

WhNd= total wage bill (wage rate times number of labor hours)

r|(») = human birthrate

Ut =  average human mass per capita at time t = N" t / N t

H = total dividend income received by the households from all industries

H*PI  = profits of the PI industry
     = dividends plus additions to retained earnings for PI industry
     = dividends plus unintended real investment in inventories in the PI industry

H" = total non-wage income earned by all industries
   = profits plus rental income to fixed factors earned by all industries

(p =  weighting factor for the difference between the  current per capita weight of a human
and the ideal weight

X = the amount of RP necessary to produce a unit of IS

9 = the amount of PI necessary to produce a unit of IS

0-IS = the  amount of PI used by the IS industry

(9+X)-IS = the amount of mass appearing in the IS produced during the period

(0+X)-ISHH = the amount of mass the households buy during the current period in the
form of IS

com = a vector of parameters other than pPi that the PI industry believes affects the HI
industry's  demand for PI
   = a vector of parameters other than pPi that the PI industry believes affects the IS
industry's demand for PI
                                       46

-------
COISHH = a vector of parameters other than pis that the IS industry believes affects the
households' demand for IS

COHH = a vector of parameters other than pPi that the PI industry believes affects the
households' demand for PI

coHlHH = a vector of parameters other than pHl that the HI industry believes affects the
households' demand for HI
                                       47

-------
                                  Appendix B

                        SIMULINK Graphical Model


                  Run price_setting_initialize10.m to initialize parameters
price_settingSv8
^

X
                   S-Function
                                               To V\forkspace1
                       &
                       Clock
                                              To \Aforkspace
Figure B-l. Root level SIMULINK model (file price_setting2.mdl as opened in SIMULINK)

The S-Function contains a pointer to the file price_settingSv8.m
It is a masked system, with the mask defining the parameter names (values loaded via
initialization file price_setting_initializationl0.m).

To Workspace 1 defines a MATLAB workspace variable x which holds all the model
output.

To Workspace defines a MATLAB workspace variable t which holds the time variable.
                                        48

-------
                              Appendix C


                           SIMULINK Code


Text contained in and defining the graphical model of Appendix 1. Filename:
price_setting2.mdl

Model {
  Name                    "price_setting2"
  Version           6.1
  MdlSubVersion           0
  Graphicallnterface {
    NumRootlnports          0
    NumRootOutports         0
    ParameterArgumentNames  ""
    ComputedModelVersion    "1.151"
    NumModelReferences       0
    NumTestPointedSignals   0
  }
  SavedCharacterEncoding  "ibm-5348_P100-1997"
  SaveDefaultBlockParams  on
  SampleTimeColors        off
  LibraryLinkDisplay      "none"
  WideLines         off
  ShowLineDimensions      off
  ShowPortDataTypes       off
  ShowLoopsOnError        on
  IgnoreBidirectionalLines off
  ShowStorageClass        off
  ShowTestPointlcons      on
  ShowViewerlcons   on
  SortedOrder             off
  ExecutionContextlcon    off
  ShowLinearizationAnnotations on
  RecordCoverage    off
  CovPath           "/"
  CovSaveName             "covdata"
  CovMetricSettings       "dw"
  CovNamelncrementing     off
  CovHtmlReporting        on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName    "covCumulativeData"
  CovCumulativeReport     off
  CovReportOnPause        on
  ScopeRefreshTime        0.035000
  OverrideScopeRefreshTime on
  DisableAllScopes        off
  DataTypeOverride        "UseLocalSettings"
  MinMaxOverflowLogging   "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  BlockNameDataTip        off
  BlockParametersDataTip  off
                                   49

-------
BlockDescriptionStringDataTip     off
ToolBar           on
StatusBar         on
BrowserShowLibraryLinks off
BrowserLookUnderMasks   off
Created           "Tue Aug 12 09:54:50 2003"
UpdateHistory           "UpdateHistoryNever"
ModifiedByFormat        "%"
LastModifiedBy    "CPAWLOWS"
ModifiedDateFormat      "%"
LastModifiedDate        "Mon Mar 28 14:46:08 2005"
ModelVersionFormat      "1.%"
ConfigurationManager    "None"
LinearizationMsg        "none"
Profile           off
ParamWorkspaceSource    "MATLABWorkspace"
AccelSystemTargetFile   "accel.tic"
AccelTemplateMakefile   "accel_default_tmf"
AccelMakeCommand        "make_rtw"
TryForcingSFcnDF        off
ExtModeBatchMode        off
ExtModeEnableFloating   on
ExtModeTrigType   "manual"
ExtModeTrigMode   "normal"
ExtModeTrigPort   "1"
ExtModeTrigElement      "any"
ExtModeTrigDuration     1000
ExtModeTrigDurationFloating "auto"
ExtModeTrigHoldOff      0
ExtModeTrigDelay        0
ExtModeTrigDirection    "rising"
ExtModeTrigLevel        0
ExtModeArchiveMode      "off"
ExtModeAutoIncOneShot   off
ExtModelncDirWhenArm    off
ExtModeAddSuffixToVar   off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect   on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll           on
ExtModeAutoUpdateStatusClock on
BufferReuse             on
StrictBusMsg            "None"
ProdHWDeviceType        "32-bit Generic"
ShowModelReferenceBlockVersion off
ShowModelReferenceBlocklO off
Array {
  Type              "Handle"
  Dimension               1
  Simulink.ConfigSet {
    $ObjectID               1
    Version                 "1.0.4"
    Array {
    Type              "Handle"
    Dimension         7
    Simulink.SolverCC {
      $ObjectID         2
                                 50

-------
  Version           "1.0.4"
  StartTime         "0.0"
  StopTime          "200"
  AbsTol            "auto"
  FixedStep         "auto"
  InitialStep             "auto"
  MaxNumMinSteps    "-1"
  MaxOrder          5
  ExtrapolationOrder      4
  NumberNewtonlterations  1
  MaxStep           "auto"
  MinStep           "auto"
  RelTol            "le-3"
  SolverMode              "Auto"
  Solver            "FixedStepDiscrete"
  SolverName              "FixedStepDiscrete"
  ZeroCrossControl        "UseLocalSettings"
  PositivePriorityOrder   off
  AutoInsertRateTranBlk   off
  SampleTimeConstraint    "Unconstrained"
  RateTranMode            "Deterministic"
}
Simulink.DatalOCC {
  $ObjectID         3
  Version           "1.0.4"
  Decimation              "1"
  Externallnput           "[t,  u]"
  FinalStateName    "xFinal"
  InitialState            "xlnitial"
  LimitDataPoints   on
  MaxDataPoints           "1000"
  LoadExternallnput        off
  LoadlnitialState        off
  SaveFinalState    off
  SaveFormat              "Array"
  SaveOutput              on
  SaveState         off
  SignalLogging           on
  SaveTime          on
  StateSaveName           "xout"
  TimeSaveName            "tout"
  OutputSaveName    "yout"
  SignalLoggingName        "sigsOut"
  OutputOption            "RefineOutputTimes"
  OutputTimes             "[ ] "
  Refine            "1"
}
Simulink.OptimizationCC {
  $ObjectID         4
  Version           "1.0.4"
  BlockReduction    on
  BooleanDataType   on
  ConditionallyExecutelnputs on
  ConditionalExecOptimization "on  for testing"
  InlineParams            off
  InlinelnvariantSignals  on
  OptimizeBlocklOStorage  on
                             51

-------
  BufferReuse             on
  EnforcelntegerDowncast  on
  ExpressionFolding       on
  FoldNonRolledExpr       on
  LocalBlockOutputs       on
  ParameterPooling        on
  RollThreshold           5
  SystemCodelnlineAuto    off
  StateBitsets            off
  DataBitsets             off
  UseTempVars             off
  ZeroExternalMemoryAtStartup on
  ZeroInternalMemoryAtStartup on
  InitFltsAndDblsToZero   on
  NoFixptDivByZeroProtection off
  OptimizeModelRefInitCode off
  LifeSpan          "inf"
}
Simulink.DebuggingCC {
  $ObjectID         5
  Version           "1.0.4"
  RTPrefix          "error"
  ConsistencyChecking     "none"
  ArrayBoundsChecking     "none"
  AlgebraicLoopMsg        "warning"
  ArtificialAlgebraicLoopMsg "warning"
  CheckSSInitialOutputMsg on
  CheckExecutionContextPreStartOutputMsg off
  CheckExecutionContextRuntimeOutputMsg   off
  SignalResolutionControl "TryResolveAllWithWarning"
  BlockPriorityViolationMsg "warning"
  MinStepSizeMsg    "warning"
  SolverPrmCheckMsg       "none"
  InheritedTsInSrcMsg     "warning"
  DiscretelnheritContinuousMsg "warning"
  MultiTaskDSMMsg   "warning"
  MultiTaskRateTransMsg   "error"
  SingleTaskRateTransMsg  "none"
  TasksWithSamePriorityMsg "warning"
  CheckMatrixSingularityMsg "none"
  IntegerOverflowMsg      "warning"
  Int32ToFloatConvMsg     "warning"
  ParameterDowncastMsg    "error"
  ParameterOverflowMsg    "error"
  ParameterPrecisionLossMsg "warning"
  UnderSpecifiedDataTypeMsg "none"
  UnnecessaryDatatypeConvMsg "none"
  VectorMatrixConversionMsg "none"
  InvalidFcnCallConnMsg   "error"
  FcnCalllnpInsideContextMsg "Use local settings"
  SignalLabelMismatchMsg  "none"
  UnconnectedlnputMsg     "warning"
  UnconnectedOutputMsg    "warning"
  UnconnectedLineMsg      "warning"
  SFcnCompatibilityMsg    "none"
  UniqueDataStoreMsg      "none"
  RootOutportRequireBusObj ect "warning"
                             52

-------
  AssertControl           "UseLocalSettings"
  EnableOverflowDetection off
  ModelReferencelOMsg     "none"
  ModelReferenceVersionMismatchMessage "none"
  ModelReferencelOMismatchMessage "none"
  ModelReferenceCSMismatchMessage "none"
  ModelReferenceSimTargetVerbose off
  UnknownTsInhSupMsg      "warning"
  ModelReferenceDataLoggingMessage "warning"
  ModelReferenceSymbolNameMessage "warning"
}
Simulink.HardwareCC {
  $ObjectID         6
  Version           "1.0.4"
  ProdBitPerChar    8
  ProdBitPerShort   16
  ProdBitPerlnt           32
  ProdBitPerLong    32
  ProdlntDivRoundTo       "Undefined"
  ProdEndianess           "Unspecified"
  ProdWordSize            32
  ProdShiftRightlntArith  on
  ProdHWDeviceType        "32-bit Generic"
  TargetBitPerChar        8
  TargetBitPerShort       16
  TargetBitPerlnt   32
  TargetBitPerLong        32
  TargetShiftRightlntArith on
  TargetIntDivRoundTo     "Undefined"
  TargetEndianess   "Unspecified"
  TargetWordSize    32
  TargetTypeEmulationWarnSuppressLevel 0
  TargetPreprocMaxBitsSint 32
  TargetPreprocMaxBitsUint 32
  TargetHWDeviceType      "Specified"
  TargetUnknown           on
  ProdEqTarget            on
}
Simulink.ModelReferenceCC {
  $ObjectID         7
  Version           "1.0.4"
  UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
  CheckModelReferenceTargetMessage "error"
  ModelReferenceNumlnstancesAllowed "Multi"
  ModelReferencePassRootInputsByReference on
  ModelReferenceMinAlgLoopOccurrences off
}
Simulink.RTWCC {
  $BackupClass            "Simulink.RTWCC"
  $ObjectID         8
  Version           "1.0.4"
  SystemTargetFile        "grt.tlc"
  GenCodeOnly             off
  MakeCommand             "make rtw"
  TemplateMakefile        "grt_default_tmf"
  GenerateReport    off
  SaveLog           off
                             53

-------
RTWVerbose              on
RetainRTWFile           off
ProfileTLC              off
TLCDebug          off
TLCCoverage             off
TLCAssert         off
ProcessScriptMode       "Default"
ConfigurationMode       "Optimized"
ConfigAtBuild           off
IncludeHyperlinklnReport off
LaunchReport            off
Array {
  Type              "Handle"
  Dimension               2
  Simulink.CodeAppCC {
    $ObjectID               9
    Version                 "1.0.4"
    ForceParamTrailComments off
    GenerateComments        on
    IgnoreCustomStorageClasses on
    IncHierarchylnlds       off
    MaxIdLength       31
    PreserveName            off
    PreserveNameWithParent  off
    ShowEliminatedStatement off
    IncAutoGenComments       off
    SimulinkDataObjDesc     off
    SFDataObjDesc           off
    IncDataTypelnlds        off
    PrefixModelToSubsysFcnNames on
    CustomSymbolStr         "$R$N$M"
    MangleLength            1
    DefineNamingRule        "None"
    ParamNamingRule         "None"
    SignalNamingRule        "None"
    InsertBlockDesc         off
    SimulinkBlockComments   on
    EnableCustomComments    off
    InlinedPrmAccess        "Literals"
    ReqsInCode        off
  Simulink.GRTTargetCC {
    $BackupClass
    $ObjectID
    Version
    TargetFcnLib
    GenFloatMathFcnCalls
    UtilityFuncGeneration
    GenerateFullHeader
    GenerateSampleERTMain
    IsPILTarget       off
    ModelReferenceCompliant off
    IncludeMdlTerminateFcn  on
    CombineOutputUpdateFcns off
    SuppressErrorStatus     off
    IncludeFileDelimiter    "Auto"
    ERTCustomFileBanners     off
"Simulink.TargetCC"
10
"1.0.4"
"ansi tfl tmw.mat"
"ANSI~C"
"Auto"
on
off
                           54

-------
  SupportAbsoluteTime
  LogVarNameModifier
  MatFileLogging
  MultilnstanceERTCode
  SupportNonFinite
  SupportComplex
  PurelyIntegerCode
  SupportContinuousTime
  SupportNonlnlinedSFcns
  ExtMode
  ExtModeStaticAlloc
  ExtModeTesting
  ExtModeStaticAllocSize
  ExtModeTransport
  ExtModeMexFile
  RTWCAPISignals
  RTWCAPIParams
  RTWCAPIStates
  GenerateASAP2
}
PropName
                                  on
                                  "rt_"
                                  off
                                  off
                                  on
                                  on
                                  off
                                  on
                                  on
                                  off
                                  off
                                  off
                                  1000000
                                  0
                                  "ext comm"
                                  off
                                  off
                                  off
                                  off

                                "Components"
    PropName

    Name
    SimulationMode
    CurrentDlgPage

  PropName

Simulink.ConfigSet {
  $PropName
  $ObjectID

BlockDefaults {
  Orientation
  ForegroundColor
  BackgroundColor
  DropShadow
  NamePIacement
  FontName
  FontSize
  FontWeight
  FontAngle
  ShowName
              "Components"

              "Configuration"
                    "normal"
                    "Solver"

                  "ConfigurationSets"
                  "ActiveConfigurationSet"
                  1
                  "right"
                  "black"
                  "white"
                  off
            "normal"
                  "Helvetica"
                  10
                  "normal"
                  "normal"
                  on
BlockParameterDefaults {
  Block {
    BlockType
    DisplayTime       off

  Block {
    BlockType
    FunctionName
    SFunctionModules
    PortCounts        " [ ]'
                    Clock
                    "S-Function"
                    "system"
                         55

-------
    Block {
      BlockType               ToWorkspace
      VariableName            "simulink_output"
      MaxDataPoints           "1000"
      Decimation        "1"
      SampleTime        "0"
      FixptAsFi               off
  AnnotationDef aults {
    HorizontalAlignment     "center"
    VerticalAlignment       "middle"
    ForegroundColor         "black"
    BackgroundColor         "white"
    DropShadow              off
    FontName                "Helvetica"
    FontSize                10
    FontWeight              "normal"
    FontAngle               "normal"
  }
  LineDefaults {
    FontName                "Helvetica"
    FontSize                9
    FontWeight              "normal"
    FontAngle               "normal"
  }
  System {
    Name              "price_setting2 "
    Location                7368, 122, 948, 423]
    Open              on
    ModelBrowserVisibility  off
    ModelBrowserWidth       200
    ScreenColor             "white"
    PaperOrientation        "landscape"
    PaperPositionMode       "auto"
    PaperType               "usletter"
    PaperUnits              "inches"
    ZoomFactor              "100"
    ReportName              "simulink-def ault . rpt"
    Block {
      BlockType               Clock
      Name              "Clock"
      Position                [160, 175,  180, 195]
      Decimation        "10"
    }
    Block {
      BlockType               "S-Function"
      Name              "S-Function"
      Ports              [0, 1]
      Position                [85, 80, 235, 110]
      FunctionName            "price_settingSv8 "
      Parameters
"ecolparams, econparams, ic,MH_updown, Lamb_updown, "
"Thet_updown, tlo, thi"
      MaskPromptString        "Human Mortality Lambda, RP input for IS
industr"
                                   56

-------
"y Theta, PI input for IS industry tlo, time to start change thi, time
to end "
"change"
      MaskStyleString         "popup(unchanging|increasing to not more
than 2 "
"times decreasing to not less than l/10th),popup(unchanged increasing
w/o boun"
"d decreasing to not less than l/10th),popup(unchanging|increasing w/o
bound|d"
"ecreasing to not less than  l/10th),edit,edit"
      MaskTunableValueString  "off,off,off,off,off"
      MaskCallbackString      "|   |
      MaskEnableString
      MaskVisibilityString
      MaskToolTipString
      MaskVarAliasString      ",,,,"
      MaskVariables
"MH_updown=@l;Lamb_updown=@2;Thet_updown=@3;tlo="
"@4;thi=@5;"
              ~~               on
                              on
                              "none"
                              "autoscale"
                              "unchanging|unchanged unchanging|10 10"
                         on,on,on,on,on
                         'on,on,on,on,on'
                         'on,on,on,on,on'
MasklconFrame
MasklconOpaque
MasklconRotate
MasklconUnits
MaskValueString
MaskTabNameString
    Block {
      BlockType
      Name
      Position
      VariableName
      MaxDat a Points
      SampleTime
      SaveFormat
    }
    Block {
      BlockType
      Name
      Position
      VariableName
      MaxDat a Points
      SampleTime
      SaveFormat
    }
    Line {
      SrcBlock
      SrcPort
      DstBlock
      DstPort
                        ToWorkspace
                  "To Workspace"
                        [325, 170, 385, 200]
                        II 4- II

                        "inf"
                  II -1 II

                  "Array"
                        ToWorkspace
                  "To Workspacel"
                        [335, 80, 395, 110]
                         'inf
                  II -1 II

                  "Array"
                        "Clock"
                        1
                        "To Workspace"
                        1
    Line {
      SrcBlock
      SrcPort
      DstBlock
      DstPort
                        "S-Function"
                        1
                        "To Workspacel"
                        1
    Annotation {
                                   57

-------
      Name              "Run price_setting_initializelO.m to initialize
ii

"parameters"

      Position                 [258, 26]
                                   58

-------
                               Appendix D

                             MATLAB Code

The first file is an initialization file, price_setting_initializel0.m, which initializes the
parameters and initial state conditions.  This is a convoluted way of loading the
parameters listed above.

The next file is the core of the model, written as an S function.  The file name is
price_settingSv8.m


Initialization file (price_setting_initializel0.m). Run before running SEVIULINK model

% price setting  initializelO.m
%initialization  file  for price settingSvS.m
 ecolparams=[2.861325308717139e-002 %found 30 Aug  2004
    1.734351784507601e-002
    3.265224224356716e-002
    5.732733145333690e-003
    3.131235080180339e-001
    9.174906638699569e-001
    3.327275637705977e-001
    2.350696927025789e-001
    5.081656269272850e-002
    8.688268022462951e-001
    4.932828648894071e-001
    4.658138102587053e-001
    l.OOOOOOOOOOOOOOOe-003
    5.030915711147533e-001
    2.302639355221487e-001
    4.286472149788781e-001
    0.0%6.602439763447394e-006 %background feedback  of  IRP to RP set to
% zero
    1.233437625619434e+000
    l.OOOOOOOOOOOOOOOe+001
    .1                           %gP!H2 %when humans  die off
     .2];                         %gH!Cl

ecolparams(10)=.9;
ecolparams(7)=1.3127275637705977e-001;

ecolparams(14)=4.9030915711147533e-001;
ecolparams(3)=3.7e-2;
ecolparams(9)=1.081656269272850e-002;
ecolparams(2)=2.93435178450760le-002;
ecolparams(3)=4.2e-2;  %6  Oct 2004
                                    59

-------
% ecological params =
% [gRPP2;gP2H2;gP2H3;gRPPS;gP3H3;gH2Cl;gH2C2;gH3C2;
% rIRPP2;rIRPP3;mP2;mP3;mH2;mH3;mCl;mC2;mIRPRP;RPIRP;P2;gPlH2;gHlCl] ;
% Here,  P2 is a
% choice variable, controlling the total system mass
%
% gRPP2=ecolparams(1);
%
% gP2H2=ecolparams(2);gP2H3=ecolparams(3);gRPP3=ecolparams(4);
% gP3H3=ecolparams(5);
% gH2Cl=ecolparams(6);gH2C2=ecolparams(7);gH3C2=ecolparams(8);
% rIRPP2=ecolparams(9);rIRPP3=ecolparams(10);
% mP2=ecolparams(11);mP3=ecolparams(12);mH2=ecolparams(13);
% mH3=ecolparams(14);mCl=ecolparams(15);mC2=ecolparams(16);
% mIRPRP=ecolparams(17);RPIRP=ecolparams(18); %not used in  full  econ
% ecol model
% P2=ecolparams(19);
% gP!H2=ecolparams(20);gH!Cl=ecolparams(21); %13 Aug 2004 natural
% predation of PI and HI
% economic parameters, found using ga find econVl.m:

% aw=econparams(1);cw=econparams(2);
% aPl=econparams(3);bPl=econparams(4);cPl=econparams(5);
% aPlp=econparams(6);bPlp=econparams(7);cPlp=econparams(8);
% aHl=econparams(9);bHl=econparams(10);cHl=econparams(11);
% aHlp=econparams(12);bHlp=econparams(13);cHlp=econparams(14);
% aIS=econparams(15);bIS=econparams(16);cIS=econparams(17);
% aISp=econparams(18);bISp=econparams(19);cISp=econparams(20);

% dP!Hl=econparams(21);eP!Hl=econparams(22);fPlHl=econparams(23);
% gP!Hl=econparams(24);
%
% *****dPHS=econparams (25) ; ePHS=econparams (26) ; f PlIS=econparams (27) ;
% gPHS=econparams (28) no longer used****;
% dP!HH=econparams(29);zP!HH=econparams(30);kP!HH=econparams(31);
% mP!HH=econparams(32);nP!HH=econparams(33);
% dH!HH=econparams(34);zH!HH=econparams(35);kH!HH=econparams(36);
% mH!HH=econparams(37);nH!HH=econparams(38);
% dISHH=econparams(39);zISHH=econparams(40);kISHH=econparams(41);
% mISHH=econparams(42);nISHH=econparams(43);
% khat=econparams(44);theta=econparams(45);lambda=econparams(46);
% gRPPl=econparams(47);mPl=econparams(48);mHl=econparams(49);
% mHH=econparams(50);
  Plbarmass=econparams(51);Hlbarmass=econparams(52);
  ISbarmass=econparams(53);dw=econparams(54);
  etaa=econparams(55);etab=econparams(56);etac=econparams(57);
  phi=econparams(58);
% phi=econparams(58);
% idealpercapmass=econparams(59);

sol=[4.832248668616482e-001
    1.357181037387526e-001
    l.OOOOOOOOOOOOOOOe+000
                                   60

-------
    l.OOOOOOOOOOOOOOOe+000
    7.737088487049635e-001
    1.910770291618713e-001
    4.991249741897157e-002
    3.380538111199238e-002
    7.524098562805767e-001
    l.OOOOOOOOOOOOOOOe-003
    2.527165128459011e-001
    9.926234817539428e-001
    6.081040091094971e-001
    2.972103070158917e-001
    l.OOOOOOOOOOOOOOOe-003
    5.646817673172643e-001
    4.240782789383344e-001
    19.000000000000000e-001
    1.286507253686182e-001
    1.474467159083802e-002
    3.995283985198757e-001
    1.555235114499388e-001
    1.019919611353713e-001
    6.766772330024032e-001
    1.018295456166137e-003
    9.838862467656756e-003
    9.000000000000011e-001];

  sol(6)=1.25e-001;
% assign parameters
econparams ( 1 : 5 ) =sol ( 1 : 5 ) ;
econparams (6)=3*sol(6); econparams (7)=3*sol(7);
econparams (8:ll)=sol(8:ll);
econparams (12)=sol(6);
econparams (13)=sol(7);
econparams (14:17)=sol(12:15) ;
econparams (18)=sol(6);
econparams (19)=sol(7);
econparams (20)=sol(16);
dP!Hl=sol (6) ; econparams (21 : 4 : 29 ) = [dPlHl/1000 ; dPlHl/1000 ; dPlHl/1000] ;eco
nparams ( 34 : 5 : 39 ) = [dPlHl/1000 ; dPlHl/1000] ;
eP!Hl=sol (7) ; econparams (22:4:26) = [ePlHl;ePlHl] ;
fP!Hl=sol (17) ; econparams (23 : 4 : 27 ) = [ f P1H1/1 ; f P1H1/1] ; econparams (31:5:41)
= [f P1H1/ 1000; 1/2* fPlHl/ 1000; 1/2* fPlHl/ 1000] ;
econparams (24)=sol(18); econparams (28)=sol(19);
econparams (30:5:40)=[sol(20)/1000;sol(20)/1000;sol(20)/1000]*10000;
mH!HH=sol (21) ; econparams (32 : 5: 42) =[ l/2*mH!HH/ 1000 ;mH!HH/ 1000 ; l/2*mH!HH/
1000] ;
nISHH=sol (22) ; econparams (33: 5: 43) = [ l/2*nISHH/1000 ; l/2*nISHH/1000 ; nISHH/
1000] ;
econparams (45)=sol(23); econparams (46)=sol(24);
econparams (48)=sol(25); econparams (49)=sol(26); econparams ( 50 ) = . 22 ;

econparams (44 ) =0 . 3; %khat
econparams (47) =. 09;%1. 05e-2; %growth of  PI
                                   61

-------
econparams ( 51 ) =0 ; %1 ; %Plbarmass
econparams (52)=.4;%0.125; %Hlbarmass
econparams ( 53 ) =0 ; %ISbarmass
econparams (54) =0. 01*4 . 507354330528614e-004;  %dw,  second number in
% product is ic econ ( 4 ) /numHH

econparams ( 55 ) =9/6; %etaa
econparams (56) =5/6; %etab
econparams (57)=.l/6;%etac
econparams ( 58 ) =lel ; %phi
% initialize economic state  [ PI ; HI ; IS ; HH]
%
ic_econ=[l. 550317582 123858e+000
    1.400236056583227e-001
    1.0089700803 62 582e- 001
    4.507354330528614e-001] ;

numHH=10; %initial number of humans

econparams (59) =4 . 0555 8 660 632 72 34e- 003 ; %ic_econ (4) /numHH;  %ideal  per
% capita human mass
% calculate ecological equilibrium, without  any  of  the  domesticated or
% industrial agents
%
e co Ip a rams ( 8 ) =ecolparams ( 8 ) + . 25*ecolparams ( 8 ) ;
ic ecol=eq21apr2004V2 (ecolparams) ;
ecolparams(18)=0; %set RPIRP to zero, without  changing  original
% equilibrium.
                  %comment this out to run ecological model  itself
%   econparams=zeros(50,1);       %uncomment  these  two  lines  to run the
%   econparams(45:46,1)=[1;1];    %ecological model with  no  economics
% PI, P2, P3, HI, H2, H3, Cl, C2, HH,  IS,  RP,  IRP,  PlHlmassdeficit,
% PllSmassdeficit, . .  .
% PlHHmassdeficit, Hlmassdeficit, ISmassdeficit,  numHH,  percapmass
ic=[ic econ(l);ic ecol(l);ic ecol(2);ic  econ(2);ic  ecol(3);ic ecol(4);i
c_ecol(5) ;ic_ecol(6)  ;ic_econ(4) ;. . .
        ic_econ(3);ic_ecol(7);ic_ecol(8);0;0;0;0;0;  numHH;
4.055586606327234e-003] ;%ic econ(4)/numHH] ;
The ecological part of the model has its equilibrium calculated by the function
eq21apr2004V2.m, given below.
                                    62

-------
function out = eq21apr2004V2(params)

% eq21apr2004V2.m gives the equilibrium of the simple  foodweb  in
% equationsS.nb,  in C:\chrisp\EPA\projects\agent
% model\mnsimple_21_apr_2004
%
%
% First written 28 Jul 2004 CWP
% assign parameters
%
%
% params =
% [gRPP2;gP2H2;gP2H3;gRPPS;gP3H3;gH2Cl;gH2C2;gH3C2;
% rIRPP2;rIRPP3;mP2;mP3;mH2;mH3;mCl;mC2;mIRPRP;gRPIRP;P2]; Here,  P2  is
% a choice variable, controlling the total system mass

gRPP2=params(1);
gP2H2=params(2);gP2H3=params(3);gRPP3=params(4);gP3H3=params(5);
gH2Cl=params(6);gH2C2=params(7);gH3C2=params(8);
rIRPP2=params(9);rIRPP3=params(10);
mP2=params(11);mP3=params(12);mH2=params(13);
mH3=params(14);mCl=params(15);mC2=params(16);
mIRPRP=params(17);RPIRP=params(18);P2=params(19);  %gRPIRP not  used here

%
% calculate equilibria as determined analytically  in the Mathematica
% notebook

Cl=(l/gH2Cl)*(-mH2+gP2H2*P2-(l/gH3C2)*...
(gH2C2*(-mH3+gP2H3*P2+...
(gP3H3*((-gH2C2)*gP3H3*gRPP2*mCl*mIRPRP-...
gH3C2*gP2H2*gRPP3*mCl*mIRPRP+gH2C2*gP2H3*. . .
gRPP3*mCl*mIRPRP+gH2Cl*gP3H3*gRPP2*mC2*...
mIRPRP-gH2Cl*gP2H3*gRPP3*mC2*mIRPRP-...
gH2Cl*gH3C2*gRPP3*mIRPRP*mP2+gH2Cl*gH3C2*...
gRPP2*mIRPRP*mP3-gH2C2*gP3H3*gRPP2*mCl*P2*...
rIRPP2-gH3C2*gP2H2*gRPP3*mCl*P2*rIRPP2+...
gH2C2*gP2H3*gRPP3*mCl*P2*rIRPP2+. . .
gH2Cl*gP3H3*gRPP2*mC2*P2*rIRPP2-. . .
gH2Cl*gP2H3*gRPP3*mC2*P2*rIRPP2-. . .
gH2Cl*gH3C2*gRPP3*mP2*P2*rIRPP2+. . .
gH2Cl*gH3C2*gRPP2*mP3*P2*rIRPP2+. . .
gH2Cl*gH3C2*gRPP3*rIRPP2*RPIRP-. . .
gH2Cl*gH3C2*gRPP2*rIRPP3*RPIRP) ) / . . .
((gH2C2*gP3H3*gRPP2*mCl+gH3C2*gP2H2*gRPP3*mCl-...
gH2C2*gP2H3*gRPP3*mCl-gH2Cl*gP3H3*gRPP2*mC2+...
gH2Cl*gP2H3*gRPP3*mC2+gH2Cl*gH3C2*gRPP3*mP2-...
gH2Cl*gH3C2*gRPP2*mP3)*rIRPP3)  ) ) ) ;

C2=(l/gH3C2)*(-mH3+gP2H3*P2+. .  .
(gP3H3*((-gH2C2)*gP3H3*gRPP2*mCl*mIRPRP-...
gH3C2*gP2H2*gRPP3*mCl*mIRPRP+gH2C2*gP2H3*gRPP3*. . .
                                   63

-------
mCl*mIRPRP+gH2Cl*gP3H3*gRPP2*mC2*mIRPRP-...
gH2Cl*gP2H3*gRPP3*mC2*mIRPRP-gH2Cl*gH3C2*gRPP3*. . .
mIRPRP*mP2+gH2Cl*gH3C2*gRPP2*mIRPRP*mP3-...
gH2C2*gP3H3*gRPP2*mCl*P2*rIRPP2-...
gH3C2*gP2H2*gRPP3*mCl*P2*rIRPP2+. . .
gH2C2*gP2H3*gRPP3*mCl*P2*rIRPP2+. . .
gH2Cl*gP3H3*gRPP2*mC2*P2*rIRPP2-. . .
gH2Cl*gP2H3*gRPP3*mC2*P2*rIRPP2-. . .
gH2Cl*gH3C2*gRPP3*mP2*P2*rIRPP2+. . .
gH2Cl*gH3C2*gRPP2*mP3*P2*rIRPP2+. . .
gH2Cl*gH3C2*gRPP3*rIRPP2*RPIRP-. . .
gH2Cl*gH3C2*gRPP2*rIRPP3*RPIRP) )/ . . .
((gH2C2*gP3H3*gRPP2*mCl+gH3C2*gP2H2*gRPP3*mCl-...
gH2C2*gP2H3*gRPP3*mCl-gH2Cl*gP3H3*gRPP2*mC2+...
gH2Cl*gP2H3*gRPP3*mC2+gH2Cl*gH3C2*gRPP3*mP2-...
gH2Cl*gH3C2*gRPP2*mP3)*rIRPP3) ) ;

H2=mCl/gH2Cl;

H3=( (-gH2C2)*mCl + gH2Cl*mC2)/(gH2Cl*gH3C2) ;

P3=((-gH2C2)*gP3H3*gRPP2*mCl*mIRPRP-gH3C2*gP2H2*gRPP3*mCl^
mIRPRP+gH2C2*gP2H3*gRPP3*mCl*mIRPRP+...
gH2Cl*gP3H3*gRPP2*mC2*mIRPRP-gH2Cl*gP2H3*gRPP3*mC2*...
mIRPRP-gH2Cl*gH3C2*gRPP3*mIRPRP*mP2+...
gH2Cl*gH3C2*gRPP2*mIRPRP*mP3-gH2C2*gP3H3*gRPP2*mCl*...
P2*rIRPP2-gH3C2*gP2H2*gRPP3*mCl*P2*rIRPP2+...
gH2C2*gP2H3*gRPP3*mCl*P2*rIRPP2+. . .
gH2Cl*gP3H3*gRPP2*mC2*P2*rIRPP2-. . .
gH2Cl*gP2H3*gRPP3*mC2*P2*rIRPP2-. . .
gH2Cl*gH3C2*gRPP3*mP2*P2*rIRPP2+. . .
gH2Cl*gH3C2*gRPP2*mP3*P2*rIRPP2+. . .
gH2Cl*gH3C2*gRPP3*rIRPP2*RPIRP-...
gH2Cl*gH3C2*gRPP2*rIRPP3*RPIRP)/ . . .
((gH2C2*gP3H3*gRPP2*mCl+gH3C2*gP2H2*gRPP3*mCl-...
gH2C2*gP2H3*gRPP3*mCl-gH2Cl*gP3H3*gRPP2*mC2+...
gH2Cl*gP2H3*gRPP3*mC2+gH2Cl*gH3C2*gRPP3*mP2-...
gH2Cl*gH3C2*gRPP2*mP3)*rIRPP3) ;

RP=((-gH2C2)*gP3H3*mCl*rIRPP2+gH2Cl*gP3H3*mC2*rIRPP2+...
gH2Cl*gH3C2*mP3*rIRPP2-gH3C2*gP2H2*mCl*rIRPP3+...
gH2C2*gP2H3*mCl*rIRPP3-gH2Cl*gP2H3*mC2*rIRPP3-...
gH2Cl*gH3C2*mP2*rIRPP3)/(gH2Cl*gH3C2*...
(gRPP3*rIRPP2-gRPP2*rIRPP3) ) ;

IRP=((-gH2C2)*gP3H3*gRPP2*mCl-gH3C2*gP2H2*gRPP3*mCl+...
gH2C2*gP2H3*gRPP3*mCl+gH2Cl*gP3H3*gRPP2*mC2-...
gH2Cl*gP2H3*gRPP3*mC2-gH2Cl*gH3C2*gRPP3*mP2+...
gH2Cl*gH3C2*gRPP2*mP3)/(gH2Cl*gH3C2*...
( (-gRPPS)*rIRPP2+gRPP2*rIRPP3) ) ;

out=[P2;P3;H2;H3;Cl;C2;RP;IRP] ;

S- Function, core of model (file: price_settingSv8.m)
                                   64

-------
function [sys,yO,str,ts]  =
price settingSv8(t,y,u,flag,ecolparams,econparams,...
    iconditions,MH_updown,Lamb_updown,Thet_updown,  tlo,  thi)
% price settingSvS.m is based on price settingSv?.m.   corrects  v7
% See summary summtoaustriav5.doc
% 18 Jan 2005 CWP
%

%
% The following outlines the general structure of an  S-function.
%
switch flag,
  % Initialization %
  %%%%%%%%%%%%%%%%%%
  case 0,

[sys,yO,str,ts] =mdl!nitializeSizes (i conditions , ecolparams, econparams ) ;
  % Derivatives %
  case 1,
    sys=mdlDerivatives (t,y,u) ;
  % Update %
  %%%%%%%%%%
  case 2,

sys=mdlUpdate (t, y, u, ecolparams , econparams ,MH updown,Lamb  updown,Thet  up
down, tlo, thi) ;
  % Outputs %
  case 3,
    sys=mdl Outputs ( t, y, u) ;
  % GetTimeOfNextVarHit %
  case 4,
    sys=mdlGetTimeOfNextVarHit (t, y, u) ;
  % Terminate %
                                   65

-------
  case 9,
    sys=mdlTerminate (t, y, u) ;
  % Unexpected flags %
  otherwise
    error ([ 'Unhandled flag = ' , num2str ( f lag) ] ) ;

end

% end sfuntmpl
%==================================================================
% mdllnitializeSizes
% Return the sizes, initial conditions, and sample times for the S-
% function.
function
[sys,yO,str,ts] =mdl!nitializeSizes (i conditions , ecolparams, econparams )

global RPP1 P1H2 PUS P1H1 P1HH RPIS ISIRP P2H1 H1C1 H1HH pPl pHl pIS W
ISHHflow
% call simsizes for a sizes structure, fill it in and convert it to a
% sizes array.
%
sizes = simsizes;

sizes.NumContStates  = 0;
sizes.NumDiscStates  = 19;
sizes.NumOutputs     = 33;
sizes.Numlnputs      = 0;
sizes.DirFeedthrough = 0;
sizes.NumSampleTimes =1;   % at least one sample time is needed

sys = simsizes(sizes);
% assign initial conditions

yO=iconditions;

%
% str is always  an empty matrix

str = [] ;


% initialize the array of sample times

ts  = [10];
                                   66

-------
% Do the following to find initial transfer  flows  for  the  global
% variables
%
belownoreproduction=le-4; %level below which the natural ecosystem
% elements do not reproduce

% assign parameters
% ecolparams =
% [gRPP2;gP2H2;gP2H3;gRPPS;gP3H3;gH2Cl;gH2C2;gH3C2;
% rIRPP2;rIRPP3;mP2;mP3;mH2;mH3;mCl;mC2;mIRPRP;RPIRP;P2];  Here,  P2  is  a
% choice variable, controlling the total  system mass
%
gRPP2=ecolparams(1) ;
gP2H2=ecolparams(2);gP2H3=ecolparams(3);gRPP3=ecolparams(4);gP3H3=ecolp
arams(5);
gH2Cl=ecolparams(6);gH2C2=ecolparams(7);gH3C2=ecolparams(8);
rIRPP2=ecolparams(9);rIRPP3=ecolparams(10);
mP2=ecolparams(11);mP3=ecolparams(12);mH2=ecolparams(13);
mH3=ecolparams(14);mCl=ecolparams(15);mC2=ecolparams(16);
mIRPRP=ecolparams(17);RPIRP=ecolparams(18);  %this  last  constant  changed
% 2 Aug 2004
gP!H2=ecolparams(20);gH!Cl=ecolparams(21);  %13 Aug  2004  natural
% predation of PI  and HI
% econparams are economic parameters:

aw=econparams(1);cw=econparams(2);
aPl=econparams(3);bPl=econparams(4);cPl=econparams(5);
aPlp=econparams(6);bPlp=econparams(7);cPlp=econparams(8);
aHl=econparams(9);bHl=econparams(10);cHl=econparams(11);
aHlp=econparams(12);bHlp=econparams(13);cHlp=econparams(14);
aIS=econparams(15);bIS=econparams(16);cIS=econparams(17);
aISp=econparams(18);bISp=econparams(19);cISp=econparams(20);
dP!Hl=econparams(21);eP!Hl=econparams(22);fPlHl=econparams(23);gP!Hl=ec
onparams(24);
% dPHS=econparams (25) ; ePHS=econparams (26) ; f PlIS=econparams (21) ;
% gPHS=econparams (28) ;
dP!HH=econparams(29);zP!HH=econparams(30);kP!HH=econparams(31);mP!HH=ec
onparams(32);nP!HH=econparams(33);
dH!HH=econparams(34);zH!HH=econparams(35);kH!HH=econparams(36);mH!HH=ec
onparams(37);nH!HH=econparams(38);
dISHH=econparams(39);zISHH=econparams(40);kISHH=econparams(41);mISHH=ec
onparams(42);nISHH=econparams(43);
khat=econparams(44);theta=econparams(45);lambda=econparams(46);
gRPPl=econparams(47);mPl=econparams(48);mHl=econparams(49);mHH=econpara
ms(5 0) ;
Plbar=econparams (51) ;Hlbar=econparams (52) ; ISbar=econparams (53) ;dw=econp
arams(54);
etaa=econparams(55) ;etab=econparams(56) ;etac=econparams (57) ;phi=econpar
ams(58);
                                    67

-------
idealpercapmass=econparams (59) ;
% assign state
%
Pl=yO(l) ;P2=yO(2) ;P3=yO(3) ;
Hl=yO (4) ;H2=yO (5) ;H3=yO (6) ;
Cl=yO(7) ;C2=yO(8) ;
HH=yO (9) ; ISmass=yO (10) ; %ISmassdef icit keeps track of deficits
RP=yO(ll) ;
IRP=yO (12) ;
PlHlmassdeficit=yO (13) ; PllSmassdef icit=yO (14) ; PlHHmassdef icit=yO (15) ;
Hlmassdeficit=yO (16) ; ISmassdef icit=yO (17) ;
numHH=yO ( 18 ) ;percapmass=yO ( 19) ;
Plmassdef i cit=P!Hlmas s deficit +P II Smass deficit +PlHHmass deficit ;

rIRPP2=rIRPP2* (10A2/ (10A2+IRPA2) ) ;
rIRPP3=rIRPP3* (10A2/ (10A2+IRPA2) ) ;
        Economics
% Industrial sector sets the wage rate
%
W=max(aw+cw*(ISbar-(ISmassdeficit+ISmass))/(theta+lambda)-dw*numHH,0);
% Based on the Wage, industries set prices and their production  (how
% much they would like to produce  to maximize their profits  based on
% their assumption as to what the  demand for their products  will  be).
% Here a linear functional  form for the supply is  assumed.
%
if Pl==0
    pPl=0;
    Plproduction=0;
else
    pPl=max(aPl+bPl*W-cPl*((Plmassdeficit+Pl)-Plbar),0);
    Plproduction=max(aPlp-bPlp*W-cPlp*( (Plmassdeficit+Pl)-Plbar) , 0) ;
end

if Hl==0
    pHl=0;
    Hlproduction=0;
else
    pHl=max(aHl+bHl*W-cHl*((Hlmassdeficit+Hl)-Hlbar),0);
    Hlproduction=max(aHlp-bHlp*W-cHlp*((Hlmassdeficit+Hl)-Hlbar),0);
end

pIS=max(aIS+bIS*W+cIS*(ISbar-(ISmassdeficit+ISmass))/(theta+lambda),0);
ISproduction=max(aISp-bISp*W+cISp*(ISbar-
(ISmassdeficit+ISmass))/(theta+lambda),0);
                                   68

-------
if HH==0 numHH<2
    pIS=0;
    ISproduction=0;
end
% Next, a calculation is made of how much each industry  is  going  to
% demand of its suppliers. The  following  are  in  units  of mass,  unless
% otherwise noted
%
if Hl==0 HH==0 numHH<2
    PlHldemand=0;
    P2H1=0;
else
    PlHldemand=max(dPlHl-eP!Hl*W-fPlHl*pPl-gPlHl*((Hlmassdeficit+Hl)-
Hlbar),0);
    P2Hl=khat;
end
%
% expressions for P1HH, H1HH and ISHH reflect  constraint  on  human
% spending.
% These expressions were determined in MATHEMATICA under  the file
% C:\chrisp\EPA\projects\agent model\mnsimple_21_apr_2004
% solve_humans.nb
% These are per capita, so must be multiplied  by population  later

PlHHdemand=max((I/(-1+zPlHH+zHlHH+zISHH))*(-dPlHH-mP!HH*pHl-
nP!HH*pIS+...
kPlHH*pPl-dHlHH*zP!HH-dISHH*zPlHH+mHlHH*pHl*zPlHH-...
mISHH*pHl*zPlHH-nH!HH*pIS*zPlHH+nISHH*pIS*zPlHH-...
kHlHH*pPl*zP!HH-kISHH*pPl*zPlHH+dPlHH*zHlHH+...
mPlHH*pHl*zHlHH+nP!HH*pIS*zHlHH-kPlHH*pPl*zHlHH+...
dPlHH*zISHH+mPlHH*pHl*zISHH+nP!HH*pIS*zISHH-kPlHH*pPl*zISHH) , 0) ;

HlHHdemand=max((I/(-1+zPlHH+zHlHH+zISHH))*(-dHlHH+mH!HH*pHl-nHlHH*pIS-

kHlHH*pPl+dHlHH*zPlHH-mH!HH*pHl*zPlHH+nHlHH*pIS*zPlHH+...
kHlHH*pPl*zPlHH-dISHH*zH!HH-dPlHH*zHlHH-mISHH*pHl*zHlHH-...
mPlHH*pHl*zH!HH+nISHH*pIS*zHlHH-nPlHH*pIS*zHlHH-...
kISHH*pPl*zHlHH+kP!HH*pPl*zHlHH+dHlHH*zISHH-...
mHlHH*pHl*zISHH+nH!HH*pIS*zISHH+kHlHH*pPl*zISHH),0);

ISHHdemand=max(-((dISHH+mISHH*pHl-nISHH*pIS+kISHH*pPl-dISHH*zPlHH-
mISHH*pHl*zP!HH+...
nISHH*pIS*zP!HH-kISHH*pPl*zPlHH-dISHH*zHlHH-
mISHH*pHl*zH!HH+nISHH*pIS*zHlHH-...
kISHH*pPl*zHlHH+dH!HH*zISHH+dPlHH*zISHH-
mH!HH*pHl*zISHH+mPlHH*pHl*zISHH+...
nHlHH*pIS*zISHH+nPlHH*pIS*zISHH+kH!HH*pPl*zISHH-kPlHH*pPl*zISHH)/ . . .
(-1+zPlHH+zHlHH+zISHH)),0); %in units of units
                            % corrected  9 Aug  2004
if HH==0 numHH<2
    PlHHdemand=0;
                                   69

-------
    HlHHdemand=0;
    ISHHdemand=0;
end
% The flows that involve labor to keep the wild
% from taking domestics, namely P1H2 and H1C2 must then be calculated.
%
if Pl==0 H2==0
    P1H2=0;
else
    PlH2=max ( (gRPPl*Pl*RP-mPl*Pl-Plproduction) , 0) ;
end

if HH==0 numHH<2
    PlH2=gPlH2*Pl*H2;
end

if Hl==0 Cl==0
    H1C1=0;
else
    HlCl=max( ( PlHldemand+P2Hl-mHl*Hl-Hlproduction) ,0) ;
end

if HH==0 numHH<2
    HlCl=gHlCl*Hl*Cl;
end

PlISdemand=theta*ISproduction;
RP I Sdemand=l ambda * I Sp reduction;
% calculate all but next state, according to system
% equations (pricesettingequations3.doc, and Whitmore's paper
% C: \chrisp\EPA\projects\agent model \mnsimple_21_apr_2 004 \whitdocs\12
% cell imp comp EPA 5-04-04.doc)
% PI
%
PlRP=max (mPl*Pl, 0) ;RPPl=max (gRPPl*Pl*RP, 0) ;
PlHl=PlHldemand;
PlIS=PlISdemand;
PlHH=PlHHdemand*numHH;
if P1+RPP1-P1RP-P1H2-P1H1-P1HH-P1IS<0 %if statement to deal with going
% negative
    if P1+RPP1-P1RP<0
        P1RP=P1+RPP1;
        P1H2=0;P1H1=0;P1HH=0;P1IS=0;
    else
        totPldemand=PlH2+PlHl+PlHH+PHS;
        Plavail=Pl+RPPl-PlRP;
        PlH2=Plavail*PlH2/totPldemand;
                                   70

-------
        PlHl=Plavail*PlHl/totPldemand;
        PlHH=Plavail*PlHH/totPldemand;
        PlIS=Plavail-(P1H2+P1H1+P1HH) ;
    end
else
    if Plmassdeficit<0 %if there is an accumulated deficit between
% demand for PI try to
                   %make this up if there is extra stock
    Plsurplus=min(Pl+RPPl-PlRP-PlH2-PlHl-PlHH-PlIS,-Plmassdeficit);
%only what you need to make up deficit
    PlHl=PlHl+Plsurplus*PlHlmassdeficit/Plmassdeficit;
    PlIS=PlIS+Plsurplus*PlISmassdeficit/Plmassdeficit;
    PlHH=PlHH+Plsurplus*PlHHmassdeficit/Plmassdeficit;
    end
end

P2H2=gP2H2*P2*H2;P2H3=gP2H3*P2*H3;P2RP=max(mP2*P2,0);RPP2=max(gRPP2*RP*
P2,0) ;
IRPP2=max(rIRPP2*P2*IRP,0);
P3RP=max(mP3*P3,0);P3H3=gP3H3*P3*H3;RPP3=max(gRPP3*RP*P3,0);
IRPP3=max(rIRPP3*P3*IRP,0) ;
if IRP<=0
    IRPP2=0;
    IRPP3=0;
elseif IRP-IRPP2-IRPP3-max(IRP*mIRPRP,0)+RPIRP<0
    if P2~=0
        IRPP2=rIRPP2*(IRP-max(IRP*mIRPRP,0)+RPIRP)/(rIRPP2+rIRPP3);
    end
    if P3~=0
        IRPP3=rIRPP3*(IRP-max(IRP*mIRPRP,0)+RPIRP)/(rIRPP2+rIRPP3);
    end
end
if P2+IRPP2+RPP2-P2RP-P2H2-P2H3-P2HKbelownoreproduction
    if P2+IRPP2+RPP2-P2RP
-------
HlRP=max(mHl*Hl,0);
HlHH=HlHHdemand*numHH;
if H1+P1H1+P2H1-H1RP-H1C1-H1HH<0
    if H1+P1H1+P2H1-H1RP<0
        H1RP=H1+P1H1+P2H1;
        H1C1=0;H1HH=0;
    else
        totHldemand=H!Cl+HlHH;
        Hlavail=Hl+PlHl+P2Hl-HlRP;
        HlCl=Hlavail*HlCl/totHldemand;
        HlHH=Hlavail-HlCl;
    end
else
    if Hlmassdeficit<0
        HlHH=HlHH+min(H1+P1H1+P2H1-H1RP-H1C1-H1HH,-Hlmassdeficit);
%only what you need to make up deficit
    end
end
H2Cl=gH2Cl*Cl*H2;H2C2=gH2C2*H2*C2;H2RP=max(mH2*H2,0)
if H2+PlH2+P2H2-H2RP-H2Cl-H2C2
-------
IRPRP=max (IRP*mIRPRP, 0) ;
RPIS=min(lambda*PlIS/theta,RPISdemand);
stockRP=RP+PlRP+P2RP+P3RP+HlRP+H2RP+H3RP+C!RP+C2RP+HHRP+IRPRP;
if stockRP<0
    stockRP=0;
end
if stockRP-(RPP1+RPP2+RPP3)-RPIRP-RPIS<=0&RPIRP==0 %this line changed
% 26 Aug 2004
    RPdemand=RPPl+RPP2+RPP3+RPIS;
        RPPl=RPPl*stockRP/RPdemand;
            RPP2=RPP2*stockRP/RPdemand;
            RPP3=RPP3*stockRP/RPdemand;
        if RPIS~=0
            RPIS=stockRP-(RPP1+RPP2+RPP3);
        else
            RPIS=0;
        end
end
PlIS=min (theta*RPIS/lambda, PUS) ;
% t
% stockRP
% nextRP = stockRP-(RPP1+RPP2+RPP3)-RPIRP-RPIS
ISHHflow=max(0,(theta+lambda)*ISHHdemand*numHH);
ISIRP=ISHHflow;
if ISmass+PlIS+RPIS-ISIRP<=0
    ISIRP=ISmass+PlIS+RPIS;
else
    if ISmassdeficit<0&numHH>=2 %if there is an accumulated deficit
% between demand for IS by the HH and IS
        %supplied,  try to make this up if there is extra stock
        ISIRP=ISIRP+min(ISmass+PlIS+RPIS-ISIRP,-ISmassdeficit); %only
% what you need to make up deficit
    end
end

if (PlHHdemand+HlHHdemand+ISHHflow)==0
    weightedprice=0;
    percapbirths=0;
elseif (pPl*P!HHdemand+pHl*HlHHdemand+pIS*ISHHflow)==0
    weightedprice=0;
    percapbirths=0;
else

%weightedprice=(pPl*PlHHdemand+pHl*HlHHdemand+pIS*ISHHflow)/(PlHHdemand
% +HlHHdemand+ISHHflow) ;
    weightedprice=(pPl*PlHH+pHl*H!HH+pIS*ISIRP)/(P1HH+H1HH+ISIRP) ;
        %percapbirths=max(etaa-
% etab*W/weightedprice+etac*(W/weightedprice)A2,0);
    percapbirths=max(etaa-etab*sqrt(W/weightedprice) , 0) ;
%     if etab<=2*etac*(W/weightedprice)|etaa<=etac*(W/weightedprice)A2
%         error('pricesettingmodel:growtherror','Percapbirths function
% parameters give bad function form')
%     end
                                   73

-------
end

% end mdllnitializeSizes
% mdlDerivatives
% Return the derivatives for the continuous states,
%==================================================
%
function sys=mdlDerivatives(t,y,u)

sys=[];
% end mdlDerivatives
% mdlUpdate
% Handle discrete state updates, sample time hits,  and major  time  step
% requirements.
%======================================================================
%
function
sys=mdlUpdate (t, y, u, ecolparams, econparams ,MH_updown, Lamb_updown, Thet_up
down, tlo, thi)

global RPP1 P1H2 PUS P1H1 P1HH RPIS ISIRP P2H1 H1C1 H1HH pPl pHl  pIS W
ISHHflow

belownoreproduction=le-4 ; %level below which the natural ecosystem
% elements do not reproduce

% assign parameters
% ecolparams =
% [ gRPP2 ; gP2H2 ; gP2H3 ; gRPPS ; gP3H3 ; gH2Cl ; gH2C2 ; gH3C2 ;
% rIRPP2;rIRPP3;mP2;mP3;mH2;mH3;mCl;mC2;mIRPRP;RPIRP;P2] ;  Here,  P2  is  a
% choice variable, controlling the total system mass  %gRPIRP  changed 2
% Aug 2004 to RPIRP
%
gRPP2=ecolparams (1) ;
gP2H2=ecolparams (2) ; gP2H3=ecolparams (3) ; gRPP3=ecolparams (4) ;gP3H3=ecolp
arams ( 5 ) ;
gH2Cl=ecolparams (6) ; gH2C2=ecolparams (7) ; gH3C2=ecolparams (8) ;
rIRPP2=ecolparams (9) ; rIRPP3=ecolparams (10) ;
mP2=ecolparams (11) ;mP3=ecolparams (12) ;mH2=ecolparams (13) ;
                                   74

-------
ec
mH3=ecolparams(14);mCl=ecolparams(15);mC2=ecolparams(16);
mIRPRP=ecolparams(17);RPIRP=ecolparams(18);
gP!H2=ecolparams(20);gH!Cl=ecolparams(21);  %13 Aug  2004  natural
predation of PI and  HI
% econparams are economic parameters:
%
aw=econparams ( 1 ) ; cw=econparams ( 2 ) ;
aPl=econparams (3) ;bPl=econparams (4) ; cPl=econparams (5) ;
aPlp=econparams (6) ;bPlp=econparams (7) ; cPlp=econparams (8) ;
aHl=econparams (9) ;bHl=econparams (10) ; cHl=econparams (11) ;
aHlp=econparams (12) ;bHlp=econparams (13) ; cHlp=econparams (14) ;
aIS=econparams (15) ;bIS=econparams (16) ; cIS=econparams (17) ;
aISp=econparams (18) ;bISp=econparams (19) ; cISp=econparams (20) ;
dP!Hl=econparams (21) ; eP!Hl=econparams (22) ; f PlHl=econparams (23) ;gP!Hl=
onparams (24 );
%dPHS=econparams (25) ; ePHS=econparams (26) ; f PlIS=econparams (27) ;gPHS=e
% conparams (28 ) ;
dP!HH=econparams (29) ; zP!HH=econparams (30) ; kP!HH=econparams (31) ;mP!HH=ec
onparams (32)  ; nP!HH=econparams (33) ;
dH!HH=econparams (34) ; zH!HH=econparams (35) ; kH!HH=econparams (36) ;mH!HH=ec
onparams (37)  ; nH!HH=econparams (38) ;
dISHH=econparams (39) ; zISHH=econparams (40) ; kISHH=econparams (41) ;mISHH=ec
onparams (42)  ; nISHH=econparams (43) ;
khat=econparams (44) ; theta=econparams (45) ; lambda=econparams (46) ;
gRPPl=econparams (47) ;mPl=econparams (48) ;mHl=econparams (49) ;mHH=econpara
ms ( 5 0 ) ;
Plbar=econparams (51) ; Hlbar=econparams (52) ; ISbar=econparams (53) ;dw=econp
arams (54 );
etaa=econparams (55) ; etab=econparams (56) ; etac=econparams (57) ;phi=econpar
ams (58);
idealpercapmass=econparams (59) ;
%  gRPPl=gRPPl*(l+l/100*sin(2*pi*t/12)
%  gRPP2=gRPP2*(l+l/100*sin(2*pi*t/12)
%  gRPP3=gRPP3*(l + l/100*sin(2*pi*t/12)

lambdaz=lambda;thetaz=theta;mHHz=mHH;
if Lamb updown~=l
    if Lamb updown==2
        if t>=tlo&t<=thi
            lambda=lambdaz+.001*(t-tlo);
        elseif t>thi
            lambda=lambdaz+.001*(thi-tlo);
        end
    else
        if t>=tlo
            lambda=max(lambdaz-.001*(t-tlo),lambda/10);
        end
    end
end
                                    75

-------
if Thet updown~=l
    if Thet_updown==2
        if t>=tlo
            theta=thetaz+.001*(t-tlo);
        end
    else
        if t>=tlo
            theta=max(thetaz-.001*(t-tlo),theta/10);
        end
    end
end
if MH_updown~=l
    if MH updown==2
        if t>=tlo&t<=thi
            mHH=min(mHH*2,mHHz+.001*(t-tlo));
        elseif t>thi
            mHH=min(mHH*2,mHHz+.001*(thi-tlo) ) ;
        end
    else
        if t>=tlo
            mHH=max(mHH/10,mHHz-.001*(t-tlo) ) ;
        end
    end
end
% assign state
%
Pl=y(l);P2=y(2);P3=y(3);
Hl=y(4);H2=y(5);H3=y(6);
Cl=y(7);C2=y(8);
HH=y(9) ;ISmass=y(10) ;
RP=y(ll);
IRP=y(12);
PlHlmassdeficit=y (13) ;PllSmassdeficit=y (14) ;PlHHmassdeficit=y (15) ;
Hlmassdeficit=y(16);ISmassdeficit=y(17);
numHH=y(18);percapmass=y(19);
Plmassdeficit=PIHlmassdeficit+PIISmassdeficit+PlHHmassdeficit;
rIRPP2=rIRPP2*(10A2/(10A2+IRPA2)
rIRPP3=rIRPP3*(10A2/(10A2+IRPA2)
%       Economics
%
                                   76

-------
% Industrial sector sets the wage rate
%
W=max (aw+cw* ( ISbar- ( ISmassdef icit+ISmass ) ) / ( theta+lambda) -dw*numHH, 0 )  ;
% Based on the Wage, industries set prices and their production  (how
% much they would like to produce to maximize their profits based  on
% their assumption as to what the demand for their products will be) .
% Here, a linear functional form is assumed for the supply.
if Pl==0
    pPl=0;
    Plproduction=0 ;
else
    pPl=max (aPl+bPl*W-cPl* ( ( Plmassdef icit+Pl ) -Plbar) , 0) ;
    Plproduction=max (aPlp-bPlp*W-cPlp* ( ( Plmassdef icit+Pl ) -Plbar) , 0) ;
end

if Hl==0
    pHl=0;
    Hlproduction=0;
else
    pHl=max(aHl+bHl*W-cHl* ( (Hlmassdef icit+Hl ) -Hlbar) ,0) ;
    Hlproduction=max (aHlp-bHlp*W-cHlp* ( (Hlmassdef icit+Hl ) -Hlbar) , 0) ;
end

pIS=max (aIS+bIS*W+cIS* (ISbar- ( ISmassdef icit+ISmass ) ) / (theta+lambda) , 0) ;
ISproduction=max (aISp-bISp*W+cISp* (ISbar-
( ISmassdef icit+ISmass) ) / (theta+lambda) , 0) ;
if HH==0 numHH<2
    pIS=0;
    ISproduction=0;
end
% Next, how much each industry is going to demand of its
% suppliers is calculated.  The following are in units of mass, unless
% otherwise noted
%
if Hl==0 HH==0 numHH<2
    PlHldemand=0;
    P2H1=0;
else
    PlHldemand=max (dPlHl-eP!Hl*W-f PlHl*pPl-gPlHl* ( (Hlmassdef icit+Hl ) -
Hlbar) , 0) ;
    P2Hl=khat;
end
% expressions for P1HH, H1HH and ISHH reflect constraint on human
% spending.
% These expressions were determined in MATHEMATICA under the file
% C:\chrisp\EPA\projects\price setting\mnsimple 21 apr 2004
% solve_humans.nb
% These are per capita, so must be multiplied by population later
                                   77

-------
PlHHdemand=max((I/(-1+zPlHH+zHlHH+zISHH))*(-dPlHH-mP!HH*pHl-
nP!HH*pIS+...
kPlHH*pPl-dHlHH*zP!HH-dISHH*zPlHH+mHlHH*pHl*zPlHH-...
mISHH*pHl*zPlHH-nH!HH*pIS*zPlHH+nISHH*pIS*zPlHH-...
kHlHH*pPl*zP!HH-kISHH*pPl*zPlHH+dPlHH*zHlHH+...
mPlHH*pHl*zHlHH+nP!HH*pIS*zHlHH-kPlHH*pPl*zHlHH+...
dPlHH*zISHH+mPlHH*pHl*zISHH+nP!HH*pIS*zISHH-kPlHH*pPl*zISHH) , 0) ;

HlHHdemand=max((I/(-1+zPlHH+zHlHH+zISHH))*(-dHlHH+mH!HH*pHl-nHlHH*pIS-

kHlHH*pPl+dHlHH*zPlHH-mH!HH*pHl*zPlHH+nHlHH*pIS*zPlHH+...
kHlHH*pPl*zPlHH-dISHH*zH!HH-dPlHH*zHlHH-mISHH*pHl*zHlHH-...
mPlHH*pHl*zH!HH+nISHH*pIS*zHlHH-nPlHH*pIS*zHlHH-...
kISHH*pPl*zHlHH+kP!HH*pPl*zHlHH+dHlHH*zISHH-...
mHlHH*pHl*zISHH+nH!HH*pIS*zISHH+kHlHH*pPl*zISHH),0);

ISHHdemand=max(-((dISHH+mISHH*pHl-nISHH*pIS+kISHH*pPl-dISHH*zPlHH-
mISHH*pHl*zP!HH+...
nISHH*pIS*zP!HH-kISHH*pPl*zPlHH-dISHH*zHlHH-
mISHH*pHl*zH!HH+nISHH*pIS*zHlHH-...
kISHH*pPl*zHlHH+dH!HH*zISHH+dPlHH*zISHH-
mH!HH*pHl*zISHH+mPlHH*pHl*zISHH+...
nHlHH*pIS*zISHH+nPlHH*pIS*zISHH+kH!HH*pPl*zISHH-kPlHH*pPl*zISHH)/ . . .
(-1+zPlHH+zHlHH+zISHH)),0); %in units of  units
                            % corrected  9 Aug 2004

if HH==0 numHH<2
    ISHHdemand=0;
    PlHHdemand=0;
    HlHHdemand=0;
end
%    ISHHdemand+PlHHdemand+HlHHdemand

% PlHHdemand
%
% The flows that  involve labor to  keep the wild
% from taking domestics, namely P1H2 and  H1C2 must  then  be  calculated.
%
if Pl==0 H2==0
    P1H2=0;
else
    PlH2=max(  (gRPPl*Pl*RP-mPl*Pl-Plproduction) , 0) ;
end

if HH==0 numHH<2
    PlH2=gPlH2*Pl*H2;
end

if Hl==0 Cl==0
    H1C1=0;
else
    HlCl=max((PlHldemand+P2Hl-mHl*Hl-Hlproduction),0);
end
                                    78

-------
if HH==0 numHH<2
    HlCl=gHlCl*Hl*Cl;
end
% the ISproduction is checked again below as well, after checks for
% realistic mass transfers
%
if HH==0 numHH<2
    ISproduction=0 . 0 ;
end
PlISdemand=theta* ISproduction;
RP I Sdemand=l ambda * I Sp reduction;
% calculate next state, according to system
% equations (pricesettingequations3.doc, and Whitmore's paper
% C: \chrisp\EPA\projects\agent model \mnsimple_21_apr_2 004 \whitdocs\12
% cell imp comp EPA 5-04-04.doc)
% Here,  check to see that these transfers won't violate conservation of
% mass
% PI
%
PlRP=max (mPl*Pl, 0) ;RPPl=max (gRPPl*Pl*RP, 0) ;
PlHl=PlHldemand;
PlIS=PlISdemand;
PlHH=PlHHdemand*numHH;
if P1+RPP1-P1RP-P1H2-P1H1-P1HH-P1IS<0 %if statement to deal with going
% negative
    if P1+RPP1-P1RP<0
        P1RP=P1+RPP1;
        P1H2=0;P1H1=0;P1HH=0;P1IS=0;
    else
        totPldemand=PlH2+PlHl+PlHH+PHS;
        Plavail=Pl+RPPl-PlRP;
        PlH2=Plavail*PlH2/totPldemand;
        PlHl=Plavail*PlHl/totPldemand;
        PlHH=Plavail*PlHH/totPldemand;
        PlIS=Plavail- ( P1H2+P1H1+P1HH) ;
    end
else
    if Plmassdef icit<0 %if there is an accumulated deficit between
% demand for PI try to
                   %make this up if there is extra stock
    Plsurplus=min(Pl+RPPl-PlRP-PlH2-PlHl-PlHH-PlIS,-Plmassdeficit) ;
%only what you need to make up deficit
    PlHl=PlHl+Plsurplus*PlHlmassdeficit/Plmassdeficit;
    PlIS=PlIS+Plsurplus*PlISmassdeficit/Plmassdeficit;
    PlHH=PlHH+Plsurplus*PlHHmassdeficit/Plmassdeficit;
    end
end
  P2
                                   79

-------
P2H2=gP2H2*P2*H2;P2H3=gP2H3*P2*H3;P2RP=max(mP2*P2,0);RPP2=max(gRPP2*RP*
P2,0) ;
IRPP2=max(rIRPP2*P2*IRP,0);
P3RP=max(mP3*P3,0);P3H3=gP3H3*P3*H3;RPP3=max(gRPP3*RP*P3,0);
IRPP3=max(rIRPP3*P3*IRP, 0) ;
if IRP<=0
    IRPP2=0;
    IRPP3=0;
elseif IRP-IRPP2-IRPP3-max(IRP*mIRPRP,0)+RPIRP<0
    if P2~=0
        IRPP2=rIRPP2*(IRP-max(IRP*mIRPRP,0)+RPIRP)/(rIRPP2+rIRPP3);
    end
    if P3~=0
        IRPP3=rIRPP3*(IRP-max(IRP*mIRPRP,0)+RPIRP)/(rIRPP2+rIRPP3);
    end
end
if P2+IRPP2+RPP2-P2RP-P2H2-P2H3-P2HKbelownoreproduction
    if P2+IRPP2+RPP2-P2RP
-------
        HlCl=Hlavail*HlCl/totHldemand;
        HlHH=Hlavail-HlCl;
    end
else
    if Hlmassdeficit<0
        HlHH=HlHH+min(H1+P1H1+P2H1-H1RP-H1C1-H1HH, -Hlmassdeficit) ;
%only what you need to make up deficit
    end
end
% H2
%
H2Cl=gH2Cl*Cl*H2;H2C2=gH2C2*H2*C2;H2RP=max (mH2*H2, 0)
if H2+PlH2+P2H2-H2RP-H2Cl-H2C2
-------
%
% HH

HHRP=ceil(mHH*numHH)*percapmass;
% RP
%
IRPRP=max (IRP*mIRPRP, 0) ;
RPIS=min(lambda*PlIS/theta,RPISdemand) ;
stockRP=RP+PlRP+P2RP+P3RP+HlRP+H2RP+H3RP+C!RP+C2RP+HHRP+IRPRP;
if stockRP<0
    stockRP=0;
end
if stockRP- (RPP1+RPP2+RPP3)-RPIRP-RPIS<=0&RPIRP==0 %this line changed
% 26 Aug 2004
    RPdemand=RPPl+RPP2+RPP3+RPISdemand;
            RPPl=RPPl*stockRP/RPdemand;
            RPP2=RPP2*stockRP/RPdemand;
            RPP3=RPP3*stockRP/RPdemand;
            if RPIS~=0
                RPIS=stockRP- (RPP1+RPP2+RPP3) ;
            else
                RPIS=0;
            end
end
PlIS=min (theta*RPIS/lambda, PUS) ;
% make checks again, to balance flows
% PI
%
if P1+RPP1-P1RP-P1H2-P1H1-P1HH-P1IS<0 %if statement to deal with going
% negative
    if P1+RPP1-P1RP<0
        P1RP=P1+RPP1;
        P1H2=0;P1H1=0;P1HH=0;P1IS=0;
    else
        totPldemand=PlH2+PlHl+PlHH+PHS;
        Plavail=Pl+RPPl-PlRP;
        PlH2=Plavail*PlH2/totPldemand;
        PlHl=Plavail*PlHl/totPldemand;
        PlHH=Plavail*PlHH/totPldemand;
        PlIS=Plavail- ( P1H2+P1H1+P1HH) ;
    end
else
    if Plmassdef icit<0 %if there is an accumulated deficit between
% demand for PI try to
                   %make this up if there is extra stock
    Plsurplus=min ( P1+RPP1-P1RP-P1H2-P1H1-P1HH-P1IS, -Plmassdef icit) ;
%only what you need to make up deficit
                                   82

-------
    PlHl=PlHl+Plsurplus*PlHlmassdeficit/Plmassdeficit;
    PlIS=PlIS+Plsurplus*PlISmassdeficit/Plmassdeficit;
    PlHH=PlHH+Plsurplus*PlHHmassdeficit/Plmassdeficit;
    end
end
% P2
%
if IRP<=0
    IRPP2=0;
    IRPP3=0;
elseif IRP-IRPP2-IRPP3-max(IRP*mIRPRP,0)+RPIRP<0
    if P2~=0
        IRPP2=rIRPP2* (IRP-max (IRP*mIRPRP, 0) +RPIRP) / ( rIRPP2+rIRPP3 ) ;
    end
    if P3~=0
        IRPP3=rIRPP3* (IRP-max ( IRP*mIRPRP, 0 ) +RPIRP) / ( rIRPP2+rIRPP3 ) ;
    end
end
if P2+IRPP2+RPP2-P2RP-P2H2-P2H3-P2HKbelownoreproduction
    if P2+IRPP2+RPP2-P2RP
-------
        Hlavail=Hl+PlHl+P2Hl-HlRP;
        HlCl=Hlavail*HlCl/totHldemand;
        HlHH=Hlavail-HlCl;
    end
else
    if Hlmassdef icit<0
        HlHH=HlHH+min (H1+P1H1+P2H1-H1RP-H1C1-H1HH, -Hlmassdef icit) ;
%only what you need to make up deficit
    end
end
% H2
%
if H2+PlH2+P2H2-H2RP-H2Cl-H2C2
-------
ISHHflow=max(0,(theta+lambda)*ISHHdemand*numHH);
ISIRP=ISHHflow;
if ISmass+PlIS+RPIS-ISIRP<=0
    ISIRP=ISmass+PlIS+RPIS;
else
    if ISmassdeficit<0&numHH>=2 %if there is an accumulated deficit
% between demand for IS by the HH and IS
        %supplied,  try to make this up if there is extra stock
        ISIRP=ISIRP+min(ISmass+PlIS+RPIS-ISIRP,-ISmassdeficit);%only
% what you need to make up deficit
    end
end

if (P1HH+H1HH+ISIRP)==0
    weightedprice=0;
    percapbirths=0;
elseif (pPl*PlHH+pHl*H!HH+pIS*ISIRP)==0
    weightedprice=0;
    percapbirths=0;
else

%weightedprice=(pPl*PlHHdemand+pHl*HlHHdemand+pIS*ISHHflow)/(PlHHdemand
% +HlHHdemand+ISHHflow) ;
    weightedprice=(pPl*PlHH+pHl*H!HH+pIS*ISIRP)/(P1HH+H1HH+ISIRP) ;
    %percapbirths=max(etaa-
% etab*W/weightedprice+etac*(W/weightedprice)A2,0);
    percapbirths=max(etaa-etab*sqrt(W/weightedprice) , 0) ;
%     if etab<=2*etac*(W/weightedprice)|etaa<=etac*(W/weightedprice)A2
%         error('pricesettingmodel:growtherror','Percapbirths function
% parameters give bad function form')
%     end
end
%%%%% changed 26 AUgust 2004
%
nextPl = P1+RPP1-P1RP-P1H2-P1H1-P1HH-P1IS;

if Pl==0
    PlHldemand=0;PlISdemand=0;PlHHdemand=0;
end
nextPlHlmassdeficit=PlHlmassdeficit+PlHl-PlHldemand;

nextPHSmassdeficit=PlISmassdeficit+PlIS-PlISdemand;

nextPlHHmassdeficit=PlHHmassdeficit+PlHH-PlHHdemand*numHH;
                                   85

-------
nextP2 = P2+IRPP2+RPP2-P2RP-P2H2-P2H3-P2H1;

nextPS = P3+IRPP3+RPP3-P3RP-P3H3;

nextHl = H1+P1H1+P2H1-H1RP-H1C1-H1HH;

if Hl==0
    HlHHdemand=0;
end
nextHlmassdeficit=Hlmassdeficit+HlHH-HlHHdemand*numHH;

nextH2 = H2+P1H2+P2H2-H2RP-H2C1-H2C2;

nextHS = H3+P2H3+P3H3-H3RP-H3C2;

nextCl=Cl+H!Cl+H2Cl-ClRP;

nextC2=C2+H2C2+H3C2-C2RP;

nextHH = HH+P1HH+H1HH-HHRP;

nextISmass=ISmass+PHS+RPIS-ISIRP; %keep track of actual mass in IS

nextlSmassdeficit = ISmassdeficit+ISIRP-ISHHflow;
%keep track of deficit in IS, what is supplied minus the demand

nextIRP = IRP-IRPP2-IRPP3+RPIRP+ISIRP-IRPRP; %this line changed 2 Aug
% 2004

nextRP = stockRP-(RPP1+RPP2+RPP3)-RPIRP-RPIS;

nextnumHH=max(numHH+ceil(percapbirths*numHH)-ceil(mHH*numHH)-
ceil(numHH*phi*(percapmass-idealpercapmass)A2),1);

nextpercapmass=nextHH/nextnumHH;

sys =
[nextPI; nextP2;nextPS;nextHl;nextH2;nextHS;nextCl;nextC2;nextHH;nextISm
ass;nextRP;nextIRP;...

nextPlHlmassdeficit;nextPlISmassdeficit;nextPlHHmassdeficit;nextHlmassd
eficit;nextlSmassdeficit; . . .
    nextnumHH;nextpercapmass] ;


% end mdlUpdate
% mdlOutputs
% Return the block outputs.
                                   86

-------
function sys=md!0utputs(t,y,u)

global RPP1 P1H2 PUS P1H1 P1HH RPIS ISIRP P2H1 H1C1 H1HH pPl pHl pIS W
ISHHflow

sys =
[y;RPPl;P!H2; PUS ;P1H1;P1HH; RPIS; ISIRP; P2H1; H1C1; HlHH;pPl ;pHl ;pIS ; W] ;
% end mdlOutputs
% mdlGetTimeOfNextVarHit
% Return the time of the next hit for this block. Note that the result
% is absolute time. Note that this function is only used when you
% specify a variable discrete-time sample time  [-2 0] in the sample
% time array in
% mdllnitializeSizes.
%======================================================================
%
function sys=mdlGetTimeOfNextVarHit(t, y, u)

sampleTime =1;    %  Example, set the next hit to be one second later.
sys = t + sampleTime;

% end mdlGetTimeOfNextVarHit
%=====================================:
% mdlTerminate
% Perform any end of simulation tasks.
%=====================================:
%
function sys=mdlTerminate(t,y,u)


sys = [];


% end mdlTerminate
                                   87

-------
                                  References

Barbier, E. B., and A. Markandya, "The conditions for achieving environmentally
sustainable development." In The Economics of Environment and Development (E. B.
Barbier, ed), Cheltenham, UK: Edward Elgar Publishing, 1998, 22-42.

Boumans, R., Costanza, R., Farley, J., Villa, F. and Wilson, M. "Modeling the dynamics
of the integrated earth system and the value of global ecosystem services using the
GUMBO model" Special Issue: The Dynamics and Value of Ecosystem Services:
Integrating Economic and Ecological Perspectives, Ecological Economics, 41, (2002)
529-560..

Bird, P. J. W. N. The transferability and depletability of externalities. Journal of
Environmental Economics and Management 14:54-57 (1987).

Bond, E. M.  and J. M. Chase. Biodiversity and ecosystem functioning at local and
regional spatial scales. Ecology Letters 5:467-470 (2002).

Brock, W., and A. Xepapadeas. Optimal ecosystem management when species compete
for limiting resources. Journal of Environmental Economics and Management 44(2): 189-
220 (2002).

Brock, W.A., and D. Starrett. Managing systems with non-convex positive feedback.
Environmental and Resource Economics 26:575-602 (2003).

Cabezas, H., C. W. Pawlowski, A. L. Mayer, andN. T. Hoagland. Sustainability:
ecological, social, economic, technological, and systems perspectives. Clean
Technologies and Environmental Policy 5:167-180 (2003).

Cabezas, H., C. W. Pawlowski, A. L. Mayer, andN. T. Hoagland. Sustainable systems
theory: ecological and other aspects. Journal of Cleaner Production 13(5):455-467
(2005).

Cabezas, H., C.W. Pawlowski, H. Wm. Whitmore, and A.L. Mayer. On the Sustainability
of integrated model systems with industrial, ecological, and macroeconomic components.
Resources, Conservation, and Recycling, (2006), in press.

Carpenter, S. R., and W. A. Brock.  Spatial complexity, resilience, and policy diversity:
fishing on lake-rich landscapes. Ecology and Society 9(1):8 (2004).

Carpenter, S., W. Brock, and P. Hanson. Ecological and social dynamics in simple
models of ecosystem management.  Conservation Ecology 3(2) (1999).

Carpenter, S., B. Walker, J. M. Anderies, and N. Abel. From metaphor to measurement:
resilience of what to what? Ecosystems 4:765-781 (2001).

-------
Conrad, Klaus. Computable general equilibrium models in environmental and resource
economics. In The International Yearbook of Environmental and Resource Economics
2002/2003 (T. Tietenberg and H. Folmer, eds.), Edward Elgar, Northampton, MA.  2002,

Costanza, R., J. Cumberland, H. Daly, R. Goodland, and R. Norgaard. An Introduction to
Ecological Economics. Boca Raton, FL: St. Lucie Press, 1997.

Costanza, R., R. D'Arge, R. de Groot, S. Farber, M. Grasso, B. Hannon, K. Limburg, S.
Naeem, R. V. O'Neill, J. Paruelo, R. G. Raskin, P. Sutton, and M. van den Belt. The
value of the world's ecosystem services and natural capital. Nature 387:253-260 (1997).

Costanza, R., A. Voinov, R. Boumans, T. Maxwell, F. Villa, L. Wainger, and H. Voinov.
Integrated ecological economic modeling of the Patuxent River watershed, Maryland.
Ecological Monographs 72(2): 203-231 (2002).

Daily, G. C. Nature's Services: Societal Dependence on Natural Ecosystems. Washington
D.C.: Island Press, 1997.

Dasgupta, P., S. Levin, and J. Lubchenco.  Economic pathways to ecological
sustainability. BioScience 50(4):339-345 (2000).

Diamond, J. Guns, Germs, and Steel:  The Fates of Human Societies.  New York/London:
W.W. Norton and Company, 1999.

Doak, D. F., and L. S. Mills. A useful role for theory in conservation. Ecology 75:615-
626 (1994).

Ehrlich, P. R. The scale of the human enterprise and biodiversity loss. In Extinction
Rates (J. H. Lawton, and R. M. May, eds.). Oxford, UK: Oxford University Press, 1995,
215-226.

Farber, S. C., R. Costanza, and M. A.  Wilson. Economic and ecological concepts for
valuing ecosystem services. Ecological Economics 41:375-392 (2002).

Fath, B. D., H. Cabezas, and C. W.  Pawlowski. Regime changes in ecological systems:
an Information Theory approach. Journal of Theoretical Biology 222(4):517-530 (2003).

Ferenc, J., S. Istvan, V. Gabor. Species positions and extinction dynamics in simple food
webs. Journal of Theoretical Biology  215:441-448 (2002).

Freeman, A. M. Depletable externalities and Pigouvian taxation. Journal of
Environmental Economics and Management 11:173-179 (1984).

Gatto, M. Sustainability: is it a well defined concept? Ecological Applications 5(4):1181-
1183 (1995).
                                       89

-------
Goodland, R., and H. Daly. Environmental sustainability: universal and non-negotiable.
Ecological Applications 6(4): 1002-1017 (1996).

Gunderson, L. H. Ecological resilience - in theory and application. Annual Review of
Ecology andSystematics 31:425-439 (2000).

Haberl, H., M. Wackernagel, F. Krausmann, K. H. Erb, and C. Monfreda. Ecological
footprints and the human appropriation of net primary production: a comparison. Land
Use Policy 21:279-288 (2004).

Hardin, G. The tragedy of the commons. Science 162(1968): 1243-1248 (1968).

Heal, G. Nature and the Marketplace: Capturing the Value of Ecosystem Services.
Washington, D.C.:  Island Press, 2000.

Heller, M. A. The three faces of private property, 79 Oregon Law Review 417 (2000).

Heller, M. A. The tragedy of the anticommons: property in the transition from Marx to
markets,  III Harvard Law Review 621 (1998).

Holling, C. S. Resilience and stability of ecological systems. Annual Review of Ecology
and Systematics 4:1-23(1973).

Holling, C. S. Surprise for science, resilience for ecosystems, and incentives for people.
Ecological Applications 6(3): 73 3-73 5 (1996).

Hooper, D. U., F. S. Chapin, J. J. Ewel, A. Hector, P. Inchausti, S. Lavorel,  H. H.
Lawton, D. M. Lodge, M. Loreau, S. Naeem, B.  Schmid, H. Setala, A.  J. Symstad, J.
Vandermeer, and D. A. Wardle.  Effects of biodiversity on ecosystem functioning: A
consensus of current knowledge. Ecological Monographs 75(l):3-35 (2005).

Imhoff, M. L., L. Bounoua, T. Ricketts, C. Loucks, R. Harriss, and W.  T. Lawrence.
Global patterns in human consumption of net primary productivity. Nature 429:870-873
(2004).

Kearns, C. A. Pollinators, flowering plants, and conservation biology. BioScience 47:297-
307(1997).

Krutilla, J. Conservation reconsidered. American Economic Review 57:777-786  (1967).

Levin,  S. A., J. Dushoff,  and J. E. Keymer. Community assembly and the emergence of
ecosystem pattern. ScientiaMarina 65 (Supp. 2): 171-179 (2001).

Ludwig, D., S. Carpenter, and W. Brock. Optimal phosphorus loading for a potentially
eutrophic lake. Ecological Applications 13(4):1135-1152 (2003).
                                       90

-------
MacArthur, R. H., and E. O. Wilson. The Theory of Island Biogeography. Monographs
in Population Biology.  Princeton, NJ: Princeton University Press, 1967.

Mayer, A. L., and M. Rietkerk. The dynamic regime concept for ecosystem management
and restoration. BioScience 54(11):1013-1020 (2004).

McMichael, A. J., C. D. Butler, and C. Folke. New visions for addressing sustainability.
Science 302:1919-1920 (2003).

Millennium Ecosystem Assessment Synthesis Report. Washington, D.C.  World
Resources Institute, 2005.

O'Neill, R. V., and J. R. Kahn. Homo economus as a keystone species. BioScience
50(4):333-337 (2000).

Pauly, D., V. Christensen, S. Guenette, T. J. Pitcher, U. R. Sumaila, C. J. Walters, R.
Watson, and D. Zeller. Towards sustainability in world fisheries. Nature 418:689-695
(2002).

Pimm, S. L., and R. A. Askins. "Forest losses predict bird extinctions in eastern North
America." In Proceedings of the National Academy of Sciences., USA 92:9343-9347,
1995.

Portela, R., and I. Rademacher. A dynamic model of patterns of deforestation and their
effect on the ability of the Brazilian Amazonia to provide ecosystem services. Ecological
Modelling 143:115-146 (2001).

Postel, S., and S. Carpenter. "Freshwater ecosystem services." In Nature 's Services:
Societal Dependence on Natural Ecosystems. Washington D.C.: Island Press, 1997, 195-
214.

Reed, W. J. Optimal harvesting models in forest management - a survey. Natural
Resource Modeling 1:55-80 (1986).

Rees, W. E. An ecological economics perspective on sustainability and prospects for
ending poverty. Population and Environment 24(1): 15-45 (2002).

Sakai, A. K., F. W. Allendorf, and J. S. Holt. The population biology of invasive species.
Annual Review of Ecology and Systematics 32:305-332 (2001).

Samuelson, P.  The pure theory of public expenditure. Review  of Economics and Statistics
36:387-389(1954).

Scheffer, M., S. Carpenter, J. A. Foley, C. Folke,  and B. Walker. Catastrophic shifts in
ecosystems. Nature 413(6856):591-596 (2001).
                                       91

-------
Settle, C., T. D. Crocker, and J. F. Shogren. On the joint determination of biological and
ecological systems. Ecological Economics 42:301-311 (2002).

Slade, M. E. Trends in natural resource commodity prices: An analysis of the time
domain. Journal of Environmental Economics and Management 9:122-137 (1982).

Tilman, D. The ecological consequences of changes in biodiversity: A search for general
principles. Ecology 80:1455-1474 (1999).

United Nations Development Programme. URL:
www.unfpa.org/swp/2001/english/ch03.html (1998).

United States Census Bureau. URL: www.census.gov/ipc/www/worldpop.html
(2005).

van den Bergh, J. J. M. "A multisectoral growth model with matedalsflows and
economic-ecological interactions." In Ecological Economics and Sustainable
Development, Northampton, MA: Edward Elgar Publishing, 1996.

Voinov, A., R.  Costanza, L. Wainger, R. Boumans, F. Villa, T. Maxell, and H. Voinov.
Patuxent landscape model: integrated ecological economic modeling of a watershed.
Environmental Modelling and Software 14:473-491 (2002).

Wardle, D. A.,  K. I. Bonner, and G. M. Barker. Stability of ecosystem properties in
response to above-ground functional group richness and composition. Oikos 89:11-23
(2000).

World Commission on Environment and Development. 1987. Our Common Future.
Oxford: Oxford University Press, 1987.

Yandle, B. Grasping for the heavens: 3-D property rights and the global commons. 10
Duke Envirmental Law and Policy Forum 13 (1999).

Yandle, B., and A. P. Morriss. The technologies of property rights: choice among
alternative solutions to tragedies  of the commons.  28 Ecology Law Quarterly 123 (2001).
                                       92

-------