and then following the code snippets given in that example. However, after start the animation I get the above mentioned error message: UndefVarError: plotabm not defined.
I’m getting the same error: UndefVarError: plotabm not defined
I downloaded Agents.jl yesterday, after the discontinuation of AgentsPlots, but I tried ] up anyway and it didn’t help. Any ideas?
especially when working with Agents.jl the following packages I am using:
using Agents
using Plots
pyplot()
using DataFrames
using Statistics
using Random
using LightGraphs
using Distributions
using DrWatson
using LinearAlgebra
OK. The fixes for those things are in the subsequent patches, so we need to get you on 4.0.4.
Why ] up isn’t working is what we need to find out. Possibly there’s something in the manifest is causing issues.
Some things to try:
Don’t use the global environment for everything. Create a folder for your project, cd to it and do ] activate ., then ] add Agents and the packages you need for the project.
If you don’t want to do that, at least do ] activate --temp and add Agents there to see if 4.0.4 will load in a clean environment.
If either of these work it’s an issue with your manifest. Try removing Agents, do an update and add it again.
Great thanks. I tried what you suggested and there was some issue, because I could install 4.0.4 in a new environment. I ended up just reinstalling Julia from scratch and now plotabm is working.
However I still get an error with the @agent macro. When I run
@agent SchellingAgent GridAgent{2}
mood::Bool
group::Int
end
I get this error:
LoadError: MethodError: no method matching @agent(::LineNumberNode, ::Module, ::Symbol, ::Expr)
Closest candidates are:
@agent(::LineNumberNode, ::Module, ::Any, ::Any, !Matched::Any) at /Users/jzkelter/.julia/packages/Agents/BfSXk/src/core/agents.jl:59
in expression starting at In[13]:7
Stacktrace:
[1] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091