TerraME Types and Functions

Version: 2.0.0-rc5
License: LGPL-3
Release: 09/29/2017
Authors: INPE and TerraLAB/UFOP
URL: www.terrame.org

This document presents a detailed description of each type and function of TerraME, ordered alphabetically by its types. TerraME adopts American English (e.g., neighbor instead of neighbour), with the following syntax convention:
  • Names of types follow the upper CamelCase style, starting with a capital letter, followed by other words starting with capitalized letters (e.g., Agent, Trajectory, CellularSpace).
  • Functions and parameters names use the lower CamelCase style, with names starting with lower case letters, followed by other words starting with capitalized letters (e.g., load, database, forEachCell, createNeighborhood).
There are two signatures for functions in TerraME. The first one is for functions with non-named arguments, with a structure lik "function(v1, v2, ...)", where v1 is the 1st argument, v2 is the 2nd, and so forth. The arguments of a call to a function that has this signature must follow the specified order. It is possible to use fewer arguments than the function signature, with missing arguments taking their default values. Parameters of functions following this format are described as #1, #2, etc. in this document. Every parameter that does not have a default value is mandatory.

The second signature is for functions with named arguments, with a structure like "function{arg1 = v1, arg2 = v2, ...}", where v1 is the value of named argument arg1, v2 is the value of named argument arg2, and so on. These arguments can be used in any order, but the function call needs to use braces. Every type constructor of TerraME and some of its functions have this kind of signature. In this document, such arguments are described with their names.


Agent An autonomous entity that is capable of performing actions as well as interacting with other Agents and the spatial representation of the model.
Automaton A hybrid state machine that needs to be located on a CellularSpace, and is replicated over each Cell of the space.
Cell A spatial location with homogeneous internal content.
CellularSpace A multivalued set of Cells.
Chart Create a line chart showing the variation of one or more attributes (y axis) of an object.
Choice Type to define options to be used by the modeler.
Clock Create a display with the current time and Event queue of a given Timer.
DataFrame A two dimensional table.
Directory An abstract representation of a directory.
Environment A container that encapsulates space, time, behavior, and other Environments.
Event An Event represents a time instant when the simulation engine must execute some computation.
File An abstract representation of a file.
Flow A Flow describes the behavior of an automaton or Agent in a given State.
Group Type that defines an ordered selection over a Society.
InternetSender An Internet connection to send attribute values of an object through a TCP or UDP protocol.
Jump Control a discrete transition between States.
Log A log file to save attributes of an object.
Mandatory Type to define a mandatory argument for a given Model.
Map Create a map with the spatial distribution of a given CellularSpace, Agent, or Society.
Model Type that defines a model.
Neighborhood A Neighborhood is a set of pairs (cell, weight), where cell is a neighbor Cell and weight is a number storing the relation's strength.
Random Type to generate random numbers.
SocialNetwork SocialNetwork represents relations between A gents.
Society Type to create and manipulate a set of Agents.
State A container of Jumps and Flows.
TextScreen A window with a table to show the attributes of an object along the simulation.
Timer A Timer is an event-based scheduler that runs the simulation.
Trajectory Type that defines an ordered selection over a CellularSpace.
UnitTest Type for testing packages.
VisualTable A window with a table to show the current attributes of an object along the simulation.


ErrorHandling Some basic and useful functions to handle errors and error messages.
OS Functions to handle files and directories.
Package Functions to work with packages in TerraME.
Utils Some basic and useful functions for modeling.


barros Implementation of Barros urban dynamics model.
beer Implementation of beer economic chain model.
continuous-rain A simple continuous rain model.
deforestation Amazonia deforestation models.
discrete-rain A simple discrete rain model.
drainage A simple drainage model.
el-farol Implementation of El Farol model.
fire-spread A simple spread model that uses geospatial data.
game-of-life Implementation of Conway's Game of Life.
growing-moving-society A model with 100 moving and growing Agents.
growing-society A model with static Agents that can reproduce to neighbor Cells.
ipd Iterated Prisoner's dilemma model.
leontief Implementation of a model to study scenarios for the economy of Southeast Para state.
predator-prey Implementation of a spatial predator-prey model.
runoff Implementation of a simple runoff model using geospatial data.
schelling Implementation of Schelling's segregation model.
single-agent A simple example with one Agent that moves randomly in space.
single-agents-society Simulation of a Society with 30 moving Agents.
sir-abm SIR model implemented with agents.
sir-basic A simple Susceptible-Infected-Recovered (SIR) model.
sir-campaign A Susceptible-Infected-Recovered (SIR) model with a public campaign.
sir-improved A Susceptible-Infected-Recovered (SIR) model.
spatial-game Implementation of the model proposed by Nowak and Sigmund.
tube-discrete A model that describes water flowing out of a tube.
tube-inflow-outflow A model that describes water flowing in and out of a tube.
tube A simple model that describes water flowing out of a tube.


agents.csv A simple set of four Agents.
amazonia.dbf Cellular data representing the Amazonia region, in Brazil.
brazilstates.dbf A shapefile describing the 27 Brazilian states.
cabecadeboi-neigh.gpm Neighborhood files to be used with cabecadeboi database.
cabecadeboi.dbf Topography data from Cabeca de Boi mountain, Minas Gerais, Brazil, with 100x100m of resolution.
cabecadeboi800.dbf Topography data from Cabeca de Boi mountain, Minas Gerais, Brazil, with 800x800m of resolution.
emas.dbf Cellular data representing Emas National Park, Brazil.
gpmlinesDbEmas.gpm Neighborhood files to be used with emas database.
river.dbf A line describing a river within Emas National Park, in Goias, Brazil.
simple.pgm A simple CellularSpace with one attribute for sugarscape model.


Grissom Free Intellecta Design makes research and development of fonts with historical and artistical relevant forms.
JLS Smiles Sampler Font by Michael Adkins & James Stirling.
Pet Animals Pet animals by Zdravko Andreev, aka Z-Designs.
Ubuntu The Ubuntu Font Family are a set of matching new libre/open fonts.

This webpage was automatically created using TerraME.