56c7ab9c1dc3ce062b6914616b666873464e27d3
- optim/search_space.py: Genome encodes only indices into the real component database plus continuous/discrete geometry parameters; number of stages is itself mutable via add/remove/duplicate-stage operators. repair() clips everything back into bounds after mutation/crossover so decode() never sees an invalid genome. - optim/objective.py: evaluate() decodes a genome, computes real BOM cost from wire length/price and component prices, runs the full chain, and scores fitness = efficiency for feasible runs or a soft penalty scaled by how many stages it got through for infeasible ones (so the GA gets gradient instead of a wall). Tested against the real component database (not synthetic fixtures) — including an explicit infeasible case using the real inductive sensor's actual sensitivity/threshold values. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gausse
Симулятор и оптимизатор многоступенчатого электромагнитного ускорителя (coilgun) на реальных, доступных в рознице компонентах.
Полный план и чек-лист этапов — в PLAN.md.
Установка (Docker — основной способ)
docker compose build
docker compose run --rm --entrypoint pytest gausse -q # тесты
docker compose run --rm gausse sweep --n 1000 # CLI (после реализации Этапа 6)
Результаты (SQLite, отчёты) должны сохраняться в ./results, примонтированный
в контейнер как /app/results (см. docker-compose.yml), чтобы переживать
пересборку образа.
Установка без Docker (локальная разработка)
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
Description
v0.1.0
Latest
Languages
Python
98.9%
Shell
0.9%
Dockerfile
0.2%