TinyModularThings / IC2Classic

IC2Classic Bugtracker
151 stars 39 forks source link

[Question] Generator doesn't always output 10 EU/t, stores some of it when it doesn't need to #1210

Open LunarLambda opened 1 week ago

LunarLambda commented 1 week ago

I'm not sure whether this is a bug or an intended mechanic inside of IC2C that I don't fully understand.

I'm on 1.12 with IC2C 2.2.999, and the latest Forge for that version

I have tested the following setup, a Generator connected to two (empty) BatBoxes: 2024-10-13_13 36 05

When the generator is running, it outputs ~8.5 EU/t average, 7.5 EU/t of which go into the closer BatBox, and 1.0 EU/t of which go into the further away one.

The remaining ~1.5 EU/t are being used to fill the buffer inside of the Generator instead of being output.

The EU reader only reports 0 in 8.5 out -8.5 gain on the generator, and this doesn't happen with a cable without a split. A similar thing can be observed with the Geothermal Generator, where the buffer rapidly flickers between a tiny bit stored and empty.

So I'm not sure if there's just something about cable splitting and EU loss that I don't understand or whether this is a weird edge case/bug in IC2C.

In general, having storage units hooked up in parallel like this seems to behave in ways I can't figure out the rules for. Should I be setting them up in series instead?

Speiger commented 1 week ago

@LunarLambda i simply can't answer all questions, but EU loss is applied per Source * Receiver combo. And, and we don't send 0.5EU we only send 1EU or 2EU packets (no floating point numbers). So it could be that you have 1-2 EU always left because of energy loss breaking your pathing. Basically the shorter one has no loss and the other one has loss. and that might causes issues.

Not sure if this is fixable or per design, since I followed only the specs of the original design. My custom implementation but the sending logic is effectively the same.

On top of that, normal generators are lossy by design (when the storage is filled up it will waste power) and you want to get away from that.

In future iterations, I improved on that flaw, and next iteration (whenever that happens) I plan to further improve on that problem because it became painfully obvious to me that stuff needs to change.

Note in 1.12.2 i am effectively deadlocked between: Can't do changes or make breaking changes that will break everything and make huge mod incompat, because in 1.12.2 some mod supporting ic2 were still including the API so certain changes would simply break the mod without possible fixes.

LunarLambda commented 1 week ago

Yeah, it did seem like some interaction between loss and pathing.

If I change the setup to be only 1 batbox with a longer cable, the Generator outputs the full 10 EU/t but the batbox will only receive for example 6 EU/t due to loss.

I understand it might not be fixable in 1.12, I wasn't even really sure whether it's a bug or not, but it was a curiosity I ran into when assessing my power generation I couldn't wrap my head around, I appreciate the answer ^^

I really enjoy this mod and it's more realistic approach to power, it's a lot of fun. Thank you for your work bringing it to modern versions