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 - vel : velocity - 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.

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.

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 - vel : velocity - 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.

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.

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 - vel : velocity - 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.

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.

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 - vel : velocity - 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Functions for defining model

EasyABM.create_2d_modelFunction
create_2d_model() -> EasyABM.SpaceModel2D{EasyABM.StaticType, Int64, EasyABM.PeriodicType}
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.
create_3d_model() -> EasyABM.SpaceModel3D{EasyABM.StaticType, Int64, EasyABM.PeriodicType}
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.
create_graph_model(graph::EasyABM.AbstractPropGraph{S<:EasyABM.MType, G<:EasyABM.GType}) -> Union{Nothing, EasyABM.GraphModel{_A, EasyABM.StaticType} where _A<:EasyABM.MType}

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.

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.

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.

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

Runs the simulation for steps number of steps.

run_model!(model::EasyABM.SpaceModel3D)

Runs the simulation for steps number of steps.

run_model!(model::EasyABM.GraphModel)

Runs the simulation for steps number of steps.

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.

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.

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.

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

Draws a specific frame.

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

Draws a specific frame.

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

Draws a specific frame.

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.

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.

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.

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

Creates an interactive app for the model.

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

Creates an interactive app for the model.

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

Creates an interactive app for the model.

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}}
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}}
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}}}
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}}
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}}
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}}
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}}
get_edge_data(i::Int64, j::Int64, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
get_edge_data(i::Int64, j::Int64, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props)
get_edge_data(edge, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
get_edge_data(edge, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props)
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}}
EasyABM.latest_propvalsFunction
latest_propvals(obj::EasyABM.AbstractPropDict, propname::Symbol, n::Int64) -> Any

last recorded (not current) property values.

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

Last recorded property values.

latest_propvals(i::Int64, j::Int64, model::EasyABM.GraphModel, propname::Symbol, n::Int64) -> Any
latest_propvals(edge, model::EasyABM.GraphModel, propname::Symbol, n::Int64) -> Any
EasyABM.propnamesFunction
propnames(obj::Union{EasyABM.AbstractAgent2D, EasyABM.AbstractAgent3D}) -> Vector{Symbol}
propnames(obj::EasyABM.GraphAgent) -> Vector{Symbol}
propnames(obj::EasyABM.AbstractPropDict) -> Vector{Symbol}
EasyABM.get_nums_agentsFunction
get_nums_agents(model::Union{EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.MortalType}, EasyABM.AbstractSpaceModel{EasyABM.MortalType}}, conditions::Function...) -> DataFrames.DataFrame
get_nums_agents(model::Union{EasyABM.AbstractGraphModel{T<:EasyABM.MType, EasyABM.StaticType}, EasyABM.AbstractSpaceModel{EasyABM.StaticType}}, conditions::Function...) -> DataFrames.DataFrame
EasyABM.get_nums_patchesFunction
get_nums_patches(model::EasyABM.AbstractSpaceModel, conditions::Function...) -> DataFrames.DataFrame
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
get_nums_nodes(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, conditions::Function...) -> DataFrames.DataFrame
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
get_nums_edges(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, conditions::Function...) -> DataFrames.DataFrame
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
get_nodes_avg_props(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props::Function...) -> DataFrames.DataFrame
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
get_edges_avg_props(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}}, props::Function...) -> DataFrames.DataFrame
EasyABM.open_modelFunction
open_model() -> Any

Gets the model that was saved before as jld2.

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.

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

Creates a simple prop graph with given structure.

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

Creates a simple prop graph for given Adjacency matrix.

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.

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.

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

Creates a directed prop graph with n vertices.

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.

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

Creates a directed prop graph for given Adjacency matrix.

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.

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.

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

Creates a simple prop graph with n vertices.

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

Creates a simple prop graph with given structure.

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

Creates a simple prop graph for given Adjacency matrix.

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.

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.

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

Creates a directed prop graph with n vertices.

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.

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

Creates a directed prop graph for given Adjacency matrix.

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.

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.

EasyABM.convert_typeFunction
convert_type(graph::EasyABM.SimplePropGraph, w::EasyABM.MType) -> EasyABM.SimplePropGraph{_A, EasyABM.SimGType} where _A
convert_type(graph::EasyABM.DirPropGraph, w::EasyABM.MType) -> EasyABM.DirPropGraph{_A, EasyABM.DirGType} where _A
EasyABM.draw_graph3dFunction
draw_graph3d(graph) -> Union{Nothing, MeshCat.DisplayedVisualizer}
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.

add_node!(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
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.

add_nodes!(n, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
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.

kill_node!(node, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
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.

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.

create_edge!(i, j, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
create_edge!(edge, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
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.

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.

kill_edge!(i, j, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
kill_edge!(edge, model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
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.

kill_all_edges!(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
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.

flush_graph!(model::Union{EasyABM.GraphModel{EasyABM.StaticType, EasyABM.MortalType}, EasyABM.GraphModel{EasyABM.StaticType, EasyABM.StaticType}})
EasyABM.is_digraphFunction
is_digraph(g::EasyABM.SimplePropGraph) -> Bool
is_digraph(g::EasyABM.DirPropGraph) -> Bool
Missing docstring.

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

EasyABM.is_staticFunction
is_static(g::EasyABM.SimplePropGraph{T<:EasyABM.MType}) -> Bool
is_static(g::EasyABM.DirPropGraph{T<:EasyABM.MType}) -> Bool
EasyABM.verticesFunction
vertices(g::EasyABM.SimplePropGraph) -> Base.Generator{Vector{Int64}, typeof(identity)}
vertices(g::EasyABM.DirPropGraph) -> Base.Generator{Vector{Int64}, typeof(identity)}
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.

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

Returns grid location of the agent.

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

Returns grid location of the agent.

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

Returns grid location of the agent.

EasyABM.get_node_locFunction
get_node_loc(agent::EasyABM.GraphAgent) -> Int64

Returns node location of the agent.

EasyABM.get_idFunction
get_id(agent::EasyABM.AbstractAgent) -> Any

Returns agents id.

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

Returns list of agents at a given patch.

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

Returns list of agents at a given patch.

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

Returns list of agents at a given node.

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

Returns list of agents at a given node.

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

Returns number of agents at a given patch.

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

Returns number of agents at a given node.

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.

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.

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.

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.

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.

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.

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

Returns true if agent is alive else returns false.

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

Returns true if a node is alive else returns false.

EasyABM.get_agentsFunction
get_agents(model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}, condition::Function) -> Base.Iterators.Filter
get_agents(model::EasyABM.SpaceModel2D{EasyABM.MortalType, S<:Union{Float64, Int64}, P<:EasyABM.SType}) -> Base.Iterators.Filter{EasyABM.var"#176#178"}
get_agents(model::EasyABM.SpaceModel2D{EasyABM.StaticType}, condition::Function) -> Base.Iterators.Filter
get_agents(model::EasyABM.SpaceModel2D{EasyABM.StaticType}) -> Base.Generator{_A, typeof(identity)} where _A
get_agents(model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:(Union{Int64, var"#s1263"} where var"#s1263"<:Float64), P<:EasyABM.SType}, condition::Function) -> Base.Iterators.Filter
get_agents(model::EasyABM.SpaceModel3D{EasyABM.MortalType, S<:(Union{Int64, var"#s1263"} where var"#s1263"<:Float64), P<:EasyABM.SType}) -> Base.Iterators.Filter{EasyABM.var"#301#303"}
get_agents(model::EasyABM.SpaceModel3D{EasyABM.StaticType}, condition::Function) -> Base.Iterators.Filter
get_agents(model::EasyABM.SpaceModel3D{EasyABM.StaticType}) -> Base.Generator{_A, typeof(identity)} where _A
get_agents(model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.MortalType}, condition::Function) -> Base.Iterators.Filter
get_agents(model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.MortalType}) -> Base.Iterators.Filter{EasyABM.var"#550#552"}
get_agents(model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.StaticType}, condition::Function) -> Base.Iterators.Filter
get_agents(model::EasyABM.GraphModel{T<:EasyABM.MType, EasyABM.StaticType}) -> Base.Generator{_A, typeof(identity)} where _A
EasyABM.num_agentsFunction
num_agents(model::Union{EasyABM.AbstractGraphModel, EasyABM.AbstractSpaceModel}, condition::Function) -> Any
num_agents(model::Union{EasyABM.AbstractGraphModel, EasyABM.AbstractSpaceModel}) -> Int64
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.

kill_agent!(agent::EasyABM.AbstractAgent, model::EasyABM.AbstractSpaceModel{EasyABM.StaticType})
kill_agent!(agent::EasyABM.AbstractAgent, model::EasyABM.AbstractGraphModel{T<:EasyABM.MType, 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 after each step.

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

Adds the agent to the model.

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

Adds the agent to the model.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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
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}}
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
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}}
EasyABM.neighbors_neumannFunction
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}}
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}}

Helper functions for patches, nodes, edges

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

Returns true if a patch is occupied.

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

Returns true if a node is occupied.

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

Returns the value for given property name for a node.

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.

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

Returns the value for given property name for an edge.

EasyABM.set_nodeprops!Function
set_nodeprops!(node::Int64, model::EasyABM.GraphModel)

Sets properties of given node.

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

Sets properties of given edge.

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

Sets properties of given edge.

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

Returns value of given property of a patch.

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

Sets properties of the patch given as keyword arguments.

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

Returns nodes neighboring given node.

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

Returns nodes neighboring node of the given agent.

EasyABM.neighbor_patches_mooreFunction
neighbor_patches_moore(patch::Tuple{Int64, Int64}, model::EasyABM.SpaceModel2D{T, S, P<:EasyABM.PeriodicType}) -> Vector{Tuple{Int64, Int64}}
neighbor_patches_moore(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.

neighbor_patches_moore(patch::Tuple{Int64, Int64}, model::EasyABM.SpaceModel2D{T, S, P<:EasyABM.NPeriodicType}) -> Vector{Tuple{Int64, Int64}}
neighbor_patches_moore(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.

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.

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.

neighbor_patches_moore(patch::Tuple{Int64, Int64, Int64}, model::EasyABM.SpaceModel3D{T, S, P<:EasyABM.NPeriodicType}) -> Vector{Tuple{Int64, Int64, Int64}}
neighbor_patches_moore(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.

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.

EasyABM.neighbor_patches_neumannFunction

Returns patches neighboring the given agent's patch.

Returns patches neighboring the given agent's patch.

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.

Returns patches neighboring given agent's patch.

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.

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

Returns nodes of incoming edges at given node.

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

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

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

Returns nodes of outgoing edges at given node.

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

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

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

Returns patches satisfying the given condition.

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

Returns patches satisfying the given condition.

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

Returns number of patches satisfying given condition.

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

Returns number of patches satisfying given condition.

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

Returns patches satisfying the given condition.

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

Returns patches satisfying the given condition.

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.

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.

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.

Misc. utility functions

EasyABM.dotprodFunction
dotprod(a::Vect{N}, b::Vect{N}) -> Any
dotprod(a::Tuple{Vararg{var"#s1260", N}} where var"#s1260"<:Union{Float64, Integer}, b::Tuple{Vararg{var"#s1259", N}} where var"#s1259"<:Union{Float64, Integer}) -> Any
dotprod(a::Union{EasyABM.AbstractAgent2D, EasyABM.AbstractAgent3D}, b::Union{EasyABM.AbstractAgent2D, EasyABM.AbstractAgent3D}) -> Any
EasyABM.veclengthFunction
veclength(a::GeometryBasics.Vec)
veclength(a::Tuple{Vararg{var"#s1263", N}} where var"#s1263"<:Union{Float64, Integer}) -> Any
EasyABM.distanceFunction
distance(a::GeometryBasics.Vec, b::GeometryBasics.Vec) -> Any
distance(a::Tuple{Vararg{Union{Float64, Integer}, N}}, b::Tuple{Vararg{Union{Float64, Integer}, N}}) -> Any
EasyABM.calculate_directionFunction
calculate_direction(vel::Union{Tuple{T<:Real, T<:Real}, Vect{2, T<:Real}}) -> Any
calculate_direction(vel::Union{Tuple{T<:Real, T<:Real, T<:Real}, Vect{3, T<:Real}}) -> Any
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.

EasyABM.moore_distanceFunction
moore_distance(patch1::Tuple{Vararg{S<:Real, N}}, patch2::Tuple{Vararg{T<:Real, N}}) -> Any

Index