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

Multi_Objectives_AStar implementation #1158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JanLucaF
Copy link

Reference issue

What does this implement/fix?

This change implements the A* algorithm, with the additional parameters distance to obstacles and energy costs. This gives the algorithm the ability to choose a path that is far away from obstacles and/or minimizes changes in the direction of movement. Both parameters can be adjusted via a weighting factor between 0 and 1. The path length has also been given a weighting factor.

Additional information

No additional information needed

CheckList

  • Did you add an unittest for your new example or defect fix? No
  • Did you add documents for your new example? No
  • All CIs are green? (You can check it after submitting)

Copy link
Owner

@AtsushiSakai AtsushiSakai left a comment

Choose a reason for hiding this comment

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


# Calculate the dot product of the two vectors
dot_product = prev_dx * current_dx + prev_dy * current_dy
prev_length = math.sqrt(prev_dx ** 2 + prev_dy ** 2)

Check warning

Code scanning / CodeQL

Pythagorean calculation with sub-optimal numerics Warning

Pythagorean calculation with sub-optimal numerics.
# Calculate the dot product of the two vectors
dot_product = prev_dx * current_dx + prev_dy * current_dy
prev_length = math.sqrt(prev_dx ** 2 + prev_dy ** 2)
current_length = math.sqrt(current_dx ** 2 + current_dy ** 2)

Check warning

Code scanning / CodeQL

Pythagorean calculation with sub-optimal numerics Warning

Pythagorean calculation with sub-optimal numerics.
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.

2 participants