Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

Hi @fl-hat !

Please make sure to update to the latest version (0.1.2), as to_list is a new feature.

I think it should work with the following:

nearby_agents = self.mymodel.space.select(midpoint, search_radius)
nearby_agents = nearby_agents.to_list()

Or with just one line:

nearby_agents = self.mymodel.space.select(midpoint, search_radius).to_list()

To improve performance, you could consider to put your resources in a separate Space, so that you don't have to select the resources (i.e. your third line of code) every time. E.g. you could have an agent_space and a resource_space.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@fl-hat
Comment options

@jofmi
Comment options

Answer selected by jofmi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
2 participants