Skip to content

Add harmonix-opt (Harmony Search) as alternative optimizer — harmonix…#1

Open
AutoPyloter wants to merge 1 commit into
SaaadRaaa:mainfrom
AutoPyloter:Refactor-Replace-custom-Genetic-Algorithm-with-harmonix-opt-library
Open

Add harmonix-opt (Harmony Search) as alternative optimizer — harmonix…#1
AutoPyloter wants to merge 1 commit into
SaaadRaaa:mainfrom
AutoPyloter:Refactor-Replace-custom-Genetic-Algorithm-with-harmonix-opt-library

Conversation

@AutoPyloter
Copy link
Copy Markdown

…_solution/

Adds a complete Harmony Search optimisation example using the harmonix-opt library as a drop-in replacement for the genetic algorithm in main.py.

The original FEM pipeline (Pre.py, Sol.py, Post.py) is completely unchanged.

Files added in harmonix_solution/:

main_harmonix.py
- Continuous design space, same constraints as original main.py
- Direct GA replacement (equal FEM budget: 5000 calls)

main_harmonix_chs.py
- Discrete EN 10210-2 CHS profile catalogue (50 profiles, S355 steel)
- Full Eurocode 3 checks: section class (§5.5.2), tension (§6.2.3), buckling curve a (§6.3.1), SLS deflection L/300 (NA Table NA.1)
- Buckling lower bounds pre-computed analytically before optimisation — physically infeasible profiles are excluded without any FEM call

benchmark_50run.py
- 50-run statistical comparison, equal FEM budget (5000 / method)
- Result: HS mean weight 5219 vs GA mean weight 6540 (−20.2%)
- Mann-Whitney U: p < 0.0001, effect size r = 0.861 (large)
- All 50 runs feasible for both methods

README_harmonix.md
- Usage, constraint table, example output, benchmark results

…_solution/

Adds a complete Harmony Search optimisation example using the harmonix-opt
library as a drop-in replacement for the genetic algorithm in main.py.

The original FEM pipeline (Pre.py, Sol.py, Post.py) is completely unchanged.

Files added in harmonix_solution/:

  main_harmonix.py
    - Continuous design space, same constraints as original main.py
    - Direct GA replacement (equal FEM budget: 5000 calls)

  main_harmonix_chs.py
    - Discrete EN 10210-2 CHS profile catalogue (50 profiles, S355 steel)
    - Full Eurocode 3 checks: section class (§5.5.2), tension (§6.2.3),
      buckling curve a (§6.3.1), SLS deflection L/300 (NA Table NA.1)
    - Buckling lower bounds pre-computed analytically before optimisation —
      physically infeasible profiles are excluded without any FEM call

  benchmark_50run.py
    - 50-run statistical comparison, equal FEM budget (5000 / method)
    - Result: HS mean weight 5219 vs GA mean weight 6540 (−20.2%)
    - Mann-Whitney U: p < 0.0001, effect size r = 0.861 (large)
    - All 50 runs feasible for both methods

  README_harmonix.md
    - Usage, constraint table, example output, benchmark results
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