NetLogo banner

 Contact Us

 Modeling Commons

 User Manuals:


NetLogo User Community Models

(back to the NetLogo User Community Models)


by Mathew Davies (Submitted: 06/02/2005)

[screen shot]

Download feedback
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

(You can also run this model in your browser, but we don't recommend it; details here.)


This is a simple molecular model of feedback in homeostasis of an organism. In this model, the background field represents a cell or tissue in which various energy-producing bodies, or 'energy bodies' are embedded. The cell/tissue is contantly losing heat to some cold external environment. When the tissue becomes too cold, hormones are produced which stimulate the production of heat in the energy bodies. The energy bodies can been seen as particular kinds of cells in muscle tissue, or as mitochondria in a single cell. Loss of heat from the cell or tissue is balanced by production of heat by the energy bodies, according to the following feedback process:

cold --> production of hormones --> stimulation of energy bodies --> heat production --> cessation of hormone production

The modeled feedback process is considerably simpler than that found in real homeostasis, which often involves more than one hormone in the feedback regulation, as in the case of thyroxine-thyrotropin feedback for temperature regulation in humans. Nevertheless, the model accurately depicts the cyclic nature of homeostatic regulation.


Patches represent elements of the background field (a cell, or tissue). There are two kinds of agents, 'energy bodies' which do not move and are represented by green circles; and 'hormone' molecules which drift through the field and are represented by white carbon rings. Hormones have two properties, a longevity (the number of ticks they are active following creation) and an activation level, which is the amount of heat they stimulate the energy body to produce. It is assumed that only the proximity of the hormone is required to stimulate an energy body; otherwise, there is no limit on the production of energy.

Note that the color of each patch is scaled according to temperature. Temperatures at the 'ideal' temperature of 35 (a value set in the code) are a neutral black; temperatures above the ideal are scaled to be increasingly red, while temperatures below the ideal are scaled by to increasingly blue.

The field starts out with each patch having a uniform value of temperature, given by Initial_Temperature. The field is constantly losing heat (for simplicity, taken to be the same as temperature; for you physicists, the field can be taken to have a specific heat of 1, which is not terribly far from the truth for most aqueous tissues), at a rate of .1 degree per tick of time. As the average temperature falls below the ideal temperature, hormones are produced in a number proportional to the difference between the ideal temperature and the average temperature. This can be seen: as the field begins to grow blue, more and more hormone molecules are produced.

When a hormone molecule passes within one patch of an energy body, the energy body produces a quantity of heat in that patch given by the Hormone_Activity slider. This heat is quickly diffused to surrounding patches. Activation of an energy body has the appearance of a 'bloom' around the green body, while the body itself flashes white when activated. A body is often activated several times by a passing hormone molecule.

As more heat is diffused from the energy bodies, average temperature rises and the production of hormone slows down (and may stop).


The main use of the model is to explore how the parameters of the model influence the temperature cycle. For instance, how should parameters be set in order to minimize temperature fluctuation? The following sliders can be adjusted:

- Initial_Temperature: Sets the initial temperature of patches.
- Energy_Bodies: Sets the number of energy bodies created by 'setup'. The more energy bodies, the more heat a given amount of hormone will create. (We have assumed that hormone lifespan is independent of activation frequency).
- Hormone_Activity: The number of units by which temperature of a patch is increased, when a hormone molecule gets within radius 1 of an energy body. Note that a molecule may activate the same patch more than once.
- Hormone_Longevity: The number of ticks a hormone molecule persists after creation.

The two graphs show the number of hormone molecules as a function of time, and the average temperature as a function of time.


Although it might seem that longer-lasting hormones would be most beneficial, it turns out that these induce the greatest temperature swings. Short-lived hormones are the most responsive to temperature fluctuations. Similarly, super-active hormones create bursts of heat that tend to increase rather than decrease the range of fluctuation. However, too few energy bodies, or too little hormone activity, tends to result in constant hormone production without ever reaching ideal heat. (In fact, too few energy bodies can result in the tissue 'freezing', while too many result in a state of frequent overheating.)


Define a given temperature range as 'normal'. What combinations of parameters keep the tissue or cell within this normal range? What determines the period (frequency) of temperature oscillation? Are there any parameter ranges that are always unhealthy, i.e. never stay within the normal range? What ranges are best for tissue with few energy bodies? With many?

Look up thyrotropin feedback on the internet. How well does the NetLogo model capture real thyrotropin feedback in homeostasis of humans? What elements have been left out? What aspects of the NetLogo model may be problematic or incorrect from the perspective of a biologist?


A number of simplifying assumptions were made which could be revised or changed:
- normal temperature is 35 degrees
- temperature is decreasing uniformly in each patch by .1 degree per tick
- the hormone's 'radius of activation' is just 2 units (from the center of an energy body)

These values are given as constants (globals) and can be changed in code, or associated with new sliders.

Also, the longevity of hormone is an absolute amount of time, but could be easily changed to mean the number of activations.

A more realistic model involving two hormones -- one for activation and one for deactivation -- could be created by adding another hormone 'breed' and modifying the 'metabolize' procedure.

Hormone production could be localized in another kind of body (such as a ribosome), rather than spontaneously appearing.


This model makes use of NetLogo's agentset capabilities. "values-from patches..." is used to calculate the average temperature of patches, while "any? hormone-on patches in-radius..." is used to determine whether any hormone molecules are present within a given radius of an energy body.


This model was written by Mathew Davies through the NSF-sponsored GK-12 program at the School of Engineering and Applied Sciences at Columbia University, for use in 8th-grade science classrooms at I.S. 143 (Eleanor Roosevelt intermediate school, Washington Heights) in Manhattan, New York in the fall of 2004. The author may be contacted at the email address:

This simulation, along with other technology-based classroom resources, may be found at the website

(back to the NetLogo User Community Models)