Skip to content

Enable speed optimisation for a fixed route#195

Merged
kdemmich merged 12 commits intomainfrom
feature/36-speed-fixed-route
Apr 2, 2026
Merged

Enable speed optimisation for a fixed route#195
kdemmich merged 12 commits intomainfrom
feature/36-speed-fixed-route

Conversation

@kdemmich
Copy link
Copy Markdown
Collaborator

@kdemmich kdemmich commented Apr 1, 2026

Related Issue / Discussion:

See internal discussion.

Changes:

  • New class TwoPointCrossoverSpeed
  • New utility functions for speed smoothing in genetic/utils.py
  • New function Genetic.plot_speed_per_generation
  • New function FromGeojsonPopulation.spread_velocity to generate initial population for speed optimisation
  • Modified Genetic.check_consistency (bug fix)
  • Modified GaussianSpeedMutation (added smoothing, adapt parameters)

Further Details:

Summary:

See internal discussion.

Dependencies:

None.

kdemmich added 11 commits March 19, 2026 11:52
Raise ValueErrors for pure speed optimisation if initial population is
not read via geojson and more than one file is provided.
…ation

Every individual of the initial population gets a different, constant
velocity. The velocity values are determined as quantiles from a
gaussian distribution centered around the user-defined boat speed.
A unit test is added, accordingly.
Implement crossover function that replaces the speed of a random
sequence of waypoints of one individual by the average speed of a random
sequence of another individual. Replace SpeedCrossover by
TwoPointCrossoverSpeed as default crossover for speed optimisation.
Adjust parameters n_updates and sigma to reduce strong speed
fluctuations in output routes. Add smoothening function to allow only
speed differences of consecutive waypoints up to a certain limit.
Add tests for: TwoPointCrossoverSpeed, utils.smoothen_speed,
utils.check_speed_diff
@kdemmich kdemmich force-pushed the feature/36-speed-fixed-route branch from bf2093a to 34d8350 Compare April 1, 2026 12:18
@kdemmich kdemmich marked this pull request as ready for review April 2, 2026 11:15
@kdemmich kdemmich merged commit 469301f into main Apr 2, 2026
1 check passed
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