Skip to main content

Primitives

Currently, the Urban Model Builder offers 11 functional building blocks for creating your System Dynamics or agent-based model.
The following sections and tables explain each primitive’s specific functions and how to use them.


Stock

A Stock represents an accumulating quantity or value that increases or decreases over time—think of water in a tank.
In a dynamic system, a stock is a state-determining variable that stores the current value of a specific aspect of the system.
It changes through Inflows and Outflows connected to it.

Input FieldType of InputPurpose
NameTextUnique identifier for the primitive in the model
DescriptionTextExplains assumptions and important notes
Value*Numeric, [Value of a primitive], FunctionsThe initial value defines the system’s starting state. It can be constant or dynamic, calculated from functions or other variables. Ready-made functions are available for selection. Often aligned with historical data. Examples: 500, if time < 2020 then 0 else 1000, Stock = Area * PopulationDensity
Interface & Scenario
Output ParameterBooleanWhen selected, shows how the system state changes over time, revealing the effects of decisions, changes, or external factors
Validation
UnitText (search), DropdownEnsures unit consistency in calculations
Min ConstraintBooleanSet a lower limit
Min ValueNumbere.g., 0 to prevent negative values where they don’t make sense (e.g., negative population)
Max ConstraintBooleanSet an upper limit
Max ValueNumbere.g., maximum population in a region

*Required for calculation


Flow

A Flow describes the rate at which a stock increases or decreases, directly affecting its change over time.
It’s a temporary, time-dependent rate—active only when changing the stock—and doesn’t store values itself.
Flows can depend on other variables and be static/absolute or variable/relative, as in inflows and outflows.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions and important notes
Rate*Numeric, [Value of a primitive], FunctionsDetermines the rate of increase or decrease. Can be constant (e.g., 1000 liters) or dynamic (e.g., Inflow = Rainfall * Area * InfiltrationFactor)
Interface & Scenario
Output ParameterBooleanDisplays time-series changes for the system
Validation
UnitText (search), DropdownEnsures units are compatible
Min ConstraintBooleanSet a lower limit
Min ValueNumberLower limit option
Max ConstraintBooleanSet an upper limit
Max ValueNumberUpper limit option

*Required for calculation


OGC API Features

The OGC API Features is a modern Open Geospatial Consortium (OGC) standard for delivering and querying geospatial data via web APIs.
It enables easy integration into web applications and improves interoperability between systems.
For example, the Urban Data Platform Hamburg provides a wide range of geospatial datasets via OGC API Features, making it an important data source for the Urban Model Builder.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions and notes
APIs*Text (search), DropdownSelect the API (data source) relevant for your model
Collection*Text (search), DropdownFilters datasets by collection
Limits*NumberSets the max number of results per request (=100 → 100 results)
OffsetNumberStarting point for results (=200 → skip first 200 entries)
Selected PropertiesText (search), DropdownFilters the dataset by specific attributes
Field Query
Query FieldText (search), DropdownData field (“Key”) for the filter
OperatorDropdownComparison operator
Query ValueText/NumberValue to compare against
Example API data:
[{"Region":"North","Temp":21.5},{"Region":"South","Temp":25.0},{"Region":"North","Temp":19.5}]
Query: Region = North → returns only North entries
Advanced Query
Filter (CQL2)Structured format: <attribute> <operator> <value> (e.g., Temp > 20°C) using CQL2 syntax for server-side filtering
Data Transformation
KeyText (search), DropdownKey in the JSON data
Value FieldText (search), DropdownCorresponding value
PreviewDisplayShows structure of the queried data

*Required for calculation

Note

Pay attention to how the records are structured, what data they include or exclude, and what inputs are required for each key-value pair! Follow the link to further information about the API in the primitive settings window to learn important details!


Variable

A Variable is a changeable factor that doesn’t store values over time like a stock.
It’s a calculated value that influences flows or other variables, helping simplify model structure and enabling modular design.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions
Value*Numeric, [Value of a primitive], FunctionsCan be constant or dynamic, based on other variables or predefined functions
Interface & Scenario
Output ParameterBooleanDisplays time-series results
Validation
UnitText (search), DropdownEnsures unit consistency
Min ConstraintBooleanSet a lower limit
Min ValueNumberLower limit option
Max ConstraintBooleanSet an upper limit
Max ValueNumberUpper limit option

*Required for calculation


Converter

A Converter performs calculations or transformations from other variables or constants.
It works like a helper variable—storing no values and recalculating at every simulation step.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions
InputDepends on linked primitivesTakes the value from another primitive (time dimension fixed by default)
Mapping
Input*x-valueInput value to trigger calculation
Output*y-valueResult, possibly taken from another primitive
InterpolationDropdown (Linear, Discrete)Determines how values between points are calculated
Validation
UnitText (search), DropdownEnsures unit consistency
Min ConstraintBooleanSet a lower limit
Min ValueNumberLower limit option
Max ConstraintBooleanSet an upper limit
Max ValueNumberUpper limit option

*Required for calculation


State

In agent-based modeling, a State represents the current condition or mode of an agent, influencing its behavior and reactions.
Agents can only be in one state at a time, switching due to rules, probabilities, or environmental factors.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions
Active at Start*Numeric, [Value of a primitive], FunctionsInitial condition
DurationNumeric, [Value of a primitive], FunctionsHow long the state remains active before switching
Interface & Scenario
InputDropdownSets incoming connections
Output ParameterBooleanDisplays state changes over time

*Required for calculation


Transition

A Transition defines the change from one state to another in an agent, specifying the conditions under which it occurs.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions
Trigger*Dropdown (Condition, Probability, Timeout)Defines when the change happens
Value*Numeric, [Value of a primitive], FunctionsUsed in the trigger condition
RecalculateBooleanWhether to check the condition continuously
RepeatBooleanWhether the transition can occur multiple times
Validation
UnitText (search), DropdownEnsures unit consistency
Min ConstraintBooleanSet a lower limit
Min ValueNumberLower limit option
Max ConstraintBooleanSet an upper limit
Max ValueNumberUpper limit option

*Required for calculation


Action

An Action is what an agent does during a state or transition—its operational behavior, such as movement, interaction, or resource use.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions
Action*Numeric, [Value of a primitive], FunctionsAlgorithm to execute
Trigger*DropdownCondition for execution
Value*Numeric, [Value of a primitive], FunctionsUsed in the trigger condition
RecalculateBooleanWhether to check the trigger continuously
RepeatBooleanWhether the action can be repeated

*Required for calculation


Agent

An Agent is an autonomous entity with its own states, attributes, and rules, able to interact with the environment and other agents.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions
Interface & Scenario
Output ParameterBooleanDisplays agent-related results over time

Population

A Population is the complete set of agents of a specific type in a model, sharing attributes or behaviors and interacting in a common environment.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions
Population Size*NumberNumber of agents
UnitText (search), Dropdown
Geo Width*NumberMap width coordinate
Geo Height*NumberMap height coordinate
Geo Wrap AroundBooleanWhether agents reappear on the opposite side when leaving the map
Geo Placement Type*DropdownHow agents are initially placed
Geo Placement FunctionFunctionRule for placement
Network TypeDropdownWhether and how agents form networks
Network FunctionFunctionNetwork rule
Interface & Scenario
Output ParameterBooleanDisplays results over time

*Required for calculation


Folder

A Folder is an organizational element that groups selected parts of a model, making it easier to manage.

Input FieldType of InputPurpose
NameTextUnique identifier
DescriptionTextExplains assumptions