Skip to content

Agent Speed Only Reflects Initial Conditions and Doesn't Update #1423

Answered by Ozaq
K99-JDG asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @K99-JDG I cannot see any updates to agent speed during the simulation in the code you attached.

Let me explain:
In your 4th cell in the notebook you create multiple simulations and specify the initial conditions for your agents, some (in the hallway, I guess) are assigned the speed of 1.2 m/s while others (in the room to the right) are assigned 0 m/s, i.e. remain stationary.
All of what you do here is setting initial conditions.

The actual simulations are executed later in the 7th cell, i.e.:

while simulation.agent_count() > 0 and simulation.iteration_count() < 7000:
    simulation.iterate()

The code above is correct in the sense that it runs the simulation to completion or at most 70…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@K99-JDG
Comment options

Answer selected by K99-JDG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants