mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
fix(production): correct full-load capture and solver scaling
Stop capturing the transient miner output damper, apply the sandbox boost state to artificial stars as for launchers, and keep lens-free photon flows when no ray receiver is selected. Scale the planner conservation check by each ledger row and normalize the simplex right-hand side so large rates no longer fail. Skip non-production objects before copying native settings, decode blueprints through the native paste path, and simplify analyzer mode resolution. Update stale ProductionCheck expectations, add regression checks, and document the rules.
This commit is contained in:
1 parent
bcc82e1056
commit
d4ba72abf4
13 files changed
+418
-254
No files matched your search
@@ -238,9 +238,15 @@ public sealed partial class ProductionPlanner
|
||||
for (var row = 0; row < constraintCount; row++)
|
||||
{
|
||||
var balance = -rhs[row];
|
||||
var magnitude = Math.Max(1, Math.Abs(rhs[row]));
|
||||
for (var column = 0; column < columnCount; column++)
|
||||
balance += matrix[row, column] * solution.Values[column];
|
||||
if (Math.Abs(balance) > 1e-7 * Math.Max(1, Math.Abs(rhs[row])))
|
||||
{
|
||||
var term = matrix[row, column] * solution.Values[column];
|
||||
balance += term;
|
||||
magnitude = Math.Max(magnitude, Math.Abs(term));
|
||||
}
|
||||
|
||||
if (Math.Abs(balance) > 1e-7 * magnitude)
|
||||
return Fail(ProductionDiagnosticCode.ConservationFailure,
|
||||
"The solved production ledger does not conserve this item.",
|
||||
row < rows.Length ? rows[row] : reusableSprayItems[(row - rows.Length) / 2]);
|
||||
|
||||
Reference in new issue
Block a user