Skip to content

FLEXSIM-12564: Fix PreferredPath to avoid modifying grid passability#20

Open
stamboli-autodesk wants to merge 1 commit intorelease/25.0from
sahil.tamboli/FLEXSIM-12564
Open

FLEXSIM-12564: Fix PreferredPath to avoid modifying grid passability#20
stamboli-autodesk wants to merge 1 commit intorelease/25.0from
sahil.tamboli/FLEXSIM-12564

Conversation

@stamboli-autodesk
Copy link
Copy Markdown
Collaborator

This pull request simplifies the addPassagesToTable method in PreferredPath.cpp by removing unused variables and redundant logic related to direction flags. The main focus is on streamlining the lambda function passed to visitGridModelLine and cleaning up the code that sets directional movement flags.

Code simplification and cleanup:

  • Removed unused lambda captures (dx, dy, fromRow, fromCol, toRow, toCol) from the lambda function in the call to grid->visitGridModelLine, making the function signature cleaner and easier to maintain.
  • Deleted redundant code that set the canGoRight, canGoLeft, canGoUp, and canGoDown flags on AStarNode based on direction and position, as well as the related isStart and isEnd checks. This reduces complexity and potential maintenance issues.

Fixes : A*Star grid bug with twoway preferred paths [FLEXSIM-12564]

Removed logic that set canGoRight, canGoLeft, canGoUp, and canGoDown flags on AStarNode objects during preferred path processing.
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.

1 participant