Terraflux Terraflux
Download

Land change simulation

46 operators. Inputs marked required must be connected or given; the others have defaults.

agents.map#

An attribute of the agents painted on their parcels: each cell takes the value of the agent whose id is the cell's parcel (missing where none).

InputTypeWhat it is
agentsrequiredagentsagents with an id
parcelsrequiredmapthe parcel id of each cell
OutputTypeWhat it is
mapmapthe attribute of each cell's agent
SettingTypeWhat it is
columnrequiredtextthe attribute

agents.parcels#

An agent per parcel of a map of parcel ids (its cells sharing an id): the columns id and cells (its size), and for every other map input (any name) the mean of the map over the parcel (name). Parcels in increasing order of id.

InputTypeWhat it is
parcelsrequiredmapthe parcel id of each cell (missing: no parcel)
OutputTypeWhat it is
agentsagentsan agent per parcel

Takes any other inputs by name (map).

agents.summary#

The number of agents and the sum and mean of each attribute (a row), to collect along a loop.

InputTypeWhat it is
agentsrequiredagentsthe agents
OutputTypeWhat it is
tabletablen, then _sum and _mean

agents.table#

Agents from a table written in the model (macro agents: countries, markets): agents is a list of objects of numbers, one per agent, or the input table.

InputTypeWhat it is
tabletablea table, a row per agent
OutputTypeWhat it is
agentsagentsthe agents
SettingTypeWhat it is
agentsany[{"id": 1, "population": 1e6, ...}, ...]

agents.update#

The agents' behaviour at a step: rules, lines attribute = expression applied in order (each line sees the lines before), over the agents' attributes and the node's number inputs (any name: the step, a price...): map algebra's expressions, if then else, functions; an attribute may be new.

InputTypeWhat it is
agentsrequiredagentsthe agents
OutputTypeWhat it is
agentsagentsthe agents after the rules
SettingTypeWhat it is
rulesrequiredtexte.g. wealth = wealth + income - costs; farmer = wealth > 100

Takes any other inputs by name (any).

cars.step#

One step of PLUS's CARS: iterations from the current map until every class has the cells of the step's demand, each free cell giving each class the probability of growth x neighbourhood x an adaptive coefficient (random seeds where no neighbour has the class), a roulette wheel picking the class and a decaying threshold deciding the change.

InputTypeWhat it is
landscaperequiredmapthe map at the start of the step
probabilityrequiredstackthe growth probability of each class (0-1)
demanddemandthe cells of each class at each step (plus.demand)
regionalregionalor per region (plus.demand of a regional demand)
steprequiredintegerthe step (1, 2...)
seedrequiredintegerthe seed of the simulation
restrictionsmapcells that keep their class (non-zero)
OutputTypeWhat it is
landscapemapthe map at the end of the step
infotableiterations, convergence, gap and cells of each class
SettingTypeWhat it is
weightsanyneighbourhood weight of each class, 0-1 (1)
seedsanypatch generation threshold of each class, 0-1 (0.1)
decaynumberdecay factor of the threshold, (0, 1] (0.9)
step_sizenumbergap reduction below which the threshold decays (500)
windowintegerside of the neighbourhood, odd (3)
max_iterintegeriterations per step (5000)
allowedany0/1 conversion matrix in the demand's class order

clumondo.ages#

The years each cell has had its land system at the start: the given map (missing cells counted 1), or rand() % max_age + 1 per cell from the runtime generator seeded with the seed (CLUMondo's random ages), else 1.

InputTypeWhat it is
landscaperequiredmapthe map at the start
historymapthe years each cell has had its system
seedintegerthe seed of the random ages
OutputTypeWhat it is
agemapthe ages to carry along the years
SettingTypeWhat it is
max_ageintegerrandom ages from 1 to max_age

clumondo.step#

One year of CLUMondo: the suitability of each land system (logistic regressions in floats, or given maps) with its neighbourhood functions and location preferences, then the allocation that meets the demand for goods and services (conversion resistances, the conversion matrix with its codes, ages). stop is true when the year has no solution (CLUMondo stops there: use it as the loop's until).

InputTypeWhat it is
landscaperequiredmapthe map of land systems at the start of the year
agerequiredmapthe years each cell has had its system (clumondo.ages)
elasticityrequiredanythe demand's iteration variables (zeros at the start)
steprequiredintegerthe year (1, 2...)
modelglmlogistic regressions of the systems
driversstacktheir drivers
suitabilitystackor the suitability of each system
restrictionsmapcells that keep their system (non-zero)
allowstackthe conversion maps (codes 2, 3... of the matrix)
preferencesstackthe location preferences' maps
OutputTypeWhat it is
landscapemapthe map at the end of the year
agemapthe ages
elasticityanythe iteration variables for the next year
stopboolwhether the year had no solution
infotableiterations, deviations, supply and cells of each system
SettingTypeWhat it is
settingsrequiredany{ systems, services, supply, demand, order, weights, resistance, allowed, deviation, mean_deviation, max_deviation, speed, max_loops, ... } as landschaft's Model.save writes them

crafty.allocate#

One step of CRAFTY's competition for land between agent functional types (AFTs): production of services from the cells' capitals, the value of unmet demand, giving up and taking over. The land map holds the AFT of each cell (1, 2... in the order of afts; 0 unmanaged).

InputTypeWhat it is
landrequiredmapthe AFT of each cell (0: unmanaged; missing: outside)
capitalsrequiredstackthe capitals of the cells, 0 to 1, by name
demandrequiredtablethe demand of each service (a column each), a row per step
steprequiredintegerthe step (its row of the demand)
seedrequiredintegerthe seed
OutputTypeWhat it is
landmapthe AFT of each cell after the step
covermapthe land cover class of each cell's AFT
infotablea row per service (its column in the demand, from 0): demand, supply before and after the step
SettingTypeWhat it is
aftsrequiredany[{name, class, production: {service: p}, sensitivity: {capital: e}, giving_up, giving_in}, ...]
servicesanythe services and the demand's column of each ({"food": "food_sum"}; default: every column)
searchnumberthe share of cells offered each step (0.1)
giving_up_ratenumberthe chance a manager below its giving-up threshold leaves at a step (0.1)

demand.from_maps#

The cells of each class at each step, interpolated and extrapolated linearly from observed maps (lulcc's approxExtrapDemand): negative areas set to 0, every step rounded to whole cells that add up to the cells of the first map.

InputTypeWhat it is
mapsrequiredstackthe observed maps, one band per date
OutputTypeWhat it is
demanddemandthe demand
stepsintegerits steps (the dates after the first)
SettingTypeWhat it is
timesanythe date of each map (default: the band names)
out_timesanythe dates of the demand (default: every whole date)

demand.regional#

A demand per region (municipalities, biomes, basins...): each region's cells meet its own demand, cells of no region keep their class. The demand of a region is a table of cells per class and step (CLUE-S, ordered allocation, CARS) or a Markov chain (Expander and Patcher, CARS).

InputTypeWhat it is
regionsrequiredmapthe region id of each cell
OutputTypeWhat it is
regionalregionalthe demand of each region
stepsintegertheir steps
SettingTypeWhat it is
idsrequiredanythe region ids
demandsrequiredanyper id: { table = { classes, rows, times } } or { markov = { classes, single, multi, steps } }

demand.table#

A demand given as a table: classes and one row of cells per step (the first the start).

OutputTypeWhat it is
demanddemandthe demand
stepsintegerits steps
SettingTypeWhat it is
tablerequiredany{ classes = [...], rows = [[...], ...], times = [...] }

dinamica.continuous_patcher#

Dinamica EGO's Patcher of a continuous state (PatcherContinuousState), landschaft's ContinuousPatcher: new patches (logging, clearing, harvest) that take the stock of their cells (biomass, carbon, timber) until a quota is met. Seeds drawn among the cells with stock and probability ranked from the highest (prune_factor x quota of stock), in proportion to the probability; lognormal patch sizes grown as the Patcher's.

InputTypeWhat it is
stockrequiredmapthe stock of each cell (per hectare, cell or area unit: unit)
probabilityrequiredmapthe probability of each cell (no value or <= 0: never)
quotarequirednumberthe stock to take, in the stock's units times the area unit
stepintegerthe step of a simulation (1, 2...; none: the seed as is)
seedintegerthe seed (1)
OutputTypeWhat it is
stockmapthe stock left (0 where taken)
probabilitymapthe probability, 0 where taken
takenmapthe stock taken from each cell
patchmapthe patch of each cell taken (1, 2...), 0 elsewhere
infotablequota, taken, remaining (negative: exceeded), patches, cells
SettingTypeWhat it is
meannumberthe mean patch size, in unit (1)
variancenumberthe variance of the patch sizes (0)
isometrynumber0 single cells, 1 the probabilities, 2 compact (1)
unittextof the patch sizes and the stock's area: hectares (default, Dinamica's), cells or area
prune_factornumberthe stock ranked, times the quota (10)
windowanythe neighbour window of growth [rows, columns] ([3, 3])

dinamica.cost_map#

The cost of reaching every cell from the nearest source over a friction surface, Dinamica EGO's CalcCostMap (landschaft's friction_cost): a step into a cell costs its friction (x sqrt 2 on a diagonal), 8 neighbours, Dijkstra's sums; and the direction of each cell's predecessor (1 NW, 2 N, 3 NE, 4 E, 5 SE, 6 S, 7 SW, 8 W; 0 at the sources, 255 unreached).

InputTypeWhat it is
sourcesrequiredmapthe sources (a value other than 0)
frictionrequiredmapthe effort to cross each cell (> 0; no value: impassable)
OutputTypeWhat it is
costmapthe cost (no value where unreached)
directionmapthe predecessors' directions
SettingTypeWhat it is
diagonalbooldiagonal steps cost sqrt(2) times more (default true)
relativeboolfrictions per map unit, times the cell size

dinamica.destinations#

Cells drawn by attraction in quadrants of a map, Dinamica EGO's CalcDestinationMap (landschaft's destinations): in each of the horizontal x vertical parts, up to per_quadrant cells in proportion to their attraction, a draw closer than min_distance to an earlier one drawn again.

InputTypeWhat it is
attractionrequiredmaphow attractive each cell is (no value or <= 0: never)
seedintegerthe seed (1)
OutputTypeWhat it is
mapmapthe attraction of the destinations, no value elsewhere
SettingTypeWhat it is
quadrantsany[horizontal, vertical] divisions ([1, 1])
per_quadrantintegerdestinations per quadrant (1)
min_distancenumberbetween destinations, map units (0)
max_attemptsintegerdraws of a destination (15)

dinamica.pathways#

Paths from source cells to a network, Dinamica EGO's CalcPathwayMap (landschaft's pathways): from each source (row order) to the cheapest of its 8 neighbours until a cell of cost <= 0 (the network), or along the directions of a cost map until the network.

InputTypeWhat it is
networkrequiredmapthe network (a value other than 0)
sourcesrequiredmapwhere paths start (a value other than 0), e.g. destinations
costmapthe cost of reaching the network (<= 0 on it)
directionsmapor the directions of a cost map
seedintegerfor the lottery (1)
OutputTypeWhat it is
mapmapthe network with the new paths (no value elsewhere)
SettingTypeWhat it is
lotteryboolties between cheapest neighbours drawn at random
mergeboolthe network with the new paths (default true), or only them
valuenumberof the new path cells (1)

dinamica.roads#

A step of endogenous road building, Dinamica EGO's road constructor (landschaft's RoadBuilder.step): the attraction kept where the distance to the roads is within distance (and the mask allows), destinations drawn in quadrants, each joined to the network down the cost of reaching it over the friction; the network with the new roads, and the distance to them (a dynamic variable).

InputTypeWhat it is
networkrequiredmapthe roads (a value other than 0)
frictionrequiredmapthe effort to build across each cell (> 0; no value: never)
attractionrequiredmaphow attractive each cell is as a road's end
maskmapwhere roads may end (non-zero)
stepintegerthe step of a simulation (1, 2...; none: the seed as is)
seedintegerthe seed (1)
OutputTypeWhat it is
networkmapthe network with the new roads
distancemapthe distance to the roads, map units
SettingTypeWhat it is
quadrantsany[horizontal, vertical] divisions ([2, 10])
distanceany[least, most] distance from the roads of a new end ([1500, 3000])
spacingnumberthe least distance between destinations of a step (1000)
per_quadrantintegerdestinations per quadrant (1)
max_attemptsintegerdraws of a destination (15)
lotteryboolties drawn at random (default true)
diagonalbooldiagonal steps cost sqrt(2) times more (default true)
relativeboolfrictions per map unit

dinamica.step#

One step of Dinamica's Expander and Patcher: the changes of each transition (its rate per step times the cells of its origin class) split between the Expander, which grows existing patches, and the Patcher, which seeds new ones, with lognormal patch sizes shaped by the isometry.

InputTypeWhat it is
landscaperequiredmapthe map at the start of the step
probabilityrequiredstacka layer per transition (e.g. woe.probability)
ratesmarkovthe rates per step
regionalregionalor the rates of each region (Markov chains)
patchesrequiredpatchesthe Expander and Patcher settings
steprequiredintegerthe step (1, 2...)
seedrequiredintegerthe seed of the simulation
OutputTypeWhat it is
landscapemapthe map at the end of the step
infotablecells requested and made by each function, patches
SettingTypeWhat it is
prune_factornumbercells ranked per change for the draws (10)
windowanythe neighbour window [rows, columns] ([3, 3])

dynamic.distance_to#

The distance from each cell to the nearest cell of some classes (exact Euclidean distance between cell centres), in map units or cells: a driver that moves with the simulated map.

InputTypeWhat it is
landscaperequiredmapthe map
coststacka transition of conductances, a layer per direction (the accumulated cost instead of the distance)
OutputTypeWhat it is
distancemapthe distances (NaN where the map has no value)
SettingTypeWhat it is
classesrequiredanya class or a list
unittext"map" (default; square cells) or "cells"
layoutanythe transition's { directions, symmetric, extent, wrap } (with cost)

dynamic.share_of#

The share of the cells around each cell that hold some classes (the mean of the window's weights x presence over the cells with a value): a driver that moves with the simulated map.

InputTypeWhat it is
landscaperequiredmapthe map
OutputTypeWhat it is
sharemapthe shares (NaN where the map has no value)
SettingTypeWhat it is
classesrequiredanya class or a list
windowanythe side of a window of ones (3), or its weights

futures.calibrate#

The calibration of FUTURES' patches (r.futures.calib through landschaft's calibrate_patches): the patches developed between the start and the end give the patch library and the histograms of patch area and compactness (perimeter / (2 sqrt(pi area))); every combination of the compactness means, ranges and discount factors is simulated repeat times from the start (futures.simulation's settings, seeds (seed + k) 10000 + i) and its patches compared with the observed ones by the histograms' chi-square distance. The combinations from the best, as landschaft's.

InputTypeWhat it is
landscaperequiredmapdeveloped cells at the start (1 developed, 0 not)
pressurerequiredmapthe development pressure at the start
driversstackthe potential's predictors, by name
subregionsmapthe subregions (default: one)
potential_subregionsmapthe subregions of the coefficients
weightmap-1 to 1, changing the probability
zoningmapzone ids
restrictionsmapcells never developed (non-zero)
catchmentsmapfloods: the catchments (HUCs)
adaptive_capacitymapfloods: adaptive capacity, -1 to 1
handmapfloods: height above the nearest drainage
floodsstackfloods: the depth or probability maps
damage_regionsmapfloods: the depth-damage region of each cell
adaptationmapfloods: the return period cells are protected against
endrequiredmapdeveloped (1) at the end of the observed period
OutputTypeWhat it is
tabletableper combination, from the best: discount_factor, compactness_mean, compactness_range, area_error, compactness_error (each over its largest) and combined_error (their mean)
libraryanythe observed patch library, as futures.simulation's patch_sizes
SettingTypeWhat it is
potentialrequiredany{ ids, intercept, devpressure, predictors, coefficients }
demandrequiredany{ subregions, rows, years, population }
neighborhoodrequiredintegerthe radius of the pressure's window (cells)
approachrequiredtextthe pressure's decay
gammarequirednumberthe pressure's decay exponent
scaling_factorrequirednumberthe pressure's scaling factor
num_neighborsrequiredinteger4 or 8
seed_searchrequiredtexthow seeds are drawn
incentive_powerrequirednumberinfill (> 1) or sprawl (< 1)
zoning_effectsany{ ids, stringency, zones, effects }
climateanythe flood submodel
compactness_meansanythe compactness means to try (default [0.4])
compactness_rangesanythe ranges to try (default [0.05])
discount_factorsanythe discount factors to try (default [1])
repeatintegersimulations per combination (default 10)
seedintegerthe first combination's seed (default 1)
thresholdnumberthe smallest patch area kept (map units; 0)
per_subregionboola patch library per subregion (default false)

futures.devpressure#

The development pressure of each cell (r.futures.devpressure through landschaft): the sum over the developed cells within a radius (a circular window, the cell itself left out) of 1 (occurrence), scaling / d^gamma (gravity) or scaling exp(-2 d / gamma) (kernel), as GRASS's r.mfilter computes it; the pressure futures.simulation starts from.

InputTypeWhat it is
developedrequiredmap1 developed, 0 not, missing excluded
OutputTypeWhat it is
mapmapthe pressure (floats; missing where excluded)
SettingTypeWhat it is
sizerequiredintegerthe window's radius in cells
methodtextgravity (default), occurrence or kernel
gammanumberthe decay with distance (default 1.5)
scaling_factornumberdefault 1
padboolpad with undeveloped cells (the module's -n, default): the cells near the edges get their pressure

futures.patch_library#

The sizes of the patches developed between two maps (r.futures.calib's patch library through landschaft): the 4-connected groups of cells developed in the end and not at the start (inside a subregion), in cells, sorted; one library per subregion (each patch cut to its part in it), or one for all. The patch_sizes futures.simulation draws from.

InputTypeWhat it is
startrequiredmapdeveloped (1) at the start
endrequiredmapdeveloped (1) at the end
subregionsmapsubregions (0 and missing ignored)
OutputTypeWhat it is
libraryany{ ids, lists }, as futures.simulation's patch_sizes
tabletablesubregion (empty: all), size
SettingTypeWhat it is
per_subregionboola library per subregion (default false)
thresholdnumberthe smallest patch area kept (map units; 0)

futures.simulation#

FUTURES' patch growing (r.futures.simulation): at every step each subregion develops its demand in patches grown from seeds drawn on the development probability (the potential's coefficients, the development pressure updated around every new cell, zoning, incentives), with the flood submodel (damage, retreat, adaptation, migration) when given.

InputTypeWhat it is
landscaperequiredmapdeveloped cells at the start (1 developed, 0 not)
seedrequiredintegerthe seed of the simulation
pressurerequiredmapthe development pressure at the start
driversstackthe potential's predictors, by name
subregionsmapthe subregions (default: one)
potential_subregionsmapthe subregions of the coefficients
weightmap-1 to 1, changing the probability
zoningmapzone ids
restrictionsmapcells never developed (non-zero)
catchmentsmapfloods: the catchments (HUCs)
adaptive_capacitymapfloods: adaptive capacity, -1 to 1
handmapfloods: height above the nearest drainage
floodsstackfloods: the depth or probability maps
damage_regionsmapfloods: the depth-damage region of each cell
adaptationmapfloods: the return period cells are protected against
OutputTypeWhat it is
mapsseriesdeveloped (1) or not (0) after each step
developmentseriesthe step each cell was developed in (-1 never)
infoseriescells developed and carried over, per step and subregion
SettingTypeWhat it is
potentialrequiredany{ ids, intercept, devpressure, predictors, coefficients }
demandrequiredany{ subregions, rows, years, population }
patch_sizesrequiredany{ ids, lists }
neighborhoodrequiredintegerthe radius of the pressure's window (cells)
approachrequiredtextthe pressure's decay
gammarequirednumberthe pressure's decay exponent
scaling_factorrequirednumberthe pressure's scaling factor
discount_factorrequirednumbermultiplies the patch sizes
compactness_meanrequirednumberthe patches' distance exponent
compactness_rangerequirednumberits range
num_neighborsrequiredinteger4 or 8
seed_searchrequiredtexthow seeds are drawn
incentive_powerrequirednumberinfill (> 1) or sprawl (< 1)
zoning_effectsany{ ids, stringency, zones, effects }
climateanythe flood submodel

glm.coefficients#

Logistic regressions given in the model: per class, its drivers and coefficients (the intercept first), as glm.fit gives them.

OutputTypeWhat it is
modelglmthe regressions
SettingTypeWhat it is
fitsrequiredany[{ class, drivers, coefficients, pivot, rank }, ...]

glm.fit#

Logistic regression of the presence of each class on the drivers (lulcc's glmModels, R's glm.fit operation for operation), on the cells with a value in the map and in the class's drivers.

InputTypeWhat it is
landscaperequiredmapthe map the presences come from
driversrequiredstackthe explanatory variables
OutputTypeWhat it is
modelglmthe fitted regressions
SettingTypeWhat it is
formulasany{ class = [driver, ...] } (default: every class on every driver); the intercept is always in
maxitintegerglm.fit's iteration limit (25)
epsilonnumberglm.fit's convergence tolerance (1e-8)

glm.predict#

The probability of each class in every cell from fitted logistic regressions (NaN where a driver, or the landscape when given, is missing).

InputTypeWhat it is
modelrequiredglmthe fitted regressions
driversrequiredstackthe explanatory variables (they may have changed)
landscapemapa map whose missing cells stay missing
OutputTypeWhat it is
suitabilitystacka layer per class

lulcc.history#

The steps each cell has had its class at the start (lulcc's hist): the given map, missing cells counted 1, else 1 everywhere.

InputTypeWhat it is
landscaperequiredmapthe map at the start
historymapthe steps each cell has had its class
OutputTypeWhat it is
historymapthe history to carry along the steps

lulcc.step#

One step of a CLUE-S or ordered allocation (lulcc's allocate): the elasticity of each cell's class (CLUE), the neighbourhood rules, the conversion matrix with its time and demand codes, the automatic conversions of cells whose class is no longer allowed, then the allocation of the step's demand.

InputTypeWhat it is
landscaperequiredmapthe map at the start of the step
historyrequiredmapthe steps each cell has had its class
suitabilityrequiredstacka layer per class (e.g. glm.predict)
demanddemandthe cells of each class at each step
regionalregionalor a demand per region (demand.regional)
steprequiredintegerthe step (1, 2...)
rngrequiredrngR's generator, carried from step to step
restrictionsmapcells that keep their class (non-zero)
OutputTypeWhat it is
landscapemapthe map at the end of the step
historymapthe history updated
infotableiterations, convergence and cells of each class
SettingTypeWhat it is
allocationrequiredany{ method = "clue", jitter, scale, max_iter, max_diff, mean_diff } or { method = "ordered", order = [...], stochastic }
elasticityanyper class (CLUE): one value, a list or { class = value }
allowedanythe conversion matrix, in the demand's class order
neighbourhoodany{ rules = { class = threshold }, weights = window }

markov.fit#

A Markov chain of land change from two maps: the transition probabilities of the period (cells of each class at the start that hold each class at the end) and, over steps time steps, those of one step (the principal root of the period's matrix, as Dinamica EGO's DetermineTransitionMatrix).

InputTypeWhat it is
t0requiredmapthe map at the start of the period
t1requiredmapthe map at its end
stepsrequiredintegertime steps in the period
OutputTypeWhat it is
markovmarkovthe chain

markov.matrix#

A Markov chain given in the model: the transition probabilities of a period over steps steps (rows the class at the start); those per step are its principal root, unless given.

OutputTypeWhat it is
markovmarkovthe chain
SettingTypeWhat it is
classesrequiredanythe class of each row and column
singlerequiredanythe probabilities of the period, a row per class
multianythe probabilities per step (default: the root)
stepsintegersteps in the period (1)

molusce.step#

One iteration of MOLUSCE's Simulator: every cell is predicted the transition of largest total weight (or the class of largest potential) with a confidence (100 x the gap to the second, truncated); then for each pair of classes of the map, the cells predicted to take it with the highest confidence + U(0, 1) / 1000 change, as many as the observed cross table says.

InputTypeWhat it is
landscaperequiredmapthe map at the start of the iteration
totalstackthe total weight of each transition (molusce.total)
potentialstackor a potential per class
rngrequiredrngnumpy's generator (rng.numpy), carried from step to step
steprequiredintegerthe iteration (1, 2...)
OutputTypeWhat it is
landscapemapthe map at the end of the iteration
infotablethe cells each transition changed
SettingTypeWhat it is
classesrequiredanythe classes of the model
countsrequiredanythe cells of each transition: [{ from, to, cells }]

molusce.total#

MOLUSCE's total weight of each transition: per transition, the sum over the drivers of the weight of each cell's category (drivers cut by their bins, or integer categories); NaN where a driver has no value.

InputTypeWhat it is
driversrequiredstackthe drivers, by name
OutputTypeWhat it is
totalstacka layer per transition ("from_to_to", persistence included)
SettingTypeWhat it is
classesrequiredanythe classes of the model
driversrequiredanythe drivers, in order
binsany{ driver = [bounds] }
weightsrequiredany[{ from, to, driver, categories, weights }]

patches.observe#

The Expander and Patcher settings of each transition with a rate, measured on the observed change: the share of the changed cells in expansions of existing patches (8 neighbours), and the mean and variance of the sizes of the expansion and new patches; the isometry is given.

InputTypeWhat it is
t0requiredmapthe map at the start
t1requiredmapthe map at the end
markovrequiredmarkovthe transitions with a rate
OutputTypeWhat it is
patchespatchesthe settings of each transition
SettingTypeWhat it is
expansionnumberthe Expander's share for all (default: observed)
isometrynumberthe isometry of the patches (1.5)

patches.settings#

The Expander and Patcher settings given in the model: per transition the Expander's share and the mean, variance and isometry of the patches of each function.

OutputTypeWhat it is
patchespatchesthe settings
SettingTypeWhat it is
transitionsrequiredany[{ from, to, expansion, expander = [mean, variance, isometry], patcher = [...] }, ...]

plus.demand#

The cells of each class at each step for CARS: a Markov chain projected from the starting map (PLUS's default, rounded to whole cells), or an area demand.

InputTypeWhat it is
startrequiredmapthe map the simulation starts from
markovmarkova Markov chain
demanddemandor an area demand
regionalregionalor a demand per region (Markov chains or areas)
OutputTypeWhat it is
demanddemandcells per class and step
regionalregionalor per region and class, for a regional demand
stepsintegerits steps
SettingTypeWhat it is
stepsintegersteps (default: the chain's or the demand's)

validate.agreement#

How a simulated map matches the observed one, both from the same start: the share of cells of the same class, the figure of merit (hits / (hits + misses + false alarms + wrong hits)) and its terms.

InputTypeWhat it is
startrequiredmapthe map both start from
observedrequiredmapthe observed map
simulatedrequiredmapthe simulated map
OutputTypeWhat it is
tabletableoverall, figure_of_merit, hits, misses, false_alarms, wrong_hits

validate.error_budget#

MOLUSCE's error budget (Pontius 2002, through landschaft): the agreement of the maps when the simulation has no, medium or perfect information of quantity and location, at the maps' resolution and coarser ones, merging scale x scale cells each time (the edges left over dropped).

InputTypeWhat it is
referencerequiredmapthe reference map
simulatedrequiredmapthe simulated map (no classes the reference lacks)
OutputTypeWhat it is
tabletableper resolution: cells, no_no, no_medium, medium_medium, medium_perfect, perfect_perfect
SettingTypeWhat it is
iterationsintegerthe resolutions (default 3)
scaleintegercells merged per side each time (default 2)

validate.futures#

FUTURES' validation (r.futures.validation through landschaft): the quantity and allocation disagreement per class and in total (Pontius & Millones 2011) and kappa; with the original map, kappa simulation (van Vliet et al. 2011) and, for 0/1 maps, misses, hits, false alarms, null successes, the figure of merit, producer's and user's accuracy (Pontius et al. 2008).

InputTypeWhat it is
referencerequiredmapthe observed map (integer classes)
simulatedrequiredmapthe simulated map
originalmapthe map at the start
OutputTypeWhat it is
metricstablethe scalar metrics (empty where they cannot be computed)
classestableper class: quantity and allocation disagreement

validate.futures_grid#

FUTURES' validation per tile or per region (r.futures.gridvalidation through landschaft): a row per tile of size x size cells from the top-left (its row, column and centre) or per region, the metrics of validate.futures and the cells compared.

InputTypeWhat it is
referencerequiredmapthe observed map (integer classes)
simulatedrequiredmapthe simulated map
originalmapthe map at the start
regionsmapregion ids, in place of tiles
OutputTypeWhat it is
tabletableper tile or region: where, cells, the metrics
SettingTypeWhat it is
sizeintegerthe tiles' side in cells

validate.kappa#

MOLUSCE's comparison of two maps of classes (DependenceCoef through landschaft): kappa, kappa location and kappa histogram and the % of cells of the same class over the classes of both maps; Cramer's V and the joint information uncertainty; the correlation of the class values.

InputTypeWhat it is
referencerequiredmapthe reference map
simulatedrequiredmapthe simulated map
OutputTypeWhat it is
tabletablekappa, kappa_location, kappa_histogram, correctness, cramer, jiu, correlation

validate.similarity#

Dinamica EGO's validation: the fuzzy similarity of the simulated and the observed change (the cells that changed from the start, in their new class) in windows of growing size; the minimum of the two directions is Dinamica's result.

InputTypeWhat it is
startrequiredmapthe map both start from
observedrequiredmapthe observed map
simulatedrequiredmapthe simulated map
OutputTypeWhat it is
tabletablea row per window
SettingTypeWhat it is
windowsanythe window sides, odd ([1, 3, 5, 7, 9, 11])
decaytext"exponential" (default) or "constant"

validate.three_map#

The three-map comparison of a simulation (Pontius, Peethambaram & Castella 2011; lulcc's ThreeMapComparison through landschaft): the reference at the start and at the end and the simulated end compared at blocks of several sizes, the budget of agreement and disagreement (misses, hits, wrong hits, false alarms, correct rejections; overall, per class, per transition) and the figure of merit. The cells without a value in any map are left out of all three.

InputTypeWhat it is
t0requiredmapthe reference map at the start
t1requiredmapthe reference map at the end
simulatedrequiredmapthe simulated map of the end
OutputTypeWhat it is
tabletableper factor lulcc's table: t0 class within t1 class (empty: total), the simulated classes, total
budgettablelevel (0 overall, 1 class, 2 transition), from, to, factor, misses, hits, wrong_hits, false_alarms, correct_rejections
figure_of_merittableper factor: overall, then per class
transitionstableper factor and class from: the figure of merit to each
SettingTypeWhat it is
factorsanythe blocks' sides in cells (default [1])
categoriesanythe classes (default those of the maps)

woe.fit#

Weights of evidence of each transition, calibrated on two maps as Dinamica EGO does: the ranges of a continuous variable from nested buffers of increment cut by line generalisation (a new range when the direction deviates by more than tolerance degrees or the range passes max_delta cells, none below min_delta), a range per category of a categorical one; W+ per range.

InputTypeWhat it is
t0requiredmapthe map at the start
t1requiredmapthe map at the end
driversrequiredstackthe explanatory variables
markovmarkovits transitions with a rate are calibrated
OutputTypeWhat it is
modelwoethe weights
tabletableDinamica's weights report
SettingTypeWhat it is
incrementanybuffer increment, or "auto" (a hundredth of the range)
min_deltanumbersmallest range, cells (1)
max_deltanumberlargest range, cells (100000)
tolerancenumbertolerance angle, degrees (5)
rangesanyper variable: "categorical", an increment, limits or options; per transition ("1->2") its own
weightsanyW+ set by hand: {"1->2": {variable: [a weight per range, or null]}} (the viewer's WoE editor)
categoricalanynames of categorical variables
fix_abnormalboolfinite weights for ranges without transitions
possibletext"any" (default) or "stay"
transitionsany[[from, to], ...] (default: the Markov chain's)

woe.probability#

The probability of each calibrated transition at every cell of its initial class, from the weights of evidence (Dinamica EGO's CalcWOfEProbabilityMap).

InputTypeWhat it is
modelrequiredwoethe weights
landscaperequiredmapthe map the probabilities are for
driversrequiredstackthe explanatory variables (they may have changed)
OutputTypeWhat it is
probabilitystacka layer per transition

woe.weights#

Weights of evidence given in the model (as woe.fit gives them): transitions, ranges and weights.

OutputTypeWhat it is
modelwoethe weights
SettingTypeWhat it is
weightsrequiredanythe fitted weights (woe.fit's model)