Commit Graph

3 Commits

Author SHA1 Message Date
mikhail a8c9808062 fix: resolve 3 critical ProductionSolver bugs
- Bug #1: CalculateExecution now filters product by targetResourceId
  instead of blindly taking .First() — fixes multi-product recipes
- Bug #2: Replace visited HashSet with recipeOutput tracker — allows
  re-processing when demand increases (double targets on same resource)
- Bug #3: Clamp effectiveSpeed to MinEffectiveSpeed (0.05) floor —
  prevents division by zero with heavy productivity module stacks

Also: switch from Stack (DFS) to Queue (BFS) for more predictable
resolution order; add 4 regression tests (24 total, all green)
2026-07-02 13:27:43 +03:00
mikhail 29507813e5 chore: add FactorioCalc.sln to src/ 2026-07-02 13:16:59 +03:00
mikhail eae7c066d1 feat: Factorio Space Age Production Calculator
- Domain: immutable entities (Resource, Recipe, Machine, Module, etc.)
- Data: JSON recipe repository (34 resources, 26 recipes, Space Age)
- Solver: DFS-based production planner with module support
- Reporting: Console, JSON, Excel exporters
- CLI: solve/list commands with Spectre.Console
- Tests: 20 unit tests (xUnit) all passing
- Tech: C# .NET 10, MathNet.Numerics, ClosedXML

Model: GPT-4.1 (OpenAI) — executed by pi coding agent
2026-07-02 13:08:25 +03:00