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

Minor fixes and refactoring on local search and genetic algorithms #141

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

nhuet
Copy link
Contributor

@nhuet nhuet commented Jan 8, 2024

  • Remove unused nb_solutions attribute from local search solvers
  • Remove current_solution and current_objective from RestartHandlerLimit.__init__():
    objective was already overwritten during local search algo's solve() and generally badly initialized in examples (using model.evaluate() which gives a dictionary instead of a fitness value).
  • Make local search solvers and genetic algorithms derive from SolverDO.

nhuet added 2 commits January 8, 2024 15:41
…t.__init__()

Indeed:
- the objective is systematically overwritten before first iteration in local
  search algorithms (only places used: SimulatedAnnealing, HillClimber,
  and HillClimberPareto), and the corresponding solution is available at
  that point, so we can fill it then
- the objective was generally bad initialized using model.evaluate
  (which gives a dictionary) instead of
  aggreg_from_dict_values(model.evaluate()) at is correctly done inside
  local search algos.
@nhuet nhuet marked this pull request as draft January 8, 2024 15:24
@nhuet nhuet changed the title Minor fixes and refactoring on local search algorithms Minor fixes and refactoring on local search and genetic algorithms Jan 9, 2024
@nhuet nhuet marked this pull request as ready for review January 9, 2024 13:20
@g-poveda g-poveda merged commit f62faf6 into airbus:master Jan 9, 2024
19 checks passed
@nhuet nhuet deleted the local-search branch January 12, 2024 13:07
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