Skip to content
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 Sorting #723

Merged
merged 23 commits into from
Nov 30, 2021
Merged

Agent Sorting #723

merged 23 commits into from
Nov 30, 2021

Conversation

MILeach
Copy link
Collaborator

@MILeach MILeach commented Oct 27, 2021

This PR includes support for sorting agents which use spatial messaging by their position to accelerate message read times.

  • Identify where sorting should take place
  • Explore options for sorting - manual vs host API
  • Automatically detect/create necessary variables
  • Warning if required environment vars for sorting aren't set
  • Implement sort for default state agents
  • Add interface for controlling sorting frequency
  • Support all agent states
  • Move sort from beginning of step to most optimal point, i.e. before read takes place per agent function
  • Add required method to message types to query whether sorting is required
  • Visual inspection to confirm behaviour is still correct
  • Add unit tests

Initial results show that the ideal sorting frequency depends on the model, both boids and circles have achieved a runtime improvement in the range of 20%-40% depending on sort frequency.

@MILeach MILeach self-assigned this Oct 27, 2021
Copy link
Member

@mondus mondus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest that each of the unit tests gives a descriptive comment to what the test is doing.

@MILeach MILeach marked this pull request as ready for review November 17, 2021 16:03
@ptheywood ptheywood self-requested a review November 17, 2021 16:05
Copy link
Member

@Robadob Robadob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be on the wrong page, but I think some of this needs discussion at the next meeting.

@ptheywood ptheywood added this to the v2.0.0-alpha.2 milestone Nov 29, 2021
Copy link
Member

@Robadob Robadob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy, Paul had a few comments at the meeting?

@mondus mondus merged commit 27eec1c into master Nov 30, 2021
@mondus mondus deleted the sorted-agents branch November 30, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants