Yet another wiring question

  • I have not played with minecraft or IC since minecraft version 1.6. There have been a lot of changes and I do have a question about how EU flows through wires. I can see now that it is very different.


    For example in the original IC take a MFE set to output 12 EU with a copper cable (the only kind) connected to it. Then you did a Y split on the cable you would have two 6 EU cable ends. Split both ends once more and you have 4 cables at 3 EU each. You get the idea. Typically I would might connect the 4 ends into 4 Electro furnaces, for example which require 3 EU each to run.


    Now take IC2. From what I understand:


    1. Power packets are individual.
    2. Energy storage devices output only the energy that is needed.
    3. Bat Boxes output 32 EU and you can't change it


    It would seem that rule 2 and 3 conflict, however let me ask what would happen.


    Consider my setup above with the quad split cables with a bat box as the power source instead of the MFE and connected to 4 Electro furnaces.
    Lets say I used TIN cable which is limited to 3 EU, which is fine because each furnace only needs 3 EU.


    Case 1: The bat box sends out 32 EU in a 4 pules to each of the furnaces which only need 3 EU and the tin wire fries.
    Case 2: The bat box only sends out what is needed, which is 4 individual packets of 3 EU to each furnace. The tin wire remains in tact and the furnaces function normally.


    Which of these 2 cases is the correct one and if neither of them are, then I totally do not understand the mechanics of how EU flows through the wires. Could you explain to me what would happen if neither case is correct?

    • Official Post

    Imagine the most intelligent solution possible. That's it.


    If you wire an electricStorage block (actually, most Generators are considered one, though they only have an actual storage of a few EU, like 100) into any sort of consumants, it will constantly check whether the machines need energy. If so, it will exactly send "ned energy + distance loss" as a packet to the machine.
    Splits can be ignored. Except for the fact you should try to keep unnecessary splits out, it consumes additional CPU.

  • Thanks for your reply. I do have a coding suggestion though that could eliminate the who CPU problem with interconnected cables and the like. Each tick there is power to route, I assume you are running some pathing algorithm and this search is what is taking so much CPU time. The quick and easy way to make this super-fast is to cache your algorithm's solutions. If I design some wiring system and then do not change it, the solution to the search will be the same every time, so why keep searching every frame?


    Basically you only refresh the search (clear your cache) when I change the wiring system. If I add or remove a cable or device from some wired system, re-compute the path and cache that answer until I make a change again.

  • This is apparently NOT the case. When connecting 3 macators on one tin wire line, after supplying power from a generator, the tin wire line broke. From what you said, it should not have broken the tin wires since they can handle 3 EU and the macorators only require 2 EU each.

  • This is apparently NOT the case. When connecting 3 macators on one tin wire line, after supplying power from a generator, the tin wire line broke. From what you said, it should not have broken the tin wires since they can handle 3 EU and the macorators only require 2 EU each.

    I think you forgot that macerators have a 625 EU storage (enough to run 1 cycle), which would explain frying the tin wire.
    I'm not sure if the system would run fine with the macerators pre-charged (cos I'm not sure when/how the macerators actually use the power [might be 10 EU every 5 ticks instead of 2 EU per tick]).
    Basically as long as you use cables that support the output of your energy sending device, you'll be fine.


    As far as vs the IC1 power system, I think the IC2 power system is MUCH better. The recursive process for figuring out EU travel over every block of cable caused a lot more lag then the new system does.


    The only problem I have is when a machine doesn't have quite enough power to run continuously and will constantly start/stop and the sounds associated with that. (Though that could easily be solved improved by requiring the machines to have at least enough energy to run for 1 second before starting, or only starting the sound 1 second after the machine has been running)