Electricity Tutorial

Credits go to SimpleGuy:

Electricity Transport (IndustrialCraft 2

I connected everything but my electricity won't flow!

In IndustrialCraft 2, you'll have power generators and places/things you want to power. How that power gets itself from the generation point to where you want to use it is the focus of this Section, and it is probably one of the most important. Unfortunately, there's not a lot of pictures for where we are starting, so be prepared for a long read. So let's get on with it already.

The EU

An "energy unit" or EU is the default energy system for IndustrialCraft 2 items, and is necessary to run machines, charge items or armor, or electrocute people. It is often useful to measure the rate at which EU flows, and in Minecraft the unit of game time is called a "tick". If a game is running at full speed there are about 20 game ticks in a real-life second. Thus, when talking about rates of EU moving, being used, or being generated, it is always referred to as "EU/t" or "energy unit per tick".

However, that's not all there is to EU. Machines, whether generating the EU or using the EU, and cables (when transporting EU) utilize EU in packets. That is, let's take a hypothetical generator that generates 32 EU every tick. That EU is assigned one packet of 32 EU. Packets are hardly mentioned elsewhere, but are really the main "core" of IC2 electricity.

The reason packets are so important has to do with the way machines accept packets of energy. Lots of machines are listed on various sites as accepting of 32 EU/t energy when in use. What they don't tell you is that these machines really can accept only up to 32 EU-sized packets. That means, you can give that machine two packets of 20 EU, and it will be able to accept both of them to gain 40 EU. It can only use 32 EU per tick, so within one tick:

  • The machine gains [i]two 20 EU packets[/i] for 40 EU
  • The machine uses 32 EU, with 8 EU left over
  • The tick ends, and the remaining EU left over disappears (unless it is capable of storage)[/li]

So using packets makes life a lot more complicated. To help clarify, in the future I will use the following notation:

  • [number] [b]pEU[/b] by definition is "[number]-sized packets of EU". So 2 pEU is [i]one packet[/i] of 2 EU
  • [number] [b]EU[/b] by definition is "[number] of EU". So packet size is not specified.

In IC2, machines are capable of accepting an infinite number of packets. However, if even one of those packets exceeds their limit then there will be violent consequences.

Here are the general rules about packets, when looking at wikis:

  • A generator, when producing X EU/t, produces one packet with size X EU.
  • Any machine that accepts EU/t accepts [i]any number of packets[/i] per tick, but all packets must be smaller or equal to in size what a machine accepts in EU/t. If even one is greater, the machine explodes. This machine could store EU or use EU to accomplish a task.

When I give you problems, I will use the notation of EU/t when describing generators. It is up to you to realize this means only one packet of that amount of EU in one Minecraft tick. However, in appendices and data tables I will correctly reference input and output size as pEU.

So when building a EU distribution network, we have to keep both our overall energy movement in mind and how we deliver them. We don't want our overall energy (EU) to go to waste, as it is a waste of perfectly good energy! We also don't want to deliver incorrect packets (pEU), as the consequences can either be EU waste or destruction of materials!

Sample Problem #1: You have a hypothetical generator that produces 64 EU/t, according to a wiki page. Magically, that electricity is transferred to a place where it can be stored with no loss in EU/t. The particular storage unit says it only accepts 32 EU/t on a wiki page. Will the generator blow up the storage unit, or will the storage unit accept the EU peacefully? Would the storage unit accept the EU if we instead replaced the one generator with two generators that produce 32 EU/t?

Sample Problem #2: Convert the following into total EU: a) two 64 pEU b) 128 pEU c) 32 EU Convert the following into pEU: d) 32 EU e) 64 EU in eight packets f) 256 EU in one packet Find the number of packets: g) 128 EU in 32 pEU h) 64 pEU i) 32 EU[/size]

Cables

Surprise, cables are how we transfer power between machines in IC2! :) Through a thorough understanding of their use, you should be able to distribute your power in an incredibly efficient manner possible. With your newfound knowledge of the pEU, EU and their "per tick" variants you should be OK. And there are even pictures! Let me be clear and say that when measuring distances, I may say "1 meter" or "1 block" or "1 block length", but all of these are equivalent to the dimension of the side of exactly 1 block in minecraft. So please don't get confused.

First, the most important thing to remember in Minecraft is, that like in the real world, cables are not perfect and not created equally! Different cables will lose energy [i]per packet[/i] at different, but set, rates. This 1 EU loss in a distance is known as [i]energy dissipation[/i], and it happens in discrete amounts. That is, if you fall short of the distance that an EU would dissipate, none dissipate! The following picture shows the length of the wire needed to lose at least 1 EU/t within [i]each packet[/i] travelling along the wire. Also, notice how cables are able to be insulated, and even doubly insulated. Note that not all wires can be insulated, and not all can be insulated to the same degree. ([b][i]Note: Like real life, if you try to touch an uninsulated wire you may get shocked... possibly to death[/i][/b])

http://s17.postimage.org/rnone1brz/Wire_Lengths.png [size=8pt][i]From left to right the cables are:[/i] Ultra-Low Current cables, Copper cables, Gold cables, High-Voltage cables, and Glass Fibre cables. [i]From bottom to top the cables are:[/i] Uninsulated, 1x Insulated, 2x Insulated, 4x Insulated[/size][/center]

As you can clearly see, different wires lose different EU/t per packet at different lengths. Furthermore, each cable is not able to carry equal sized pEU/t within them, although every cable can carry an infinite (theoretically) number of packets per tick. This next image shows the maximum size of packets of EU (pEU) each wire can carry, and each wire is 5 meters tall.

[center][img]http://s7.postimage.org/uvzp99kor/Wire_Strengths.png[/img] [size=8pt][i]From left to right the cables are: (Same as previous image)[/i] Ultra-Low Current cables, Copper cables, Gold cables, High-Voltage cables, and Glass Fibre cables. [size=8pt][i]Colors of Wool:[/i] Red = 1 pEU. Yellow = 10 pEU. Green = 100 pEU. [/size][/center]

So, what you should see between these to pictures are the following: [list] [li]Insulation has [i]no effect[/i] on the pEU each the cable can carry, only the amount of [i]energy dissipation[/i] over a distance.[/li] [li]In general, the lower the pEU capacity of the wire, the longer it is able to be without [i]energy dissipation[/i].[/li] [/list] However, these are merely pictures to give you an appreciation for the relative amount each can handle. For exact numbers here is the table for exactly how many lengths of wire it takes to lose 1 EU in each packet, and the maximum pEU capacity of the wire:

[center][table] [tr] [td][/td][td][center] Ultra-Low Current [/center][/td][td][center] Copper [/center][/td][td][center] Gold [/center][/td][td][center] High-Voltage [/center][/td][td][center] Glass Fibre [/center][/td] [/tr] [tr] [td][right]Maximum pEU[/right][/td][td][center]5[/center][/td][td][center]32[/center][/td][td][center]128[/center][/td][td][center]2048[/center][/td][td][center]512[/center][/td] [/tr] [tr] [td][right]Insulation Strength \ pEU Loss[/right][/td][td][center][/center][/td][td][center][/center][/td][td][center][/center][/td][td][center][/center][/td][td][center][/center][/td] [/tr] [tr] [td][right]Uninsulated[/right][/td][td][center]1 every 40 blocks[/center][/td][td][center]1 every 3.33 blocks[/center][/td][td][center]1 every 2 blocks[/center][/td][td][center]1 every block[/center][/td][td][center]1 every 40 blocks[/center][/td] [/tr] [tr] [td][right]1x Insulated[/right][/td][td][center]N/A[/center][/td][td][center]1 every 5 blocks[/center][/td][td][center]1 every 2.22 blocks[/center][/td][td][center]1 every 1.05 blocks[/center][/td][td][center]N/A[/center][/td] [/tr] [tr] [td][right]2x Insulated[/right][/td][td][center]N/A[/center][/td][td][center]N/A[/center][/td][td][center]1 every 2.5 blocks[/center][/td][td][center]1 every 1.11 blocks[/center][/td][td][center]N/A[/center][/td] [/tr] [tr] [td][right]4x Insulated[/right][/td][td][center]N/A[/center][/td][td][center]N/A[/center][/td][td][center]N/A[/center][/td][td][center]1 every 1.25 blocks[/center][/td][td][center]N/A[/center][/td] [/tr] [/table][/center]

So why is this important? Well, let's suppose you have a 1 EU/t generator and you want to link it to a machine with 61 blocks between. Guess what, no matter what cable you use, the 1 EU/t will dissipate before it reaches your machine! In fact, you could have an infinite number of 1 EU/t generators 61 blocks away from where you want the power to be, and you still won't gain any energy. There would be an infinite number of 1 pEU travelling in whatever wire you chose, and at the 41[sup]st[/sup] block of cable, [i]every[/i] packet would have lost 1 EU, becoming 0 EU packets, or effectively disappearing.

Let me illustrate overcoming this problem by supposing you only had one temporary storage machine to use. One way to overcome this dissipation problem is by breaking up the distance by putting it exactly in the middle (creating two lengths of wires, each 30 blocks in length). Thus, if you use Ultra-Low Current cable or Glass Fibre Cable, the packets would be preserved in each 30-block length wire segments, assuming that the storage machine outputs 1 pEU.

The other way to overcome this problem is by brute force. Let's assume for a second that your temporary storage machine only outputs a gigantic 2000 pEU. Let's put it right by the generators, so that there's no EU loss between generators and this storage machine, but the storage machine is still 60 blocks away from your goal. So after your generators feed it 2000 EU, it will spit out one packet of 2000 pEU. Let's say you're using uninsulated High-Voltage Cable, which is the only cable that can handle such huge packets, but loses 1 EU every block. That means, losing 1 EU per block, the packet will arrive at its destination with one 1940 pEU, for a net gain of 1940 EU. So instead of producing 2000 EU and losing it all in 1 pEU, you are producing 2000 EU and delivering a 1940 pEU! So while the higher rates of dissipation for the larger pEU cables may seem discouraging, it may be effective at delivering power great distances.

[u]Cable Splitting[/u] [b][u][u]NOTE THAT THIS SECTION IS UNDER REVIEW: LATEST IC2 UPDATES MAY HAD MADE THIS SECTION USELESS/OLD/DEPRICATED[/u][/u][/b] Cable splitting is the fancy term for essentially having a fork in your cables. That is, a cable is a fork if you can point to a spot of cable that has more than two adjacent cables to it:

[center][img]http://s17.postimage.org/4016clc6n/Fork.png[/img] [size=8pt][i]Anything non-cable such as transformers, machines, or storage units do NOT count as forks.[/i] [/size][/center]

Although it may seem incredibly useful, it is actually harmful for a few reasons. I have done limited empirical analysis of cable forks, but did not want to try to derive any set of definite equations (as they would more than likely be more complex than useful). Here are the general principles when you want to make a fork: [list] [li]When a fork is made, [i]packet sizes[/i] (or pEU) are roughly split by a factor of the fork size and sent down every path. So in the image above, pEU would be split by a factor of two.[/li] [li]The [i]number of packets[/i] passing through each cable is also roughly split according to wire type. This ratio is dependent on the incoming wire and each of the outgoing wires. The smaller the pEU the wire is able to handle, the more packets that will be sent down it.[/li] [li]Forks cause immense overall EU loss through dissipation, depending on the wire used. The best dissipation I found (so far) was [i]only [/i]95% loss of overall pEU size (yes, two 32 pEU can become 1 pEU).[/li] [li]The more forks you have, the more your CPU will hate you, as it has to do the above calculations really quickly.[/li] [/list] Because of these huge inefficiencies, try to not fork cables when outputting power. Instead, like in the above picture, put an intermediate storage unit, transformer, or other input-output machine where the fork would be. Since it's not a cable there anymore, it's not a fork!

[b][color=red]Do not create cable loops. Your computer may hate you to the point of permanently crashing your world due to the number of calculations.

Be careful placing machines next to each other, and pay attention to inputs and outputs. Two machines side by side [u]will try to*[/u] transfer power, so if you then try to connect them with cables you may create a loop![/color]

  • Only machines that have outputs will transfer power, such as transformers, generators, storage units, etc. Consumer machines like Macerators, Furnaces, etc. will not transfer power to adjacent machines, as they have no output.[/b]

That being said, it is usually OK to have a Batbox output connected via short (10 squares or less) 1x insulated copper wires to various machines you want to use with forks. This is because the machines will draw discrete amounts of EU directly from the storage as needed. The above scenarios encompass cases where arbitrary EU could be sent in any fork.

[u]% Cable Efficiency[/u] Bottom line, To figure out how % efficient a wire choice would be, you only need to know the distance at which you need to go from Point A to Point B. Next, you merely choose a wire to check the efficiency of, get its dissipation rate & maximum packet size from the table above, and plug it into the equation below: [code]100 * [1 - TRUNCATE{Total Distance / Cable Distance Efficiency} / (Maximum Cable Packet Size)] = % Cable Efficiency[/code]

Derivation of above equation if you are curious. [code]100 * (Total EU Produced - Total EU Dissipated)/Total EU Produced = % Cable Efficiency 100 * [1 - (Total EU Dissipated/Total EU Produced)] = % Cable Efficiency

Total EU Dissipated = TRUNCATE{Total Distance/Cable Efficiency} * Number Packets Number Packets = Total EU Produced /Max Cable Size Total EU Dissipated = TRUNCATE{Total Distance/Cable Efficiency} * (Total EU Produced/Max Cable Size)

100 * [1 - <TRUNCATE{Total Distance/Cable Efficiency} * (Total EU Produced/Max Cable Size)>/Total EU Produced] = % Cable Efficiency 100 * [1 - TRUNCATE{Total Distance / Cable Distance Efficiency} / (Maximum Cable Packet Size)] = % Cable Efficiency[/code]

Example: Let's say I got to transfer power 120 Blocks. Using the equation above, these are my efficiencies for the most insulated wires of each type: [list] [li]Ultra-Low Current: 40%[/li] [li]1x Insulated Copper: 25%[/li] [li]2x Insulated Gold: 62.5%[/li] [li]4x Insulated High-Voltage: 95.3125%[/li] [li]Glass Fibre: 99.414%[/li] [/list]

Below are graphs of how efficient a cable is vs the distance in terms of block distance. This first one gives you an overall view of efficiencies: [center][img]http://s7.postimage.org/4r64fgnaz/Cable_Efficiencies2.png[/img][/center] This one should illustrate how cable efficiency operates in short distances (less than 50 blocks): [center][img]http://s18.postimage.org/9jkpqtvpl/Cable_Efficiencies_Short2.png[/img][/center] Note that while it seems that 1x insulated copper cables are outclassed by every other cable, they deliver a packet size most beginning & intermediate machines need in order to fully function.

Notice that Glass Fibre cables tend to break the trend for pEU dissipation that is seen in other cables. This is not a mistake. Glass Fibre cable is very expensive, as it costs one diamond to make 6 at the most. Even so, it cannot handle the largest pEU.

[size=8pt]Sample Problem #1: This problem assumes you have [i]no[/i] glass fibre cable available to you. If a generator is outputting 32 EU/t, and you are using 2x insulated gold cable to transport it 80 blocks away to a storage unit, how many EU/t is the storage unit increasing by? Is there a more efficient wire to use in this instance? If the generator was increased to outputting 128 EU/t, how many EU/t is the storage unit increasing by? In this case, is there a more efficient wire to use?

Sample Problem #2: You have a setup where a generator producing 10 EU/t is 60 blocks away from your storage unit. You want to use 1x insulated copper cables or Ultra-Low Current cables but they cannot deliver the power as you currently have set up. You decide to use exactly one of two intermediate storage units to deliver the power. One unit outputs 30 EU/t, while another outputs 5 EU/t. Which do you choose, where do you place it, and where do you use your 1x insulated copper and Ultra-Low Current cables?[/size] [/quote]

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis