Repository navigation
Energy beside OEE on a Satisfactory plant: MW against capacity, headroom, kWh a part against the recipe - #213
Merged
Merged
Conversation
…adings Each poll writes every building's draw (MW now and at full speed), its energy since the previous observed poll (MWh), and the kWh one part of its recipe should cost; every circuit's capacity, consumption, peak demand, production, battery and fuse; every generator's output, capacity, load and fuel. Generators are equipment, under a GENERATORS work centre. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: scottkalw <scottkalwei@gmail.com>
… part against the recipe services/energy reads the power readings back: circuits standing at the window's end with headroom and the last trip named in its own demand and capacity, MWh per building, kWh a part over units booked, the ideal from the recipe, generators with their fuel. /analysis/oee carries it as 'energy' (absent on a plant with no power readings); /analysis/energy serves it alone, optionally for one machine. Fixture: the night of 2026-10-30, the first with generators, and a trimmed recipe reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: scottkalw <scottkalwei@gmail.com>
…README, CHANGELOG, AI tool doc The panel is drawn only when the plant has power readings: a bar of MW drawn against circuit capacity with the peak demand marked, headroom, a tripped fuse named with its demand, MWh in the window, and the buildings worst gap first with kWh a part against the recipe ideal. The reading names move down into services.energy so no service imports an edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: scottkalw <scottkalwei@gmail.com>
…st for the panel; plant-wide heading The mod lists only part of the factory in each poll, so a building left out of the latest list keeps its energy but has no 'now' figure. The panel says it is the whole plant's, and a browser test holds that a plant with no power readings draws no panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: scottkalw <scottkalwei@gmail.com>
|
Thanks for the first pull request. Checks: every commit signed off ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An Energy panel on Shift analysis for a Satisfactory plant, and one energy line on each machine page's OEE tab. Energy sits beside OEE and is never part of it. OEE, quality (always 100 %) and every OEE figure are unchanged.
FactoryRate(× 1000/60). It comes fromref/getRecipes.jsonbeside the poller's day files. A recipe that is not in that file has ideal unknown, with the sentence saying why; no ideal is ever guessed.TagValue, as an OPC agent's readings are:<CODE>.PowerMW,.PowerMaxMW,.EnergyMWh,.IdealKWhPerUnit;.OutputMW,.CapacityMW,.LoadPercent,.Fuel,.FuelItems;POWER.CIRCUIT-<n>.CapacityMW,.ConsumedMW,.PeakDemandMW,.ProductionMW,.BatteryPercent,.BatteryCapacityMWh,.FuseTripped./analysis/oeeasenergy, so the AI tab's existingoee_breakdowntool carries them; its docstring says how to read them. They are also served alone at/analysis/energy?hours=&shift=&equipment=, which the machine page uses.energykey and no panel. That is every plant that is not a game.Why
"In the job shop the constraint is volume, in Satisfactory it's energy." The accepted design for the Satisfactory plant keeps OEE as OEE, with quality at 100 and saying so, and puts energy beside it as its own figure. It is never swapped in for quality.
How it was verified
tests/test_energy_stands_beside_oee_on_a_satisfactory_plant.py, 18 tests:energykey, and the API returns null;tests/test_the_energy_panel_is_drawn_only_on_a_plant_that_reports_power.py(-m browser): the demo plant has no panel. Once a circuit and a machine report power, the panel draws the bar (used, over-capacity, capacity and peak marks), names the trip, and shows a dash, not "0 kWh", where nothing was made.ghcannot attach images, so here is what the screenshots show:PowerConsumed= 4 MW: 2,467 s watched. 4 MW × 2,467 s ÷ 3,600 = 2.7411 MWh.FactoryRate15 a minute ingetRecipes.json, and a Constructor at 100 % clock reportsMaxPowerConsumed4 MW. 4 × 1000 ÷ 60 ÷ 15 = 4.44 kWh a part.pathlibwithencoding="utf-8", gzip or plain. No subprocess, signal or shell is added. The tests write their files with an explicit encoding.What the feed taught, said plainly
PowerProductionreads 0 on every circuit of every poll so far, even while the circuit carried 48.5 MW. Nothing treats it as output; it is kept as a reading because it is what the feed said.ProductionRate.RegulatedDemandProdis the figure that moves with the load, and it is used as "MW made now".getSessionInfoandgetGeneratorsa second after the rest. The reader skips that line as a poll of its own; this is existing behaviour, and pause and gap handling were out of scope. Generators' energy still integrates across it, but their readings miss that moment.Out of scope
Parts mix, rate orders, anything predictive, talking to the game, and changing pause or gap handling.
🤖 Generated with Claude Code