space-station-14 icon indicating copy to clipboard operation
space-station-14 copied to clipboard

Add basic test of station initial power supply

Open Tayrtahn opened this issue 1 month ago • 0 comments

About the PR

Adds an integration test that estimates how long each station's initial stored power supply will last with the initial power load. Currently set to a 10 minute target threshold, which none of the maps meet.

Why / Balance

We should establish a reasonable startup window on all maps so that engineering has a consistent and reasonable amount of time to get things set up.

Technical details

Pretty simple logic: find the power network with the greatest initial stored charge (this should be the main SMESes and friends, and should exclude stuff like solar SMESes). Then sum up all the desired loads of all APC power consumers (direct users of HV power like the PA are typically not connected at round start), and divide the total charge by that load.

This logic may need some improvement! It's a pretty rough estimate, since it doesn't take into account stuff like the ramp-up delay on batteries, and it could potentially ignore some power storage in cases where the networks are more complicated. Help me improve it!

Media

Code.

  • [X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

Nah.

Tayrtahn avatar Jul 03 '24 23:07 Tayrtahn