Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abmexploration() throws exceptions when initialising agent data after all agents were previously #1128

Open
NiallPalfreyman opened this issue Jan 23, 2025 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers / easy to resolve plotting

Comments

@NiallPalfreyman
Copy link

Describe the bug
In Agents version 6.2.1 using abmexploration(), if I am collecting agent data and press the Reset button after all agents were removed on the previous run, it throws a DimensionsMismatch exception.

Minimal Working Example

module Ecosystem
using Agents, GLMakie

@agent struct Turtle(ContinuousAgent{2,Float64})
end

function agent_step!( me::Turtle, model)
    remove_agent!( me, model)
    return
end

xvel( me::Turtle) = me.vel[1]

abm = StandardABM( Turtle, ContinuousSpace((60,60)); agent_step!)
add_agent!( abm; vel=[1,1])
playground, _ = abmexploration( abm; adata=[(xvel, sum)])
display(playground)
end

If the code is runnable, it will help us identify the problem faster.

Agents.jl version

6.2.1

@Datseris Datseris added bug Something isn't working plotting good first issue Good for newcomers / easy to resolve labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers / easy to resolve plotting
Projects
None yet
Development

No branches or pull requests

2 participants