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

Wrapped continuous spatial messaging #185

Closed
Robadob opened this issue Feb 19, 2020 · 3 comments · Fixed by #794
Closed

Wrapped continuous spatial messaging #185

Robadob opened this issue Feb 19, 2020 · 3 comments · Fixed by #794
Labels
Priority: Low v1.5-parity Issues related to FLAME GPU 1 parity.

Comments

@Robadob
Copy link
Member

Robadob commented Feb 19, 2020

Following #30, spatial messaging was added, however unlike FGPU1 new spatial doesn't currently support wrapping over environment bounds.

Wasn't added at the time as it doesn't fit well alongside strips optimisation, and best implementation would require a whole new version, rather than a device side flag/branch. This could be written within an hour or so, but seems overkill unless required.

Robadob added a commit that referenced this issue Feb 19, 2020
Changelog:
Adds 3D spatial messaging, with Circles example
Adds 2D spatial messaging
Adds FGPU1 behaviour, whereby outputting to a message list twice in an iteration causes the message list to be appended.
Adds exceptions, thrown when incorrect message type is bound
Adds exceptions, thrown if min/max/radius for spatial messages are invalid
Thorough unit testing
Documentation
Note:
This does not support wrapped spatial communication (as found in FLAMEGPU1).
Closes #30
Opens #185
mondus pushed a commit that referenced this issue Feb 20, 2020
Changelog:
Adds 3D spatial messaging, with Circles example
Adds 2D spatial messaging
Adds FGPU1 behaviour, whereby outputting to a message list twice in an iteration causes the message list to be appended.
Adds exceptions, thrown when incorrect message type is bound
Adds exceptions, thrown if min/max/radius for spatial messages are invalid
Thorough unit testing
Documentation
Note:
This does not support wrapped spatial communication (as found in FLAMEGPU1).
Closes #30
Opens #185
@ptheywood
Copy link
Member

Also add a reserved distance variable for warpped spatial messages.

Either a branch or templated specialisation.

@ptheywood ptheywood added this to the FGPU1 Parity milestone Mar 9, 2021
@ptheywood
Copy link
Member

To match array messaging, this would be accessed via FLAMEGPU->message_in.wrap() which returns a specialised message iterator which performs the wrapping.

For 2D and 3D spatial, providing partially wrapped iterators for cyclindrical / toridal environments may be required (but potentailly be a separate issue / feature, see #593 for reference)

@ptheywood ptheywood added the v1.5-parity Issues related to FLAME GPU 1 parity. label Aug 11, 2021
@ptheywood ptheywood modified the milestones: FLAME GPU 1.5 Feature Parity, v2.0.0-alpha.N Aug 11, 2021
@mondus
Copy link
Member

mondus commented Feb 16, 2022

Some thoughts on continuing this;

  • Agents generally should stay within bounds and we can claim that messages outside of bounds are undefined behaviour.
  • For wrapped. If values are outside of bounds when reading then they should be clamped by the user first. The wrapped iterator can then perform a check behind seatbelts for the undefined behaviour.
  • Wrapping distance returned by iterator will always be the short distance
  • Messages read over a boundary will have their original x, y, z positions
  • The message type should have extra functions to provide virtual_x, virtual_y, virtual_z so that direction vectors can be calculated. The virtual position is the position if the message is moved to a halo region. The alternative would be to provide a relative position.

We have discounted the idea of a separate messaging type due to the amount of shared code that would be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low v1.5-parity Issues related to FLAME GPU 1 parity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants