Get metric value in script

I have setup a metric in which I am averaging an attribute and can see the value in a plot. Is there a way to access this value in a script? Thanks.

We don’t support this at the moment, but its a feature we’re considering adding.

There is a work around however where you can create an agent with a large “search_radius” parameter, and call context.neighbors() to get all of the other agents in the simulation and calculate the relevant metric within the agent.

I didn’t know about the agent specific search radius. That answers my follow up question. Thanks!

1 Like