LSC Wireless Balancer

LSC Wireless Balancer

One source Lapotronic Super Capacitor feeds the wireless EU network. Every drain LSC holds exactly one wireless-capable capacitor and empties its buffer each cycle. Mechanics are taken from GT5-Unofficial source for GTNH 2.8.4.

Source LSC

Wireless-capable capacitors inside the source. Lower tiers (EV to UV) add a little capacity but no threshold, so they are left out.

Accepts 2.5e12, 2500000000000, 2.5T

Drain LSCs

Count of drain LSCs per capacitor tier. Each drain has one wireless capacitor.

Only reduces useful drain output. The network pull stays the same.

Simulation

Every LSC keeps its own 5-minute counter, so the phase depends on when each one was built or loaded.

Minimum source capacitors for this drain load

Homogeneous source builds. Count is the fewest capacitors whose capacity holds the source threshold plus one full cycle of inflow. The highlighted row has the lowest passive loss.

Network balance over 4 cycles

Network EU Drain pull refused Source push

How the wireless LSC actually works

Rebalance period

Every 6000 ticks (5 min) with wireless mode on. The counter resets to 1 and increments first, so after the first rebalance the real period is 5999 ticks. The counter only advances while the multiblock is running, and it is saved to NBT.

Threshold

Target stored EU = sum over wireless caps: UHV 6e13, UEV 6e15, UIV 6e17, UMV 6e19. Non-wireless caps (EV to UV) add nothing to the threshold.

What a rebalance does

It computes stored − target. A surplus goes to the network in full. A deficit is pulled from the network in full. The LSC's stored EU is then set to exactly the target.

All-or-nothing pull

addEUToGlobalEnergyMap refuses any change that would push the network below zero. A drain that asks for more than the network holds gets nothing and stays empty for a whole cycle.

Drain ceiling

A drain can only hand out its threshold once per cycle, since nothing else refills it. Max network pull per drain = target / 5999: about 1.0e10 EU/t per UHV, 1.0e12 UEV, 1.0e14 UIV, 1.0e16 UMV.

Source ceiling

The threshold does not limit how much the source can push. Only capacity does: hatches stop drawing once stored reaches capacity. So peak stored (target + one cycle of inflow) must fit under capacity. UHV, UEV and UIV caps each hold 2^63−1 ≈ 9.22e18 EU. A UMV cap holds (2^63−1)² ≈ 8.5e37.

Passive loss

With any wireless cap present, loss = UHV 1e6, UEV 1e8, UIV 1e10, UMV 1e12 EU/t per cap, multiplied by (maintenance issues + 1). Higher-tier caps in the source cost more loss and give no extra throughput per cycle.

Startup trap

A new source must fill its own threshold before it pushes anything. If it is below target at rebalance, it pulls the difference from the network. With UMV caps that is 6e19 EU per cap.

Structure

Minimum LSC has one layer of 9 cells. Empty capacitors may not outnumber real ones, so a single-wireless-cap drain needs about 4 more real caps (EV to UV are fine). Height caps at 47 cap layers, which is 423 cells.

Sources: kekztech/common/tileentities/MTELapotronicSuperCapacitor.java (onRunningTick, rebalance, recalculateLossWithMaintenance, getPowerToDraw), kekztech/common/itemBlocks/ItemBlockLapotronicEnergyUnit.java, gregtech/common/misc/WirelessNetworkManager.java.