d73341d3a29c638d2494f6a52134d04896c9ab56
- optim/worker_context.py: shared per-process DB/bounds init, extracted from sweep.py so evolutionary.py doesn't reach into another module's private state - optim/objective.py: build_run_record() shared between sweep and evolutionary so both write identically-shaped rows - optim/evolutionary.py: tournament selection, whole-stage-swap crossover, elitism, structural mutation (stage count itself evolves), then a serial Nelder-Mead polish of the best genome's continuous parameters with discrete component choices frozen - Found and fixed a real crash: crossover() indexed into an empty inter_stage_gaps_m list when both parents had only 1 stage (0 gaps), raising IndexError. Fixed the fallback to only choose from gaps that actually exist, defaulting to a neutral value (clipped later by repair()) when neither parent has one. Added a regression test. - Verified 59/59 tests pass both locally and inside the Docker image 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%