-
Notifications
You must be signed in to change notification settings - Fork 883
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
Agent.die() #2150
Agent.die() #2150
Conversation
…ion, which calculates the next position the agent will move. move_forward function, which moves the agent forward by specified amount. move_backward function, which moves the agent backwards by specified amount. turn_right function, turns the agent right by specified degree. turn_left function, turns the agent left by specified degree.
…d parameters. set_pos function, sets the current position to the specified pos parameter. distancexy function, gives you the distance of the agent and the given coordinate. distance function, gives you the distance between the agent and another agent.
…he grid. towardsxy function, calculates angle between a given coordinate and horizon as if the current position is the origin. towards function, calculates angle between an agent and horizon as if the current position is the origin. facexy function, makes agent face a given coordinate. face function, makes agent face another agent
Those are included in projectmesa#2149
Thanks for this PR! A convenient, complete and robust method to remove agents is certainly useful. I'm only wondering if there aren't redundant elements in this PR. @quaquel if I'm correct, the current weakrefs already do a large part of the heavy lifting, right? Also, we have to make clear how this differs from Lines 67 to 70 in 6507f51
And maybe check if it needs to be removed from AgentSets the agent is part of: Line 316 in 6507f51
|
@catherinedevlin would you like to continue with this PR? If so we can discuss the differences between die and remove. |
Closing for now due to lack of response. If anyone wants to work further on it, feel free to leave a message here! |
Continued from #1354. See also #2149 for the remainder of that PR's methods.
I'm less confident that this PR should me merged, since