-
Notifications
You must be signed in to change notification settings - Fork 24
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's located outside of env bounds read from some bins twice during spatial partitioning. #13
Comments
Needs to have assertion errors to stop users from allowing agents to create messages outside of the bounds of the message environment. Will be integrated in version 2. |
Snip
|
Managed to get XLST math to work correctly with alot of trial and error (removing the <!--Compile time error if partitioning radius is not a factor of the partitioning dimensions as this causes partioning to execute incorrectly-->
<xsl:for-each select="gpu:xmodel/xmml:messages/gpu:message/gpu:partitioningSpatial">
<xsl:if test="(//gpu:xmax - //gpu:xmin) != (floor((//gpu:xmax - //gpu:xmin ) div //gpu:radius ) * //gpu:radius)">
#error "Partitioning radius must be a factor of partitioning dimensions.\nRadius: <xsl:value-of select="gpu:radius"/>, Xmin: <xsl:value-of select="gpu:xmin"/>, Xmax: <xsl:value-of select="gpu:xmax"/>"
</xsl:if><xsl:if test="(//gpu:ymax - //gpu:ymin) != (floor((//gpu:ymax - //gpu:ymin ) div //gpu:radius ) * //gpu:radius)">
#error "Partitioning radius must be a factor of partitioning dimensions.\nRadius: <xsl:value-of select="gpu:radius"/>, Ymin: <xsl:value-of select="gpu:ymin"/>, Ymax: <xsl:value-of select="gpu:ymax"/>"
</xsl:if><xsl:if test="(//gpu:zmax - //gpu:zmin) != (floor((//gpu:zmax - //gpu:zmin ) div //gpu:radius ) * //gpu:radius)">
#error "Partitioning radius must be a factor of partitioning dimensions.\nRadius: <xsl:value-of select="gpu:radius"/>, Zmin: <xsl:value-of select="gpu:zmin"/>, Zmax: <xsl:value-of select="gpu:zmax"/>"
</xsl:if>
</xsl:for-each> |
Just updated the fix for this (and overwrote the prev fix). Discussion with Paul clarified that I tested it again without the slashes, and the earlier error seems to have disappeared, so presumably I fixed whatever was causing that (potentially incorrect division, although that would mean it doesn't parse L2R) whilst arranging the rest of the algorithm. |
If an agent is located outside of the environmental bounds
min<= x <max
their grid location is wrapped. Due to the wrapping only replacing out of bounds locations with the opposite bound, an agent that is out of bounds, can search further out of bounds cells, causing both cells to be 'wrapped' to the same cell.Hence causing the agent to double dip.
Potential fixes:
+radius
(and potentially decrease min by the same)The text was updated successfully, but these errors were encountered: