IODA NetLogo Dictionary

IODA NetLogo 2.2 User Manual   

Direct links to other parts of the IODA NetLogo Manual:General DocumentationTutorialFAQ

The documentation of the commands and reporters of the IODA NetLogo extension follows. Most of the commands and reporters directly related to new data types (interaction, assignation, matrix) are defined in the Java extension, while most of the commands and reporters related to the simulation engine are defined in the IODA NetLogo include file.

Remember that the IODA NetLogo extension is aimed at providing a simple frame for the design of simulations. Thus, you need but a few primitives to master even the subtleties of the IODA methodology. This complete dictionary is provided to allow advanced users to build their own simulation engine or whatever application based on interactions. So, before starting your search, please have a look at the Tutorial and at the Frequently Asked Questions.

Categories

Frequently Used Primitives

ioda:clear-all ioda:clear-matrices ioda:die ioda:distance ioda:filter-neighbors-in-radius ioda:filter-neighbors-on-patches ioda:filter-neighbors-on-mylinks ioda:go ioda:init-agent ioda:load-interactions ioda:load-matrices ioda:my-target ioda:primitives-to-write ioda:set-metric ioda:set-ordering-policy-for-interaction-selection ioda:set-ordering-policy-for-update ioda:setup ioda:version

General

ioda:check-consistency ioda:clear-all ioda:get-breed-named ioda:primitives-to-write ioda:set-metric ioda:version

Simulation Engine-related

ioda:concrete-primitive ioda:my-decision ioda:die ioda:distance ioda:filter-neighbors-in-radius ioda:filter-neighbors-on-patches ioda:filter-neighbors-on-mylinks ioda:go ioda:init-agent ioda:is-alive? ioda:is-operative? ioda:my-neighbors ioda:my-target ioda:set-alive ioda:set-my-neighbors ioda:set-operative ioda:set-ordering-policy-for-interaction-selection ioda:set-ordering-policy-for-update ioda:setup

Many other procedures from the simulation engine are NOT documented here, since they are defined for internal use.

Interaction-related

ioda:eval-condition ioda:eval-trigger ioda:get-interaction ioda:get-interactions ioda:interaction-from-list ioda:interaction-make ioda:interaction-name ioda:is-exclusive? ioda:load-interactions ioda:perform-actions ioda:set-exclusive ioda:set-exclusive-interactions

Assignation-related

ioda:assignation-from-list ioda:get-distance ioda:get-interaction-of ioda:get-priority ioda:get-source-breed ioda:get-target-breed ioda:is-degenerate? ioda:set-target-selection-method ioda:target-selection-method

Matrix-related

ioda:active-agents ioda:active-agents-with-targets ioda:add-assignation ioda:clear-matrices ioda:get-breed-targets ioda:get-interaction-matrix ioda:get-matrix-line ioda:get-update-matrix ioda:is-active? ioda:is-labile? ioda:is-passive? ioda:labile-agents ioda:load-matrices ioda:matrix-make ioda:matrix-view ioda:passive-agents ioda:set-interaction-matrix ioda:set-udpate-matrix

Variables

Global variables: ioda:metric ioda:ordering-policy-for-selection ioda:ordering-policy-for-update ioda:performed-interactions

Turtle variables: ioda:alive? ioda:decision ioda:neighbors ioda:operative? ioda:target

Patch variables: ioda:patch-alive? ioda:patch-decision ioda:patch-neighbors ioda:patch-operative? ioda:patch-target

Several variables are defined in the simulation engine for internal use only, thus they are not described here.

Frequently Used Primitives

ioda:clear-all

ioda:clear-all

Clears all interactions and matrices. This is done automatically if you use the clear-all NetLogo command, but you might also need to re-load different interactions (or matrices) without resetting the whole model.

See also ioda:clear-matrices.

ioda:clear-matrices

ioda:clear-matrices

Clears interaction and update matrices. This is done automatically if you use the clear-all NetLogo command, but you might also need to re-load different matrices without resetting the whole model.
NB: Interactions are kept unchanged. If you need to clear also interactions, use ioda:clear-all instead.

ioda:die

turtles onlypatches only ioda:die

Kills the agent with regards to the IODA simulation process: the agent is not immediately removed from the NetLogo simulation, but it is no more taken into account in the IODA engine. You MUST use this command instead of the die NetLogo command to destroy IODA agents in a proper way. If the agent is a turtle, it is actually removed from the NetLogo simulation at the end of the ioda:go procedure.

ioda:distance

turtles onlypatches only ioda:distance agent

Reports the distance between the current agent (a turtle or a patch) and the specified agent (a turtle or a patch). If agents are both turtles or both patches, reports the distance computed with their coordinates, otherwise reports the distance between the patch of the turtle and the other patch. This ensures that a turtle can interact with the patch-here at distance 0 even if it is not exactly on the center of the patch.

N.B.: By default, the distance is computed using the Euclidean metric (i.e. the NetLogo distance reporter), but you can use the Moore or the Von Neumann metric instead.

See also ioda:set-metric

ioda:filter-neighbors-in-radius

turtles onlypatches only ioda:filter-neighbors-in-radius number

Filter neighbors situated within the specified distance (using ioda:distance). This command is very useful for writing concrete primitives for the filter-neighbors abstract primitive.

See the Tutorial for detailed explanations about this process.
See also ioda:distance, ioda:filter-neighbors-on-patches, ioda:filter-neighbors-on-mylinks.

ioda:filter-neighbors-on-patches

turtles onlypatches only ioda:filter-neighbors-on-patches patch-set

Filter neighbors situated on the specified patches. This command is very useful for writing concrete primitives for the filter-neighbors abstract primitive.

See the Tutorial for detailed explanations about this process.
See also ioda:filter-neighbors-in-radius, ioda:filter-neighbors-on-mylinks.

ioda:filter-neighbors-on-mylinks

turtles only ioda:filter-neighbors-on-mylinks

Filter neighbors which are linked with the current agent. This command is very useful for writing concrete primitives for the filter-neighbors abstract primitive, especially if you work with social networks.

See the Tutorial for detailed explanations about this process.
See also ioda:filter-neighbors-on-patches, ioda:filter-neighbors-in-radius.

ioda:go

ioda:go

Performs one simulation step according to the IODA simulation process. During a IODA simulation step, the following operations occur:

  1. All labile agents perform their update interactions
  2. All active and operative agents try to perform an interaction on either themselves, or one or more target agents chosen among their passive neighbors.

See the Tutorial for detailed explanations about this process.
See also ioda:setup.

ioda:init-agent

turtles onlypatches only ioda:init-agent

Initializes a new agent. You are strongly recommended to run this command as soon as you create a new agent during the simulation, especially in the action primitives of an interaction.

ioda:load-interactions

ioda:load-interactions string

Reads the specified text file and builds the corresponding interactions. An interaction file must follow the following syntax:

[EXCLUSIVE|PARALLEL] INTERACTION <name>
[TRIGGER <tr1> ... <tr_n>]
[TRIGGER <tr'1> ... <tr'_n>]
...
[CONDITION <cond1> ... <cond_n>]
[CONDITION <cond'1> ... <cond'_n>]
...
[ACTIONS <act1> ... <act_n>]
END

See the Tutorial for detailed examples.
See also ioda:load-matrices.

ioda:load-matrices

ioda:load-matrices string1 string2

Reads the text file specified by string1 and builds the corresponding interaction and update matrices. Since matrix files are CSV files, string2 provides the characters used as field separators: in most example, spaces (' ') and tabs ('\t'), thus string2 is " \t". A matrix file must follow the following fields:

<source> <interaction> <priority>
OR: 
<source> <interaction> <priority> UPDATE
OR: 
<source> <interaction> <priority> <target> <distance> [<target-selection-policy>]

See the Tutorial for detailed examples.
See also ioda:load-interactions.

ioda:my-target

turtles onlypatches only ioda:my-target

This reporter is frequently used in perception or action primitives, during interaction selection and interaction execution. It reports either the potential (in perception primitives) or actual (in action primitives) target(s) of an interaction (when run by the potential or actual source agent), or the potential or actual source of an interaction (when run in the target agent). This is used very frequently for the evaluation of triggers and conditions, and for performing the actions of an interaction.

Three kind of values may be reported:


See the Tutorial for detailed examples.

ioda:primitives-to-write

ioda:primitives-to-write

Reports a string representing the declaration of all IODA primitives needed by your current model (i.e. for your current interaction matrix and update matrix). IODA primitives are:

The resulting string is the squeletton for writing the appropriate code without forgetting any IODA primitive. You just have copy-paste the commands and reporters in your Procedures tab, and fill them with your own code.

See also ioda:check-consistency.

ioda:setup

ioda:setup

Initializes all variables and data structures needed to run a IODA NetLogo simulation. This command has to be run at the end of the setup procedure, just before starting the simulation.

See also ioda:go.

ioda:set-metric

ioda:set-metric string

Specifies a metric for computing distances in the IODA NetLogo simulation engine. After the ioda:setup procedure, the ioda:metric variable is set to "Euclidean". You can change it either to "Moore" or to "Von Neumann".

ioda:set-metric "Euclidean"
print [ioda:distance patch 2 1] of patch 0 0
=> 2.23606797749979

ioda:set-metric "Moore"
print [ioda:distance patch 2 1] of patch 0 0
=> 2

ioda:set-metric "Von Neumann"
print [ioda:distance patch 2 1] of patch 0 0
=> 3

See also ioda:distance.

ioda:version

ioda:version

Reports the product version of the IODA NetLogo extension.

print ioda:version
=> 2.2

General

ioda:check-consistency

ioda:check-consistency

Reports true if all IODA primitives of your current model (i.e. for your current interaction matrix and update matrix) have been written in your program; throws an exception otherwise. IODA primitives are:

See also ioda:primitives-to-write.

ioda:get-breed-named

ioda:get-breed-named string

Reports the agentset which corresponds to the specified string. For turtles and patches the string can use the singular or plural form, but for other breeds only the plural form gives the appropriate agentset. Otherwise, reports nobody.

breed [ants ant]
print ioda:get-breed-named "ants"
=> ants
print ioda:get-breed-named "ant"
=> nobody
print ioda:get-breed-named "turtles"
=> turtles
print ioda:get-breed-named "patch"
=> patches

Simulation engine-related

ioda:concrete-primitive

ioda:concrete-primitive breed string

Reports the name of the concrete primitive that this breed must implement so as to be able to run the abstract primitive given in the string.

print ioda:concrete-primitive one-of wolves "wiggle"
=> wolves::wiggle

ioda:is-alive?

turtles onlypatches only ioda:is-alive?

Reports true if this agent can take part in the IODA simulation, false otherwise (i.e. if it is ignored by the IODA simulation engine).

See also ioda:alive? ioda:set-alive

ioda:set-alive

turtles onlypatches only ioda:set-alive boolean

Defines whether or not this agent can take part in the IODA simulation, or if must be ignored by the IODA simulation engine.

See also ioda:alive? ioda:is-alive?

ioda:is-operative?

turtles onlypatches only ioda:is-operative?

Reports false if the agent has already performed an interaction or if it has been the target of an exclusive interaction within the current time step.

See also ioda:operative? ioda:set-operative

ioda:set-operative

turtles onlypatches only ioda:set-operative boolean

Defines whether or not this agent can act as a source, or undergo an exclusive interaction, during the current time step.

See also ioda:operative? ioda:is-operative?

ioda:my-decision

turtles onlypatches only ioda:my-decision

Reports the interaction and target chosen and performed by this agent during the current time step.

See also ioda:decision

ioda:my-neighbors

turtles onlypatches only ioda:my-neighbors

Reports the agents (turtles or patches) that have been perceived by this agent during the current time step.

See also ioda:neighbors ioda:set-my-neighbors

ioda:set-my-neighbors

turtles onlypatches only ioda:set-my-neighbors list

Defines the list of the agents (turtles or patches) that are perceived by this agent during the current time step. This can be used to customize the filter-neighbors perception primitive.

See also ioda:neighbors ioda:my-neighbors

ioda:set-ordering-policy-for-interaction-selection

ioda:set-ordering-policy-for-interaction-selection reporter-task
ioda:set-ordering-policy-for-interaction-selection "random"

Defines a special ordering for scheduling active agents during the interaction selection step. By default, the list of active agents is shuffled at each tick: by using this primitive, the list is sorted according to the reporter task that is specified. This should be used carefully so as to avoid simulation biases. In order to work properly, this primitive has to be executed after the ioda:setup primitive. Using this primitive with parameter "random" restores the default scheduling.
Below is an example that schedules active agents according to their ID (who).

ioda:set-ordering-policy-for-interaction-selection task [ [who] of ?1 < [who] of ?2]

See also: the example provided in tutorial files (4b-leap years), ioda:set-ordering-policy-for-update

ioda:set-ordering-policy-for-update

ioda:set-ordering-policy-for-update reporter-task
ioda:set-ordering-policy-for-update "random"

Defines a special ordering for scheduling labile agents during the update step. By default, the list of labile agents is shuffled at each tick: by using this primitive, the list is sorted according to the reporter task that is specified. This should be used carefully so as to avoid simulation biases. In order to work properly, this primitive has to be executed after the ioda:setup primitive. Using this primitive with parameter "random" restores the default scheduling.
Below is an example that schedules labile agents according to their ID (who).

ioda:set-ordering-policy-for-update task [ [who] of ?1 < [who] of ?2]

See also: the example provided in tutorial files (4b-leap years), ioda:set-ordering-policy-for-interaction-selection

Interaction-related

ioda:get-interactions

ioda:get-interactions

Reports the list of all interactions defined in the model.

ioda:is-exclusive?

ioda:is-exclusive? interaction

Reports true if the interaction is EXCLUSIVE, false if it is PARALLEL. The Tutorial provides explanations about exclusive and parallel interactions.

See also ioda:set-exclusive, ioda:set-exclusive-interactions.

ioda:set-exclusive

ioda:set-exclusive interaction boolean

Specifies wether or not the interaction must be used as EXCLUSIVE or PARALLEL. The Tutorial provides explanations about exclusive and parallel interactions.

See also ioda:is-exclusive?, ioda:set-exclusive-interactions.

ioda:set-exclusive-interactions

ioda:set-exclusive-interactions boolean

Specifies wether or not the interaction to be declared must be defined as EXCLUSIVE (true) or PARALLEL (false) by default. Interactions that have already been declared are kept unchanged. By default, interactions are considered PARALLEL. The Tutorial provides explanations about exclusive and parallel interactions.

See also ioda:is-exclusive?, ioda:set-exclusive.

ioda:get-interaction

ioda:get-interaction string

Reports the interaction of the specified name.

print ioda:get-interaction "Hunt"
=> {{ioda:interaction ["hunt" [["hungry?"]] [["adult?" "target:alone?"]] ["chase"]]}}

See also ioda:interaction-from-list.

ioda:interaction-make

ioda:interaction-make string list list list

Reports an interaction with the specified name, trigger, condition and actions.

print ioda:interaction-make "Hunt" [["hungry?"]] [["adult?" "target:alone?"]] ["chase"]
=> {{ioda:interaction ["Hunt" [["hungry?"]] [["adult?" "target:alone?"]] ["chase"]]}}

ioda:interaction-name

ioda:interaction-name interaction

Reports the name of the interaction.

print ioda:interaction-name ioda:interaction-make "Hunt" [["hungry?"]] [["adult?" "target:alone?"]] ["chase"]
=> Hunt

ioda:interaction-from-list

ioda:interaction-from-list list

Reports an interaction built from a list containing a name, a list of triggers, a list of conditions and a list of actions.

print ioda:interaction-from-list ["Hunt" [["hungry?"]] [["adult?" "target:alone?"]] ["chase"]]
=> {{ioda:interaction ["Hunt" [["hungry?"]] [["adult?" "target:alone?"]] ["chase"]]}}

See also ioda:interaction-make.

ioda:eval-condition

turtles onlypatches only ioda:eval-condition interaction target-turtle-or-patch
turtles onlypatches only ioda:eval-condition interaction nobody

Reports a list containing one or two lists, which themselves contain the actual reporters that should be evaluated in order to know wether the condition of the interaction is fulfilled or not, with a list identifying the agent (turtle or patch) running this reporter as the source agent, and the other turtle or patch as the target of the interaction (or nobody if the interaction is degenerate). The first item each sublist identifies the agent that should evaluate the reporters, the other items are the reporter themselves with their target.

let i ioda:interaction-make "Hunt" [["hungry?"]] [["adult?" "target:alone?"]] ["chase"]
print [ioda:eval-condition i one-of sheep] of one-of wolves
=> [[[[51] [WOLVES::adult? [25]]] [[25] [SHEEP::alone? [51]]]]]
;; means that turtle 51 (a wolf) must evaluate reporter wolves::adult? 
;; with parameter turtle 25, and conversely turtle 25 (a sheep) must 
;; evaluate reporter sheep::alone? with parameter turtle 51

set i ioda:interaction-make "Sleep" [["tired?"]] [["no-danger?"]] ["rest"]
print [ioda:eval-condition i nobody] of one-of wolves
=> [[[[50] [WOLVES::no-danger? []]]]]
;; turtle 50 has to evaluate reporter wolves::no-danger? with parameter nobody
;; (no target agent, represented by the empty list following the reporter)

See also ioda:eval-trigger, ioda:perform-actions.

ioda:eval-trigger

turtles onlypatches only ioda:eval-trigger interaction target-turtle-or-patch
turtles onlypatches only ioda:eval-trigger interaction nobody

Reports a list containing one or two lists, which themselves contain the actual reporters that should be evaluated in order to know wether the trigger of the interaction is fulfilled or not, with the agent (turtle or patch) running this reporter as the source agent, and the other turtle or patch as the target of the interaction (or nobody if the interaction is degenerate). The first item of each sublist is the agent that should evaluate the reporters, the other items are the reporter themselves.

let i ioda:interaction-make "Hunt" [["hungry?"]] [["adult?" "target:alone?"]] ["chase"]
print [ioda:eval-trigger i one-of sheep] of one-of wolves
=> [[[(TURTLE 5) (WOLVES::hungry?(TURTLE 1))]]]
;; means that turtle 5 (a wolf) must evaluate reporter wolves::hungry? with parameter turtle 1 

set i ioda:interaction-make "Sleep" [["tired?"]] [["no-danger?"]] ["rest"]
print [ioda:eval-trigger i nobody] of one-of wolves
=> [[[(TURTLE 4) (WOLVES::tired?(nobody))]]]
;; turtle 4 has to evaluate reporter wolves::tired? with parameter nobody (no target agent)

See also ioda:eval-condition, ioda:perform-actions.

ioda:perform-actions

turtles onlypatches only ioda:perform-actions interaction target-turtle-or-patch
turtles onlypatches only ioda:perform-actions interaction nobody

Reports a list containing zero, one or more lists, which themselves contain the actual procedures that should be run in order to perform the interaction, with the agent (turtle or patch) running this command as the source agent, and the other turtle or patch as the target of the interaction (or nobody if the interaction is degenerate). The first item of each sublist is the agent that should run the procedures, the other items are the procedures themselves. Note that the order of the procedures is generally important.

let i ioda:interaction-make "Eat" [["hungry?"]] [["target:healthy?"]] ["digest" "roar" "target:die"]
print [ioda:perform-actions i one-of sheep] of one-of wolves
=> [[(TURTLE 4) (WOLVES::digest(TURTLE 0)) (WOLVES::roar(TURTLE 0))] [(TURTLE 0) (SHEEP::die(TURTLE 4))]]
;; means that turtle 4 (a wolf) must run procedure wolves::digest with parameter turtle 0, 
;; then procedure wolves::roar with parameter turtle 0 ; after that turtle 0 (a sheep) must
;; run procedure sheep::die with parameter turtle 4

set i ioda:interaction-make "Sleep" ["tired?"] ["no-danger?"] ["rest"]
print [ioda:perform-actions i nobody] of one-of sheep
=> [[(TURTLE 2) (SHEEP::rest(nobody))]]
;; turtle 2 has to run procedure sheep::rest with parameter nobody (no target agent)

See also ioda:eval-condition, ioda:eval-trigger.

Assignation-related

ioda:assignation-from-list

ioda:assignation-from-list list

Reports an assignation built from the items of the list. The list may contain the following items:

print ioda:assignation-from-list ["ants" "Take" 20 "food" 1]
;; reports the assignation of the "Take" interaction (which must exist!)
;; to "ants" agents as sources, with "food" agents as targets,
;; at priority level 20, and with a limit distance of 1.
=> {{ioda:assignation ["ants" "take" 20 "food" 1 "RANDOM"]}}

ioda:get-source-breed

ioda:get-source-breed assignation

Reports the source breed for the specified assignation.

print ioda:get-source-breed ioda:assignation-from-list ["ants" "Take" 20 "food" 1]
=> ants

See also ioda:get-target-breed, ioda:get-priority, ioda:get-distance, ioda:get-interaction-of, ioda:target-selection-method, ioda:set-target-selection-method, ioda:is-degenerate?.

ioda:get-target-breed

ioda:get-target-breed assignation

Reports the target breed for the specified assignation.

print ioda:get-target-breed ioda:assignation-from-list ["ants" "Take" 20 "food" 1]
=> food
print ioda:get-target-breed ioda:assignation-from-list ["ants" "Move" 10]
=> nobody

See also ioda:get-source-breed, ioda:get-priority, ioda:get-distance, ioda:get-interaction-of, ioda:target-selection-method, ioda:set-target-selection-method, ioda:is-degenerate?.

ioda:get-priority

ioda:get-priority assignation

Reports the priority level for the specified assignation.

print ioda:get-priority ioda:assignation-from-list ["ants" "Take" 20 "food" 1]
=> 20

See also ioda:get-source-breed, ioda:get-target-breed, ioda:get-distance, ioda:get-interaction-of, ioda:target-selection-method, ioda:set-target-selection-method, ioda:is-degenerate?.

ioda:get-distance

ioda:get-distance assignation

Reports the limit distance for the specified assignation.

print ioda:get-distance ioda:assignation-from-list ["ants" "Take" 20 "food" 1]
=> 1

See also ioda:get-source-breed, ioda:get-target-breed, ioda:get-priority, ioda:get-interaction-of, ioda:target-selection-method, ioda:set-target-selection-method, ioda:is-degenerate?.

ioda:get-interaction-of

ioda:get-interaction-of assignation

Reports the interaction for the specified assignation.

print ioda:get-interaction-of ioda:assignation-from-list ["turtles" "Delete" 20 "turtles" 1]
=> {{ioda:interaction ["delete" [] [] ["target:die"]]}}

See also ioda:get-source-breed, ioda:get-target-breed, ioda:get-priority, ioda:get-distance, ioda:target-selection-method, ioda:set-target-selection-method, ioda:is-degenerate?.

ioda:is-degenerate?

ioda:is-degenerate? assignation

Reports true if the assignation is degenerate (i.e. if it has nobody as target), false otherwise.

print ioda:is-degenerate? ioda:assignation-from-list ["turtles" "Delete" 20 "turtles" 1]
=> false
print ioda:is-degenerate? ioda:assignation-from-list ["ants" "Move" 10]
=> true

See also ioda:get-source-breed, ioda:get-target-breed, ioda:get-priority, ioda:get-distance, ioda:get-interaction-of, ioda:target-selection-method, ioda:set-target-selection-method.

ioda:target-selection-method

ioda:target-selection-method assignation

Reports the interaction/target selection policy used by this assignation (by default: "RANDOM", which means that all interaction/target pairs found by the simulation engine to be realizable are chosen with equal probability for performing an interaction.

See also ioda:get-source-breed, ioda:get-target-breed, ioda:get-priority, ioda:get-distance, ioda:get-interaction-of, ioda:set-target-selection-method, ioda:is-degenerate?.

ioda:set-target-selection-method

ioda:set-target-selection-method assignation string

Defines the interaction/target selection policy used by this assignation (by default: "RANDOM", which means that all interaction/target pairs found by the simulation engine to be realizable are chosen with equal probability for performing an interaction). Possible string values are: "RANDOM", "RANDOM-INT", "BEST:aReporter", "PRORATA:aReporter", "NUMBER:min-max", "ALL-BEST:aReporter", "FILTER:aReporter". Please refer to the "Pheromones" and "Explosion" sections of the Tutorial to learn about target selection policies.

See also ioda:get-source-breed, ioda:get-target-breed, ioda:get-priority, ioda:get-distance, ioda:get-interaction-of, ioda:target-selection-method, ioda:is-degenerate?.

Interaction matrix-related

ioda:active-agents

ioda:active-agents

Reports a list of active breeds (including patches if necessary), i.e. breed (or patches in general) that can perform some interactions (according to the Interaction Matrix of the current model).

See also ioda:active-agents-with-targets ioda:passive-agents ioda:labile-agents.

ioda:active-agents-with-targets

ioda:active-agents-with-targets

Reports a list of active breeds (including patches if necessary) which can perform at least one non-degenerate interaction, i.e. breed (or patches in general) that can perform some interactions (according to the Interaction Matrix of the current model) on other agents.

See also ioda:active-agents ioda:passive-agents ioda:labile-agents.

ioda:passive-agents

ioda:passive-agents

Reports a list of passive breeds (including patches if necessary), i.e. breed (or patches in general) that can undergo some interactions (according to the Interaction Matrix of the current model).

See also ioda:active-agents ioda:active-agents-with-targets ioda:labile-agents.

ioda:labile-agents

ioda:labile-agents

Reports a list of labile breeds (including patches if necessary), i.e. breed (or patches in general) that can change their state through update interactions (according to the Update Matrix of the current model).

See also ioda:active-agents ioda:active-agents-with-targets ioda:passive-agents.

ioda:is-active?

turtles onlypatches only ioda:is-active?

Reports true if this turtle or patch is member of an active breed, i.e. if its breed (or if patches in general if this agent is a patch) can perform some interactions (according to the Interaction Matrix of the current model) ; reports false otherwise.

See also ioda:is-labile? ioda:is-passive?.

ioda:is-passive?

turtles onlypatches only ioda:is-passive?

Reports true if this turtle or patch is member of a passive breed, i.e. if its breed (or if patches in general if this agent is a patch) can undergo some interactions (according to the Interaction Matrix of the current model) ; reports false otherwise.

See also ioda:is-active? ioda:is-labile?.

ioda:is-labile?

turtles onlypatches only ioda:is-labile?

Reports true if this turtle or patch is member of a labile breed, i.e. if its breed (or if patches in general if this agent is a patch) can change their state through update interactions (according to the Update Matrix of the current model) ; reports false otherwise.

See also ioda:is-active? ioda:is-passive?.

ioda:get-interaction-matrix

ioda:get-interaction-matrix

Reports the interaction matrix for the current model.

;; load the "simple ecosystem" example and run "setup" first
print ioda:get-interaction-matrix
=> {{ioda:matrix [{{ioda:assignation ["wolves" "eat" 10 "sheep" 1 "RANDOM"]}} 
      {{ioda:assignation ["wolves" "hunt" 5 "sheep" 5 "RANDOM"]}} 
      {{ioda:assignation ["wolves" "moverandomly" 0]}} 
      {{ioda:assignation ["sheep" "eat" 10 "patches" 0 "RANDOM"]}} 
      {{ioda:assignation ["sheep" "mate" 5 "sheep" 1 "RANDOM"]}} 
      {{ioda:assignation ["sheep" "moverandomly" 0]}}]}}

See also ioda:set-interaction-matrix ioda:get-update-matrix ioda:set-update-matrix.

ioda:get-update-matrix

ioda:get-update-matrix

Reports the update matrix for the current model.

;; load the "simple ecosystem" example and run "setup" first
print ioda:get-update-matrix
=> {{ioda:matrix [{{ioda:assignation ["patches" "grow" 0]}}]}}

See also ioda:get-interaction-matrix ioda:set-interaction-matrix ioda:set-update-matrix.

ioda:set-interaction-matrix

ioda:set-interaction-matrix matrix

Defines the interaction matrix for the current model.

See also ioda:get-interaction-matrix ioda:get-update-matrix ioda:set-update-matrix.

ioda:set-update-matrix

ioda:set-update-matrix matrix

Defines the update matrix for the current model.

See also ioda:get-interaction-matrix ioda:set-interaction-matrix ioda:get-update-matrix.

ioda:matrix-make

ioda:matrix-make

Reports a new, empty interaction matrix.

ioda:matrix-view

ioda:matrix-view matrix

Reports a list corresponding to the actual data structure used for storing assignations (priority-ordered lists, grouped by source breeds).

;; load the "simple ecosystem" example and run "setup" first
print ioda:matrix-view ioda:get-interaction-matrix
=> [[wolves [{{ioda:assignation ["wolves" "eat" 10 "sheep" 1 "RANDOM"]}}] 
            [{{ioda:assignation ["wolves" "hunt" 5 "sheep" 5 "RANDOM"]}}] 
            [{{ioda:assignation ["wolves" "moverandomly" 0]}}]] 
    [sheep [{{ioda:assignation ["sheep" "eat" 10 "patches" 0 "RANDOM"]}}] 
           [{{ioda:assignation ["sheep" "mate" 5 "sheep" 1 "RANDOM"]}}] 
           [{{ioda:assignation ["sheep" "moverandomly" 0]}}]]]

ioda:add-assignation

ioda:add-assignation matrix assignation

Adds the specified assignation in the matrix.

;; a very small IODA model
let im ioda:matrix-make
let i ioda:interaction-make "Take" [] [["can-take-load?"]] ["take-target" "target:die"]
ioda:add-assignation im ioda:assignation-from-list ["ants" "Take" 20 "food" 1]
ioda:set-interaction-matrix im

ioda:get-matrix-line

ioda:get-matrix-line matrix breed

Reports a priority-ordered list corresponding to assignations where the specified breed plays the role of the source.

;; load the "particles" example and run the "setup" procedure first
print ioda:get-matrix-line ioda:get-interaction-matrix turtles
=> [[{{ioda:assignation ["turtles" "delete" 1 "turtles" 1 "RANDOM"]}}]
    [{{ioda:assignation ["turtles" "moverandomly" 0]}}]]

ioda:get-breed-targets

ioda:get-breed-targets breed

Reports a list of breeds (including patches) corresponding to agentsets which can be the target of interactions performed by this breed (eventually patches).

;; load the "simple ecosystem" example and run the "setup" procedure first
print ioda:get-breed-targets sheep
=> [patches sheep]  
;; that means that sheep are able to perform interaction on patches and on other sheep

Variables

Several variables of the simulation engine are defined for internal use, thus they are not described here.

ioda:metric

ioda:metric

The name of the metric used to compute distances between agents in the IODA NetLogo simulation. In this version three metrics are pre-defined: "Euclidean", "Moore" and "Von Neumann". In order to prevent this variable to take invalid values, please use the ioda:set-metric procedure to change the metric.

See also ioda:set-metric

ioda:ordering-policy-for-selection

ioda:ordering-policy-for-selection

The task used for scheduling active agents during the interaction selection step. The default value for this variable is "random", which means that the list of active agents is shuffled at each tick (so as to avoid simulation biases). In order to prevent this variable to take invalid values, please use the ioda:set-ordering-policy-for-interaction-selection procedure to change the task.

See also ioda:set-ordering-policy-for-interaction-selection

ioda:ordering-policy-for-update

ioda:ordering-policy-for-update

The task used for scheduling labile agents during the update step. The default value for this variable is "random", which means that the list of labile agents is shuffled at each tick (so as to avoid simulation biases). In order to prevent this variable to take invalid values, please use the ioda:set-ordering-policy-for-update procedure to change the task.

See also ioda:set-ordering-policy-for-update

ioda:performed-interactions

turtles onlypatches only ioda:performed-interactions

The list of actual interactions that have been performed during one run of the ioda:go procedure. This can be useful for statistics or debugging. The list contains items of the form [source-agent interaction-name target-agent], where target-agent is nobody in reflexive interactions.

ioda:alive?
ioda:patch-alive?

turtles only ioda:alive?
patches only ioda:patch-alive?

Contains true if this agent (turtle or patch) is considered alive in the IODA model, i.e. allowed to perform or undergo interactions (from the interaction or update matrices). Otherwise, a dead agent cannot take part in the simulation.
NB 1: As the alive variable has a different name in turtles and patches, you should rather use ioda:is-alive? and ioda:set-alive to inspect or modify this variable.
NB 2: The alive status can be used to ignore temporarily some agents without removing them from the simulation, since dead agents are not actually removed, unless they are explicitly killed using the ioda:die procedure. See for instance the setup and go procedures in the "ants and food" example.

See also ioda:die ioda:is-alive? ioda:set-alive

ioda:decision
ioda:patch-decision

turtles only ioda:decision
patches only ioda:patch-decision

Contains the interaction and target that result from the interaction selection process of the agent. This depends on the interaction matrix and the neighboring agents.
NB: As the decision variable has a different name in turtles and patches, you should rather use ioda:my-decision to inspect this variable.

See also ioda:my-decision

ioda:neighbors
ioda:patch-neighbors

turtles only ioda:neighbors
patches only ioda:patch-neighbors

Contains the neighbors that have been perceived by the agent during this time step.
NB: As the neighbors variable has a different name in turtles and patches, you should rather use ioda:my-neighbors and ioda:set-my-neighbors to inspect or modify this variable.

See also ioda:my-neighbors ioda:set-my-neighbors ioda:filter-neighbors-in-radius ioda:filter-neighbors-on-patches ioda:filter-neighbors-on-mylinks

ioda:operative?
ioda:patch-operative?

turtles only ioda:operative?
patches only ioda:patch-operative?

Contains false if the agent has already performed an interaction or if it has been the target of an exclusive interaction within the current time step.
NB: As the operative variable has a different name in turtles and patches, you should rather use ioda:is-operative? and ioda:set-operative to inspect or modify this variable.

See also ioda:is-operative? ioda:set-operative

ioda:target
ioda:patch-target

turtles only ioda:target
patches only ioda:patch-target

This variable can be useful to identify the actual or potential partner of an agent in an interaction.
NB: As the target variable has a different name in turtles and patches, you should rather use ioda:my-target to inspect this variable.

See also ioda:my-target

Contact Information

Authors: Sébastien Picault and Philippe Mathieu

Email: ioda (at) univ-lille1.fr

Web Site: http://www.lifl.fr/SMAC/projects/ioda

Terms of Use

Valid HTML
 4.01 Strict

All contents © 2008-2013 Sébastien PICAULT and Philippe MATHIEU – SMAC Research Team
Laboratoire d'Informatique Fondamentale de Lille (LIFL), UMR CNRS 8021
University Lille 1 – Cité Scientifique, F-59655 Villeneuve d'Ascq Cedex, FRANCE.

The IODA NetLogo extension is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The IODA NetLogo extension is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with IODA NetLogo extension. If not, see http://www.gnu.org/licenses.