API

EasyABM provides following functions for agent based simulations.

Functions for creating agents

EasyABM.con_2d_agentFunction
con_2d_agent() -> EasyABM.Agent2D{Float64, EasyABM.PeriodicType, EasyABM.StaticType}

Creates a single 2d agent with properties specified as keyword arguments. Following property names are reserved for some specific agent properties - pos : position - shape : shape of agent - color : color of agent - size : size of agent - orientation : orientation of agent - keeps_record_of : Set of properties that the agent records during time evolution.

source
EasyABM.con_2d_agentsFunction
con_2d_agents(n::Int64) -> Vector{EasyABM.Agent2D{Float64, EasyABM.PeriodicType, EasyABM.StaticType}}

Creates a list of n 2d agents with properties specified as keyword arguments.

source
EasyABM.grid_2d_agentFunction
grid_2d_agent() -> EasyABM.Agent2D{Int64, EasyABM.PeriodicType, EasyABM.StaticType}

Creates a single 2d agent with properties specified as keyword arguments. Following property names are reserved for some specific agent properties - pos : position - shape : shape of agent - color : color of agent - size : size of agent - orientation : orientation of agent - keeps_record_of : Set of properties that the agent records during time evolution.

source
EasyABM.grid_2d_agentsFunction
grid_2d_agents(n::Int64) -> Vector{EasyABM.Agent2D{Int64, EasyABM.PeriodicType, EasyABM.StaticType}}

Creates a list of n 2d agents with properties specified as keyword arguments.

source
EasyABM.con_3d_agentFunction
con_3d_agent() -> EasyABM.Agent3D{Float64, EasyABM.PeriodicType, EasyABM.StaticType}

Creates a single 3d agent with properties specified as keyword arguments. Following property names are reserved for some specific agent properties - pos : position - shape : shape of agent - color : color of agent - size : size of agent - orientation : orientation of agent - keeps_record_of : Set of properties that the agent records during time evolution.

source
EasyABM.con_3d_agentsFunction
con_3d_agents(n::Int64) -> Vector{EasyABM.Agent3D{Float64, EasyABM.PeriodicType, EasyABM.StaticType}}

Creates a list of n 3d agents with properties specified as keyword arguments.

source
EasyABM.grid_3d_agentFunction
grid_3d_agent() -> EasyABM.Agent3D{Int64, EasyABM.PeriodicType, EasyABM.StaticType}

Creates a single 3d agent with properties specified as keyword arguments. Following property names are reserved for some specific agent properties - pos : position - shape : shape of agent - color : color of agent - size : size of agent - orientation : orientation of agent - keeps_record_of : Set of properties that the agent records during time evolution.

source
EasyABM.grid_3d_agentsFunction
grid_3d_agents(n::Int64) -> Vector{EasyABM.Agent3D{Int64, EasyABM.PeriodicType, EasyABM.StaticType}}

Creates a list of n 2d agents with properties specified as keyword arguments.

source
EasyABM.graph_agentFunction
graph_agent() -> EasyABM.GraphAgent{EasyABM.StaticType, EasyABM.StaticType}

Creates a single graph agent with properties specified as keyword arguments. Following property names are reserved for some specific agent properties - node : node where the agent is located on the graph. - shape : shape of agent - color : color of agent - size : size of agent - orientation : orientation of agent - keeps_record_of : Set of properties that the agent records during time evolution.

source
EasyABM.graph_agentsFunction
graph_agents(n::Int64) -> Vector{EasyABM.GraphAgent{EasyABM.StaticType, EasyABM.StaticType}}

Creates a list of n graph agents with properties specified as keyword arguments.

source
EasyABM.create_similarFunction
create_similar(agent::EasyABM.Agent2D{S<:Union{Float64, Int64}, P<:EasyABM.SType, T<:EasyABM.MType}, n::Int64) -> Vector

Returns a list of n 2d agents all having same (other than _extras) properties as agent if agent is alive.

source
create_similar(agent::EasyABM.Agent2D{S<:Union{Float64, Int64}, P<:EasyABM.SType, T<:EasyABM.MType}) -> EasyABM.Agent2D

Returns an agent with same (other than _extras) properties as given agent.

source
create_similar(agent::EasyABM.GraphAgent{S<:EasyABM.MType, T<:EasyABM.MType}, n::Int64) -> Vector

Returns a list of n 2d agents all having same (other than _extras) properties as agent.

source
create_similar(agent::EasyABM.GraphAgent{S<:EasyABM.MType, T<:EasyABM.MType}) -> EasyABM.GraphAgent

Returns a list of n 2d agents all having same (other than _extras) properties as agent.

source
create_similar(agent::EasyABM.Agent3D{S<:Union{Float64, Int64}, P<:EasyABM.SType, T<:EasyABM.MType}, n::Int64) -> Vector

Returns a list of n 2d agents all having same properties as agent.

source
create_similar(agent::EasyABM.Agent3D{S<:Union{Float64, Int64}, P<:EasyABM.SType, T<:EasyABM.MType}) -> EasyABM.Agent3D

Returns an agent with same properties as given agent.

source

Functions for defining model

EasyABM.create_3d_modelFunction
create_3d_model(agents::Array{EasyABM.Agent3D{S<:Union{Float64, Int64}, A<:EasyABM.SType, B<:EasyABM.MType}, 1}) -> EasyABM.SpaceModel3D{EasyABM.StaticType, _A, EasyABM.PeriodicType} where _A<:Union{Float64, Int64}

Creates a 3d model with

  • agents : list of agents.
  • graphics : if true, properties of shape, color, orientation will be assigned to each agent by default, if not already assigned by the user.
  • agents_type : Set it to Static if number of agents is fixed during model run. Otherwise set it to Mortal.
  • size : A tuple (dimx, dimy, dimz) which tells the number of blocks the space is to be divided into along x, y and z directions. An agent can take

positions from 0 to dimx in x-direction, 0 to dimy in y direction and 0 to dimz in z direction. The agents can move continuously or in discrete steps depending upon how user implements the step rule (unless the agents are of grid type which can only move in dicrete steps). Each unit block of space is called a patch which like agents can be assigned its own properties.

  • random_positions : If this property is true, each agent, will be assigned a random position.
  • space_type : Set it to Periodic or NPeriodic depending upon if the space is periodic or not.
  • kwargs` : Keyword argments used as model properties.
source
create_3d_model() -> EasyABM.SpaceModel3D{EasyABM.StaticType, Int64, EasyABM.PeriodicType}
source
EasyABM.create_graph_modelFunction
create_graph_model(agents::Array{EasyABM.GraphAgent{A<:EasyABM.MType, B<:EasyABM.MType}, 1}, graph::EasyABM.AbstractPropGraph{S<:EasyABM.MType, G<:EasyABM.GType}) -> Union{Nothing, EasyABM.GraphModel{_A, EasyABM.StaticType} where _A<:EasyABM.MType}

Creates a model with

  • agents : list of agents.
  • graph : A graph created with Graphs.jl and converted to EasyABM graph type Or created directly using EasyABM graph functionality.
  • graphics : if true properties of pos, shape, color, orientation will be assigned to each agent by default, if not already assigned by user.
  • agents_type : Set it to Static if number of agents is fixed during model run. Otherwise set it to Mortal.
  • random_positions : If this property is true, each agent will be assigned a random node on the graph.
  • kwargs : Keyword argments used as model properties.
source
create_graph_model(graph::EasyABM.AbstractPropGraph{S<:EasyABM.MType, G<:EasyABM.GType}) -> Union{Nothing, EasyABM.GraphModel{_A, EasyABM.StaticType} where _A<:EasyABM.MType}
source

Functions for initialising, running and visualising

EasyABM.init_model!Function
init_model!(model::EasyABM.SpaceModel2D)

Initiates the simulation with a user defined initialiser function which takes the model as its only argument. Model properties along with agent properties can be set (or modified) from within a user defined function and then sending it as initialiser argument in init_model!. The properties of agents, patches and model that are to be recorded during time evolution can be specified through the dictionary argument props_to_record. List of agent properties to be recorded are specified with key "agents" and value the list of property names as symbols. If a nonempty list of agents properties is specified, it will replace the keeps_record_of list of each agent. Properties of patches and model are similarly specified with keys "patches" and "model" respectively.

source
init_model!(model::EasyABM.SpaceModel3D)

Initiates the simulation with a user defined initialiser function which takes the model as its only argument. Model properties along with agent properties can be set (or modified) from within a user defined function and then sending it as initialiser argument in init_model!. The properties of agents, patches and model that are to be recorded during time evolution can be specified through the dictionary argument props_to_record. List of agent properties to be recorded are specified with key "agents" and value the set of property names as symbols. If a nonempty set of agents properties is specified, it will override the keeps_record_of property of each agent. Properties of patches and model are similarly specified with keys "patches" and "model" respectively.

source
init_model!(model::EasyABM.GraphModel)

Initiates the simulation with a user defined initialiser function which takes the model as its only argument. Model properties along with agent and graph properties can be set (or modified) from within a user defined function and then sending it as initialiser argument in init_model!. The properties of agents, nodes, edges and the model that are to be recorded during time evolution can be specified through the dictionary argument props_to_record. List of agent properties to be recorded are specified with key "agents" and value the set of property names as symbols. If a nonempty set of agents properties is specified, it will override the keeps_record_of property of each agent. Properties of nodes, edges and model are similarly specified with keys "nodes", "edges" and "model" respectively.

source
EasyABM.run_model!Function
run_model!(model::EasyABM.SpaceModel2D)

Runs the simulation for steps number of steps.

source
run_model!(model::EasyABM.SpaceModel3D)

Runs the simulation for steps number of steps.

source
run_model!(model::EasyABM.GraphModel)

Runs the simulation for steps number of steps.

source
EasyABM.run_model_epochsFunction
run_model_epochs(inmodel::EasyABM.SpaceModel2D)

Runs the simulation for num_epochs number of epochs where each epoch consists of steps_per_epoch number of steps. The model for each epoch is a deepcopy of the input model and is saved as .jld2 file.

source
run_model_epochs(inmodel::EasyABM.SpaceModel3D)

Runs the simulation for num_epochs number of epochs where each epoch consists of steps_per_epoch number of steps. The model for each epoch is a deepcopy of the input model and is saved as .jld2 file.

source
run_model_epochs(inmodel::EasyABM.GraphModel)

Runs the simulation for num_epochs number of epochs where each epoch consists of steps_per_epoch number of steps. The model for each epoch is a deepcopy of the input model and is saved as .jld2 file.

source
EasyABM.draw_frameFunction
draw_frame(model::EasyABM.SpaceModel2D) -> Luxor.Drawing

Draws a specific frame.

source
draw_frame(model::EasyABM.SpaceModel3D) -> MeshCat.DisplayedVisualizer

Draws a specific frame.

source
draw_frame(model::EasyABM.GraphModel) -> Union{Luxor.Drawing, MeshCat.DisplayedVisualizer}

Draws a specific frame.

source
EasyABM.animate_simFunction
animate_sim(model::EasyABM.SpaceModel2D) -> Widgets.Widget
animate_sim(model::EasyABM.SpaceModel2D, frames::Int64) -> Widgets.Widget

Creates an animation from the data collected during model run.

source
animate_sim(model::EasyABM.SpaceModel3D) -> Widgets.Widget
animate_sim(model::EasyABM.SpaceModel3D, frames::Int64) -> Widgets.Widget

Creates a 3d animation from the data collected during the model run.

source
animate_sim(model::EasyABM.GraphModel) -> Widgets.Widget
animate_sim(model::EasyABM.GraphModel, frames::Int64) -> Widgets.Widget

Creates an animation from the data collected during model run.

source
EasyABM.create_interactive_appFunction
create_interactive_app(inmodel::EasyABM.SpaceModel2D) -> Widgets.Widget

Creates an interactive app for the model.

source
create_interactive_app(inmodel::EasyABM.SpaceModel3D) -> Widgets.Widget

Creates an interactive app for the model.

source
create_interactive_app(model::EasyABM.GraphModel) -> Widgets.Widget

Creates an interactive app for the model.

source

Functions for accessing, saving and retrieving data.

EasyABM.get_agent_dataFunction
get_agent_data(agent::EasyABM.AbstractAgent, model::Union{EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.MortalType}, EasyABM.AbstractSpaceModel{EasyABM.MortalType}}) -> NamedTuple{(:birthtime, :deathtime, :record), Tuple{Int64, Int64, DataFrames.DataFrame}}
get_agent_data(agent::EasyABM.AbstractAgent, model::Union{EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.MortalType}, EasyABM.AbstractSpaceModel{EasyABM.MortalType}}, props) -> NamedTuple{(:birthtime, :deathtime, :record), Tuple{Int64, Int64, DataFrames.DataFrame}}
source
get_agent_data(agent::EasyABM.AbstractAgent, model::Union{EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.StaticType}, EasyABM.AbstractSpaceModel{EasyABM.StaticType}}) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
get_agent_data(agent::EasyABM.AbstractAgent, model::Union{EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.StaticType}, EasyABM.AbstractSpaceModel{EasyABM.StaticType}}, props) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
source
EasyABM.get_patch_dataFunction
get_patch_data(patch, model::EasyABM.AbstractSpaceModel) -> Union{Nothing, NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}}
get_patch_data(patch, model::EasyABM.AbstractSpaceModel, props) -> Union{Nothing, NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}}
source
EasyABM.get_node_dataFunction
get_node_data(node::Int64, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}) -> NamedTuple{(:birthtime, :deathtime, :record), Tuple{Int64, Int64, DataFrames.DataFrame}}
get_node_data(node::Int64, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}, props) -> NamedTuple{(:birthtime, :deathtime, :record), Tuple{Int64, Int64, DataFrames.DataFrame}}
source
get_node_data(node::Int64, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
get_node_data(node::Int64, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
source
EasyABM.get_edge_dataFunction
get_edge_data(i::Int64, j::Int64, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}) -> NamedTuple{(:birth_death_times, :record), Tuple{Vector{Tuple{Int64, Int64}}, DataFrames.DataFrame}}
get_edge_data(i::Int64, j::Int64, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}, props) -> NamedTuple{(:birth_death_times, :record), Tuple{Vector{Tuple{Int64, Int64}}, DataFrames.DataFrame}}
source
get_edge_data(edge, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}) -> NamedTuple{(:birth_death_times, :record), Tuple{Vector{Tuple{Int64, Int64}}, DataFrames.DataFrame}}
get_edge_data(edge, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}, props) -> NamedTuple{(:birth_death_times, :record), Tuple{Vector{Tuple{Int64, Int64}}, DataFrames.DataFrame}}
source
get_edge_data(i::Int64, j::Int64, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
get_edge_data(i::Int64, j::Int64, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
source
get_edge_data(edge, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
get_edge_data(edge, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
source
EasyABM.get_model_dataFunction
get_model_data(model::Union{EasyABM.AbstractGraphModel, EasyABM.AbstractSpaceModel}) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
get_model_data(model::Union{EasyABM.AbstractGraphModel, EasyABM.AbstractSpaceModel}, props) -> NamedTuple{(:record,), Tuple{DataFrames.DataFrame}}
source
EasyABM.latest_propvalsFunction
latest_propvals(obj::EasyABM.AbstractPropDict, propname::Symbol, n::Int64) -> Any

last recorded (not current) property values.

source
latest_propvals(agent::EasyABM.AbstractPropDict, model::Union{EasyABM.AbstractGraphModel, EasyABM.AbstractSpaceModel}, propname::Symbol, n::Int64) -> Any
source
latest_propvals(patch::Tuple{Vararg{Int64, N}} where N, model::EasyABM.AbstractSpaceModel, propname::Symbol, n::Int64) -> Any
source
latest_propvals(node::Int64, model::EasyABM.GraphModel, propname::Symbol, n::Int64) -> Any

Last recorded property values.

source
latest_propvals(i::Int64, j::Int64, model::EasyABM.GraphModel, propname::Symbol, n::Int64) -> Any
source
latest_propvals(edge, model::EasyABM.GraphModel, propname::Symbol, n::Int64) -> Any
source
EasyABM.propnamesFunction
propnames(obj::Union{EasyABM.AbstractAgent2D, EasyABM.AbstractAgent3D}) -> Vector{Symbol}
source
propnames(obj::EasyABM.GraphAgent) -> Vector{Symbol}
source
propnames(obj::EasyABM.AbstractPropDict) -> Vector{Symbol}
source
EasyABM.get_nums_agentsFunction
get_nums_agents(model::Union{EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.MortalType}, EasyABM.AbstractSpaceModel{EasyABM.MortalType}}, conditions::Function...) -> DataFrames.DataFrame
source
get_nums_agents(model::Union{EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.StaticType}, EasyABM.AbstractSpaceModel{EasyABM.StaticType}}, conditions::Function...) -> DataFrames.DataFrame
source
EasyABM.get_nums_nodesFunction
get_nums_nodes(model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}, conditions::Function...) -> DataFrames.DataFrame
source
get_nums_nodes(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, conditions::Function...) -> DataFrames.DataFrame
source
EasyABM.get_nums_edgesFunction
get_nums_edges(model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}, conditions::Function...) -> DataFrames.DataFrame
source
get_nums_edges(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, conditions::Function...) -> DataFrames.DataFrame
source
EasyABM.get_nodes_avg_propsFunction
get_nodes_avg_props(model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}, props::Function...) -> DataFrames.DataFrame
source
get_nodes_avg_props(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props::Function...) -> DataFrames.DataFrame
source
EasyABM.get_edges_avg_propsFunction
get_edges_avg_props(model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}, props::Function...) -> DataFrames.DataFrame
source
get_edges_avg_props(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props::Function...) -> DataFrames.DataFrame
source

Functions for creating and modifying a graph

EasyABM.static_simple_graphFunction
static_simple_graph(n::Int64) -> EasyABM.SimplePropGraph{EasyABM.StaticType, EasyABM.SimGType}

Creates a simple prop graph with n vertices.

source
static_simple_graph(structure::Dict{Int64, Vector{Int64}}) -> Union{Nothing, EasyABM.SimplePropGraph{EasyABM.StaticType, EasyABM.SimGType}}

Creates a simple prop graph with given structure.

source
static_simple_graph(A::Matrix{Int64}) -> Union{Nothing, EasyABM.SimplePropGraph{EasyABM.StaticType, EasyABM.SimGType}}

Creates a simple prop graph for given Adjacency matrix.

source
static_simple_graph(A::SparseArrays.SparseMatrixCSC{Int64, Int64}) -> Union{Nothing, EasyABM.SimplePropGraph{EasyABM.StaticType, EasyABM.SimGType}}

Creates a simple prop graph for adjacency_matrix given as a Sparse Matrix.

source
static_simple_graph(g::Graphs.SimpleGraphs.SimpleGraph{Int64}) -> Union{Nothing, EasyABM.SimplePropGraph{EasyABM.StaticType, EasyABM.SimGType}}

Creates a simple prop graph from a given simple graph created with Graphs.jl.

source
EasyABM.static_dir_graphFunction
static_dir_graph(n::Int64) -> EasyABM.DirPropGraph{EasyABM.StaticType, EasyABM.DirGType}

Creates a directed prop graph with n vertices.

source
static_dir_graph(in_structure::Dict{Int64, Vector{Int64}}) -> Union{Nothing, EasyABM.DirPropGraph{EasyABM.StaticType, EasyABM.DirGType}}

Creates a directed prop graph with given structure.

source
static_dir_graph(A::Matrix{Int64}) -> Union{Nothing, EasyABM.DirPropGraph{EasyABM.StaticType, EasyABM.DirGType}}

Creates a directed prop graph for given Adjacency matrix.

source
static_dir_graph(A::SparseArrays.SparseMatrixCSC{Int64, Int64}) -> Union{Nothing, EasyABM.DirPropGraph{EasyABM.StaticType, EasyABM.DirGType}}

Creates a directed prop graph for adjacency matrix given as a Sparse Matrix.

source
static_dir_graph(g::Graphs.SimpleGraphs.SimpleDiGraph{Int64}) -> Union{Nothing, EasyABM.DirPropGraph{EasyABM.StaticType, EasyABM.DirGType}}

Creates a directed prop graph for a given directed graph created with Graphs.jl.

source
EasyABM.dynamic_simple_graphFunction
dynamic_simple_graph(n::Int64) -> EasyABM.SimplePropGraph{EasyABM.MortalType, EasyABM.SimGType}

Creates a simple prop graph with n vertices.

source
dynamic_simple_graph(structure::Dict{Int64, Vector{Int64}}) -> Union{Nothing, EasyABM.SimplePropGraph{EasyABM.MortalType, EasyABM.SimGType}}

Creates a simple prop graph with given structure.

source
dynamic_simple_graph(A::Matrix{Int64}) -> Union{Nothing, EasyABM.SimplePropGraph{EasyABM.MortalType, EasyABM.SimGType}}

Creates a simple prop graph for given Adjacency matrix.

source
dynamic_simple_graph(A::SparseArrays.SparseMatrixCSC{Int64, Int64}) -> Union{Nothing, EasyABM.SimplePropGraph{EasyABM.MortalType, EasyABM.SimGType}}

Creates a simple prop graph for adjacency_matrix given as a Sparse Matrix.

source
dynamic_simple_graph(g::Graphs.SimpleGraphs.SimpleGraph{Int64}) -> Union{Nothing, EasyABM.SimplePropGraph{EasyABM.MortalType, EasyABM.SimGType}}

Creates a simple prop graph from a given simple graph created with Graphs.jl.

source
EasyABM.dynamic_dir_graphFunction
dynamic_dir_graph(n::Int64) -> EasyABM.DirPropGraph{EasyABM.MortalType, EasyABM.DirGType}

Creates a directed prop graph with n vertices.

source
dynamic_dir_graph(in_structure::Dict{Int64, Vector{Int64}}) -> Union{Nothing, EasyABM.DirPropGraph{EasyABM.MortalType, EasyABM.DirGType}}

Creates a directed prop graph with given structure.

source
dynamic_dir_graph(A::Matrix{Int64}) -> Union{Nothing, EasyABM.DirPropGraph{EasyABM.MortalType, EasyABM.DirGType}}

Creates a directed prop graph for given Adjacency matrix.

source
dynamic_dir_graph(A::SparseArrays.SparseMatrixCSC{Int64, Int64}) -> Union{Nothing, EasyABM.DirPropGraph{EasyABM.MortalType, EasyABM.DirGType}}

Creates a directed prop graph for adjacency matrix given as a Sparse Matrix.

source
dynamic_dir_graph(g::Graphs.SimpleGraphs.SimpleDiGraph{Int64}) -> Union{Nothing, EasyABM.DirPropGraph{EasyABM.MortalType, EasyABM.DirGType}}

Creates a directed prop graph for a given directed graph created with Graphs.jl.

source
EasyABM.convert_typeFunction
convert_type(graph::EasyABM.SimplePropGraph, w::EasyABM.MType) -> EasyABM.SimplePropGraph{_A, EasyABM.SimGType} where _A
source
convert_type(graph::EasyABM.DirPropGraph, w::EasyABM.MType) -> EasyABM.DirPropGraph{_A, EasyABM.DirGType} where _A
source
EasyABM.add_node!Function
add_node!(model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}) -> Int64

Adds a node with properties specified in kwargs to the model's graph.

source
add_node!(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
EasyABM.add_nodes!Function
add_nodes!(n, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}})

Adds n nodes with properties specified in kwargs to the model's graph.

source
add_nodes!(n, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
EasyABM.kill_node!Function
kill_node!(node, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}) -> Union{Nothing, Int64}

Removes a node from model graph. For performance reasons the function does not check if the node contains the node so it will throw an error if the user tries to delete a node which is not there. Also the node will not be deleted if the agents in the model can not be killed and the number of agents at the given node is nonzero.

source
kill_node!(node, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
EasyABM.create_edge!Function
create_edge!(i, j, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}})

Adds an edge with properties kwargs to model graph.

source
create_edge!(edge, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}})

Adds an edge with properties kwargs to model graph.

source
create_edge!(i, j, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
create_edge!(edge, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
EasyABM.kill_edge!Function
kill_edge!(i, j, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}) -> Union{Nothing, EasyABM.PropDataDict{Symbol, Any}}

Removes edge from the model graph.

source
kill_edge!(edge, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}) -> Union{Nothing, EasyABM.PropDataDict{Symbol, Any}}

Removes edge from the model graph.

source
kill_edge!(i, j, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
kill_edge!(edge, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
EasyABM.kill_all_edges!Function
kill_all_edges!(model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}})

Removes all edges from the model graph.

source
kill_all_edges!(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
EasyABM.flush_graph!Function
flush_graph!(model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}}) -> Int64

Removes the graph and all of related data completely.

source
flush_graph!(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
source
Missing docstring.

Missing docstring for is_directed. Check Documenter's build log for details.

EasyABM.verticesFunction
vertices(g::EasyABM.SimplePropGraph) -> Base.Generator{Vector{Int64}, typeof(identity)}
source
vertices(g::EasyABM.DirPropGraph) -> Base.Generator{Vector{Int64}, typeof(identity)}
source
Missing docstring.

Missing docstring for edges. Check Documenter's build log for details.

Missing docstring.

Missing docstring for recompute_graph_layout. Check Documenter's build log for details.

Helper functions for agents

EasyABM.get_grid_locFunction
get_grid_loc(agent::EasyABM.Agent2D{<:Float64}) -> Tuple{Int64, Int64}

Returns grid location of the agent.

source
get_grid_loc(agent::EasyABM.Agent2D{Int64}) -> Vect{2, <:Int64}

Returns grid location of the agent.

source
get_grid_loc(agent::EasyABM.Agent3D{<:Float64}) -> Tuple{Int64, Int64, Int64}

Returns grid location of the agent.

source
get_grid_loc(agent::EasyABM.Agent3D{Int64}) -> Vect{3, <:Int64}

Returns grid location of the agent.

source
EasyABM.agents_atFunction
agents_at(patch, model::EasyABM.SpaceModel2D) -> Base.Generator

Returns list of agents at a given patch.

source
agents_at(patch, model::EasyABM.SpaceModel3D) -> Base.Generator

Returns list of agents at a given patch.

source
agents_at(node, model::EasyABM.GraphModel{EasyABM.MortalType, T<:EasyABM.MType}) -> Base.Generator

Returns list of agents at a given node.

source
agents_at(node, model::EasyABM.GraphModel{EasyABM.StaticType, T<:EasyABM.MType}) -> Base.Generator

Returns list of agents at a given node.

source
EasyABM.num_agents_atFunction
num_agents_at(patch, model::EasyABM.AbstractSpaceModel) -> Int64

Returns number of agents at a given patch.

source
num_agents_at(node, model::EasyABM.AbstractGraphModel) -> Int64

Returns number of agents at a given node.

source
EasyABM.agent_with_idFunction
agent_with_id(i::Int64, model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Union{Nothing, EasyABM.Agent2D{S, P, EasyABM.MortalType} where {S<:Union{Float64, Int64}, P<:EasyABM.SType}}

Returns agent having given id.

source
agent_with_id(i::Int64, model::EasyABM.SpaceModel2D{EasyABM.StaticType}) -> Union{Nothing, EasyABM.Agent2D{S, P, EasyABM.StaticType} where {S<:Union{Float64, Int64}, P<:EasyABM.SType}}

Returns agent having given id.

source
agent_with_id(i::Int64, model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Union{Nothing, EasyABM.Agent3D{S, P, EasyABM.MortalType} where {S<:Union{Float64, Int64}, P<:EasyABM.SType}}

Returns agent having given id.

source
agent_with_id(i::Int64, model::EasyABM.SpaceModel3D{EasyABM.StaticType}) -> Union{Nothing, EasyABM.Agent3D{S, P, EasyABM.StaticType} where {S<:Union{Float64, Int64}, P<:EasyABM.SType}}

Returns agent having given id.

source
agent_with_id(i::Int64, model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.MortalType}) -> Union{Nothing, EasyABM.GraphAgent{T, EasyABM.MortalType} where T<:EasyABM.MType}

Returns agent having given id.

source
agent_with_id(i::Int64, model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.StaticType}) -> Union{Nothing, EasyABM.GraphAgent{T, EasyABM.StaticType} where T<:EasyABM.MType}

Returns agent having given id.

source
EasyABM.is_aliveFunction
is_alive(agent::EasyABM.AbstractPropDict) -> Bool

Returns true if agent is alive else returns false.

source
is_alive(node, model::EasyABM.AbstractGraphModel) -> Bool

Returns true if a node is alive else returns false.

source
EasyABM.get_agentsFunction
get_agents(model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}, condition::Function) -> Base.Iterators.Filter
source
get_agents(model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Base.Iterators.Filter{EasyABM.var"#176#178"}
source
get_agents(model::EasyABM.SpaceModel2D{EasyABM.StaticType}, condition::Function) -> Base.Iterators.Filter
source
get_agents(model::EasyABM.SpaceModel2D{EasyABM.StaticType}) -> Base.Generator{_A, typeof(identity)} where _A
source
get_agents(model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:(Union{Int64, var"#s211"} where var"#s211"<:Float64), P<:EasyABM.SType}, condition::Function) -> Base.Iterators.Filter
source
get_agents(model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:(Union{Int64, var"#s211"} where var"#s211"<:Float64), P<:EasyABM.SType}) -> Base.Iterators.Filter{EasyABM.var"#301#303"}
source
get_agents(model::EasyABM.SpaceModel3D{EasyABM.StaticType}, condition::Function) -> Base.Iterators.Filter
source
get_agents(model::EasyABM.SpaceModel3D{EasyABM.StaticType}) -> Base.Generator{_A, typeof(identity)} where _A
source
get_agents(model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.MortalType}, condition::Function) -> Base.Iterators.Filter
source
get_agents(model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.MortalType}) -> Base.Iterators.Filter{EasyABM.var"#550#552"}
source
get_agents(model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.StaticType}, condition::Function) -> Base.Iterators.Filter
source
get_agents(model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.StaticType}) -> Base.Generator{_A, typeof(identity)} where _A
source
EasyABM.num_agentsFunction
num_agents(model::Union{EasyABM.AbstractGraphModel, EasyABM.AbstractSpaceModel}, condition::Function) -> Any
source
num_agents(model::Union{EasyABM.AbstractGraphModel, EasyABM.AbstractSpaceModel}) -> Int64
source
EasyABM.kill_agent!Function
kill_agent!(agent::EasyABM.AbstractAgent, model::EasyABM.AbstractSpaceModel{EasyABM.MortalType}) -> Union{Nothing, Int64}

Sets the agent as inactive thus effectively removing from the model. However, the removed agents are permanently removed from the list model.agents only once after the step_rule.

source
kill_agent!(agent::EasyABM.AbstractAgent, model::EasyABM.AbstractSpaceModel{EasyABM.StaticType})
source

Sets the agent as inactive thus effectively removing from the model. However, the removed agents are permanently removed from the list model.agents only after each step.

source
kill_agent!(agent::EasyABM.AbstractAgent, model::EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.StaticType})
source
EasyABM.add_agent!Function
add_agent!(agent, model::EasyABM.AbstractSpaceModel{EasyABM.StaticType})
source
add_agent!(agent, model::EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.StaticType})
source
add_agent!(agent, model::EasyABM.SpaceModel2D{EasyABM.MortalType}) -> Union{Nothing, Int64}

Adds the agent to the model.

source
add_agent!(agent, model::EasyABM.SpaceModel3D{EasyABM.MortalType}) -> Union{Nothing, Int64}

Adds the agent to the model.

source
add_agent!(agent, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}}) -> Union{Nothing, Int64}

Adds the agent to the model.

source

Functions for getting neighbor agents.

EasyABM.neighborsFunction
neighbors(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Any
neighbors(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}, dist::Real) -> Any

Returns active neighboring agents to given agent within euclidean distance dist.

source
neighbors(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.StaticType}) -> Base.Iterators.Filter
neighbors(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.StaticType}, dist::Real) -> Base.Iterators.Filter

Returns active neighboring agents to given agent within euclidean distance dist.

source
neighbors(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Any
neighbors(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}, dist::Real) -> Any

Returns active neighboring agents to given agent within euclidean distance dist.

source
neighbors(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.StaticType}) -> Base.Iterators.Filter
neighbors(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.StaticType}, dist::Real) -> Base.Iterators.Filter

Returns active neighboring agents to given agent within euclidean distance dist.

source
neighbors(agent::EasyABM.GraphAgent, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}}) -> Union{Base.Generator{UnitRange{Int64}, typeof(identity)}, Base.Iterators.Flatten}

Returns agents on neighboring nodes of given agent.

source
neighbors(agent::EasyABM.GraphAgent, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}) -> Base.Iterators.Flatten

Returns agents on neighboring nodes of given agent.

source
EasyABM.in_neighborsFunction
in_neighbors(agent::EasyABM.GraphAgent, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}}) -> Union{Base.Generator{UnitRange{Int64}, typeof(identity)}, Base.Iterators.Flatten}

Returns agents on neighboring incoming nodes of given agent.

source
in_neighbors(agent::EasyABM.GraphAgent, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}) -> Base.Iterators.Flatten

Returns agents on neighboring incoming nodes of given agent.

source
EasyABM.out_neighborsFunction
out_neighbors(agent::EasyABM.GraphAgent, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}}) -> Union{Base.Generator{UnitRange{Int64}, typeof(identity)}, Base.Iterators.Flatten}

Returns agents on neighboring outgoing nodes of given agent.

source
out_neighbors(agent::EasyABM.GraphAgent, model::Union{EasyABM.GraphModel{EasyABM.MortalType, EasyABM.StaticType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}) -> Base.Iterators.Flatten

Returns agents on neighboring outgoing nodes of given agent.

source
EasyABM.neighbors_mooreFunction
neighbors_moore(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Base.Generator
neighbors_moore(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}, dist::Int64) -> Base.Generator
source
neighbors_moore(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.StaticType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Base.Generator{Vector{Int64}}
neighbors_moore(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.StaticType, S<:Union{Float64, Int64}, P<:EasyABM.SType}, dist::Int64) -> Base.Generator{Vector{Int64}}
source
neighbors_moore(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Base.Generator
neighbors_moore(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}, dist::Int64) -> Base.Generator
source
neighbors_moore(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.StaticType}) -> Base.Generator{Vector{Int64}}
neighbors_moore(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.StaticType}, dist::Int64) -> Base.Generator{Vector{Int64}}
source
EasyABM.neighbors_neumannFunction
source
neighbors_neumann(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.StaticType}) -> Base.Generator{Vector{Int64}}
neighbors_neumann(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D{EasyABM.StaticType}, dist::Int64) -> Base.Generator{Vector{Int64}}
source
source
neighbors_neumann(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.StaticType}) -> Base.Generator{Vector{Int64}}
neighbors_neumann(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D{EasyABM.StaticType}, dist::Int64) -> Base.Generator{Vector{Int64}}
source

Helper functions for patches, nodes, edges

EasyABM.is_occupiedFunction
is_occupied(patch, model::EasyABM.AbstractSpaceModel) -> Any

Returns true if a patch is occupied.

source
is_occupied(node, model::EasyABM.AbstractGraphModel) -> Any

Returns true if a node is occupied.

source
EasyABM.get_nodepropFunction
get_nodeprop(key::Symbol, node::Int64, model::EasyABM.GraphModel) -> Any

Returns the value for given property name for a node.

source
EasyABM.get_edgepropFunction
get_edgeprop(key::Symbol, i::Int64, j::Int64, model::EasyABM.GraphModel) -> Any

Returns the value for given property name for an edge.

source
get_edgeprop(key::Symbol, edge, model::EasyABM.GraphModel) -> Any

Returns the value for given property name for an edge.

source
EasyABM.set_edgeprops!Function
set_edgeprops!(i::Int64, j::Int64, model::EasyABM.GraphModel)

Sets properties of given edge.

source
set_edgeprops!(edge, model::EasyABM.GraphModel)

Sets properties of given edge.

source
EasyABM.get_patchpropFunction
get_patchprop(key, patch, model::EasyABM.AbstractSpaceModel) -> Any

Returns value of given property of a patch.

source
EasyABM.set_patchprops!Function
set_patchprops!(patch, model::EasyABM.AbstractSpaceModel)

Sets properties of the patch given as keyword arguments.

source
EasyABM.neighbor_nodesFunction
neighbor_nodes(node::Int64, model::EasyABM.GraphModel) -> Vector{Int64}

Returns nodes neighboring given node.

source
neighbor_nodes(agent::EasyABM.GraphAgent, model::EasyABM.GraphModel) -> Vector{Int64}

Returns nodes neighboring node of the given agent.

source
EasyABM.neighbor_patches_mooreFunction

Returns patches neighboring the given agent's patch.

source

Returns patches neighboring the given agent's patch.

source
neighbor_patches_moore(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D) -> Vector{Tuple{Int64, Int64}}
neighbor_patches_moore(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D, dist::Int64) -> Vector{Tuple{Int64, Int64}}

Returns patches neighboring the given patch.

source
neighbor_patches_moore(patch::Tuple{Int64, Int64, Int64}, model::EasyABM.SpaceModel3D{T, S, P<:EasyABM.PeriodicType}) -> Vector{Tuple{Int64, Int64, Int64}}
neighbor_patches_moore(patch::Tuple{Int64, Int64, Int64}, model::EasyABM.SpaceModel3D{T, S, P<:EasyABM.PeriodicType}, dist::Int64) -> Vector{Tuple{Int64, Int64, Int64}}

Returns patches neighboring given agent's patch.

source

Returns patches neighboring given agent's patch.

source
neighbor_patches_moore(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D) -> Vector{Tuple{Int64, Int64, Int64}}
neighbor_patches_moore(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D, dist::Int64) -> Vector{Tuple{Int64, Int64, Int64}}

Returns patches neighboring the given patch.

source
EasyABM.neighbor_patches_neumannFunction
neighbor_patches_neumann(patch::Tuple{Int64, Int64}, model::EasyABM.SpaceModel2D{T, S, P<:EasyABM.PeriodicType}) -> Vector{Tuple{Int64, Int64}}
neighbor_patches_neumann(patch::Tuple{Int64, Int64}, model::EasyABM.SpaceModel2D{T, S, P<:EasyABM.PeriodicType}, dist::Int64) -> Vector{Tuple{Int64, Int64}}

Returns patches neighboring the given agent's patch.

source
neighbor_patches_neumann(patch::Tuple{Int64, Int64}, model::EasyABM.SpaceModel2D{T, S, P<:EasyABM.NPeriodicType}) -> Vector{Tuple{Int64, Int64}}
neighbor_patches_neumann(patch::Tuple{Int64, Int64}, model::EasyABM.SpaceModel2D{T, S, P<:EasyABM.NPeriodicType}, dist::Int64) -> Vector{Tuple{Int64, Int64}}

Returns patches neighboring the given agent's patch.

source
neighbor_patches_neumann(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D) -> Vector{Tuple{Int64, Int64}}
neighbor_patches_neumann(agent::EasyABM.Agent2D, model::EasyABM.SpaceModel2D, dist::Int64) -> Vector{Tuple{Int64, Int64}}

Returns patches neighboring the given patch.

source
neighbor_patches_neumann(patch::Tuple{Int64, Int64, Int64}, model::EasyABM.SpaceModel3D{T, S, P<:EasyABM.NPeriodicType}) -> Vector{Tuple{Int64, Int64, Int64}}
neighbor_patches_neumann(patch::Tuple{Int64, Int64, Int64}, model::EasyABM.SpaceModel3D{T, S, P<:EasyABM.NPeriodicType}, dist::Int64) -> Vector{Tuple{Int64, Int64, Int64}}

Returns patches neighboring given agent's patch.

source
neighbor_patches_neumann(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D) -> Vector{Tuple{Int64, Int64, Int64}}
neighbor_patches_neumann(agent::EasyABM.Agent3D, model::EasyABM.SpaceModel3D, dist::Int64) -> Vector{Tuple{Int64, Int64, Int64}}

Returns patches neighboring the given patch.

source
EasyABM.in_neighbor_nodesFunction
in_neighbor_nodes(node::Int64, model::EasyABM.GraphModel) -> Vector{Int64}

Returns nodes of incoming edges at given node.

source
in_neighbor_nodes(agent::EasyABM.GraphAgent, model::EasyABM.GraphModel) -> Vector{Int64}

Returns nodes of incoming edges at given agent's node.

source
EasyABM.out_neighbor_nodesFunction
out_neighbor_nodes(node::Int64, model::EasyABM.GraphModel) -> Vector{Int64}

Returns nodes of outgoing edges at given node.

source
out_neighbor_nodes(agent::EasyABM.GraphAgent, model::EasyABM.GraphModel) -> Vector{Int64}

Returns nodes of outgoing edges at given agent's node.

source
EasyABM.get_nodesFunction
get_nodes(model::EasyABM.GraphModel, condition::Function) -> Base.Iterators.Filter
source
get_nodes(model::EasyABM.GraphModel) -> Base.Generator{_A, typeof(identity)} where _A
source
EasyABM.num_nodesFunction
num_nodes(model::EasyABM.GraphModel, condition::Function) -> Int64
source
num_nodes(model::EasyABM.GraphModel) -> Int64
source
EasyABM.get_edgesFunction
get_edges(model::EasyABM.GraphModel, condition::Function) -> Base.Iterators.Filter
source
get_edges(model::EasyABM.GraphModel) -> Base.Iterators.Flatten
source
EasyABM.num_edgesFunction
num_edges(model::EasyABM.GraphModel, condition::Function) -> Int64
source
num_edges(model::EasyABM.GraphModel) -> Int64
source
EasyABM.get_patchesFunction
get_patches(model::EasyABM.AbstractSpaceModel, condition::Function) -> Base.Iterators.Filter

Returns patches satisfying the given condition.

source
get_patches(model::EasyABM.AbstractSpaceModel) -> Base.Generator{_A, typeof(identity)} where _A

Returns patches satisfying the given condition.

source
EasyABM.num_patchesFunction
num_patches(model::EasyABM.AbstractSpaceModel, condition::Function) -> Int64

Returns number of patches satisfying given condition.

source
num_patches(model::EasyABM.AbstractSpaceModel) -> Int64

Returns number of patches satisfying given condition.

source
EasyABM.get_random_patchFunction
get_random_patch(model::EasyABM.AbstractSpaceModel, condition::Function) -> Any

Returns patches satisfying the given condition.

source
get_random_patch(model::EasyABM.AbstractSpaceModel) -> Any

Returns patches satisfying the given condition.

source
EasyABM.random_empty_nodeFunction
random_empty_node(model::EasyABM.AbstractGraphModel) -> Any

Returns an empty node chosen at random. Returns nothing if there is no empty node.

source
EasyABM.random_empty_patchFunction
random_empty_patch(model::EasyABM.SpaceModel2D) -> Union{Nothing, Tuple{Int64, Int64}}

Returns a random patch where no agents are present. Rerurns nothing if there is no such patch.

source
random_empty_patch(model::EasyABM.SpaceModel3D) -> Union{Nothing, Tuple{Int64, Int64, Int64}}

Returns a random patch where no agents are present. Returns nothing if there is no such patch.

source

Misc. utility functions

EasyABM.dotprodFunction
dotprod(a::Vect{N}, b::Vect{N}) -> Any
source
dotprod(a::Tuple{Vararg{var"#s16", N}} where var"#s16"<:Union{Float64, Integer}, b::Tuple{Vararg{var"#s38", N}} where var"#s38"<:Union{Float64, Integer}) -> Any
source
dotprod(a::Union{EasyABM.AbstractAgent2D, EasyABM.AbstractAgent3D}, b::Union{EasyABM.AbstractAgent2D, EasyABM.AbstractAgent3D}) -> Any
source
EasyABM.distanceFunction
distance(a::GeometryBasics.Vec, b::GeometryBasics.Vec) -> Any
source
distance(a::Tuple{Vararg{Union{Float64, Integer}, N}}, b::Tuple{Vararg{Union{Float64, Integer}, N}}) -> Any
source
EasyABM.calculate_directionFunction
calculate_direction(vel::Union{Tuple{T<:Real, T<:Real}, Vect{2, T<:Real}}) -> Any
source
calculate_direction(vel::Union{Tuple{T<:Real, T<:Real, T<:Real}, Vect{3, T<:Real}}) -> Any
source
Missing docstring.

Missing docstring for Col. Check Documenter's build log for details.

Missing docstring.

Missing docstring for @cl_str. Check Documenter's build log for details.

Index