How to create an agent during a simulation #42
Unanswered
notionparallax
asked this question in
Q&A
Replies: 1 comment
-
Hi @notionparallax, I responded on stack overflow :) https://stackoverflow.com/questions/72358308/using-agentpy-how-to-create-an-agent-during-a-simulation/72374989#72374989 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a simple simulation of a company. It is doing a great job of modelling promotions, but I'd also like to be able to model people joining and leaving the company.
Leaving is easy, I can just set a flag to inactive or something, but joining is more complicated. Do I need to make a bunch of agents during setup and set their state to as yet unknown, or can I create an agent during a step and add them in?
The person class is defined like this:
I'm guessing I'd do something with the init, but I've had no luck figuring that out.
This seems similar to #20, but I'm not trying to make different types of agents, but add more of a single type of agent.
I posted this on stack overflow too, before I found this forum.
Beta Was this translation helpful? Give feedback.
All reactions