refactor: DFS solver → matrix-based linear algebra (MathNet.Numerics)

- Rewrite ProductionSolver: system of linear equations A×x=b via LU/QR decomposition
- Add ResourceClassifier: classify resources as target/intermediate/raw
- Add RecipeMatrixBuilder: build coefficient matrix and RHS vector
- Add DI container (Microsoft.Extensions.DependencyInjection) in CLI
- Fix resource flow calculation (RecipeRate is total, not per-machine)
- Fix recipes.json: moduleCategory → machineCategory (recipe #19)
- Update tests: 30 tests covering solver, classifier, matrix builder
- Update README: document matrix model, architecture, principles
This commit is contained in:
2026-07-02 14:46:14 +03:00
parent a8c9808062
commit 1c735b124a
9 changed files with 746 additions and 274 deletions
+1 -1
View File
@@ -149,7 +149,7 @@
"products": [ { "resourceId": 28, "amount": 1 } ]
},
{
"id": 19, "name": "Lubricant (Productivity)", "category": "advanced-crafting", "craftTime": 4.0, "moduleCategory": "advanced-crafting",
"id": 19, "name": "Lubricant (Productivity)", "category": "advanced-crafting", "craftTime": 4.0, "machineCategory": "advanced-crafting",
"ingredients": [ { "resourceId": 25, "amount": 2 }, { "resourceId": 4, "amount": 2 } ],
"products": [ { "resourceId": 28, "amount": 3 } ]
},