GT Calculations: Difference between revisions

m
link
No edit summary
m (link)
 
(9 intermediate revisions by 5 users not shown)
Line 1:
[[Category:Guides]][[Category:Automation]][[Category:Mechanics]]
 
[[Category:Automation]]
'''YouTube explanation'''
https://youtu.be/L3ZtnS2gvnA
 
 
<big>'''Introduction'''</big>
 
Along your GT journey you'll eventually start setting up full processing setups. This might start as early as LV, if not even in steam. A key part of any GT setup is processing speed. This will dictate how many of each machine you need, how much power you will need to route to it, and most importantly, your output. While often times you can simply wing it on quantities and [[tier]], there's times you're looking for a specific output, or simply want to know how much fuel your power gen will produce. When it comes to calculations around GT, there's a few simple equations that will come in handy. Most are easy enough to derive yourself through how overclocking works, but this section is dedicated to laying them out for you to use. Most of these equations will be written in the syntax of excel, as it's a useful tool for GT math. However this can be done with anything that can handle rounding and logs.
 
 
Line 34 ⟶ 37:
 
 
=== '''Calculating recipe tiers''' ===
 
Finding the [[tier]] of a recipe is simple enough, however it's a little more complex when you try to use equations. We all know 1-32v is LV, 33-128 is MV, and so on, but putting this in a formula is a little involved. The basic idea is to use something that equates to a base 4 log to calculate amounts of times that the voltage is 4x over 8v. Rounding this value up will give you the tier, for values 8v and above. If you are using a program with loops, you can set this up the way GT would use, however I'm not going to be explaining that here. The idea would be simply to replace logs with a loop that will determine the same value the log does.
 
Roundup(log<math>\left \lceil log_{4}\left ((Recipe_Voltage/ \frac{RecipeVoltage}{8),} base\right 4)). \right \rceil</math> This applies a tier value of 1 to anything 9-32, a value of 2 to anything between 33-128, and so on. The one fault here comes with how values of 8 and below behave. One option is to use a max value function, to keep the tier value always at 1 or above.
 
Max<math>\max\left (Roundup \left \lceil log_{4} \left (log(Running_Voltage/ \frac{RunningVoltage}{8,} \right 4)) \right \rceil , 1 \right )</math> will work as a tier defining function for any recipe. Remember not to not factor in amps here, as those don't define tier, just power consumed. This results in us defining Recipe_TierRecipeTier based on the voltage of any given recipe.
 
 
=== '''Calculating Recipe time with variables''' ===
The next important value to calculate will be the length of a recipe. This will be accounting overclocks, speed bonuses, and parallels. This value is equated to Recipe_Time/(Speed_Bonus*<math>\frac{RecipeTime}{SpeedBonus \times Parallels*Overclock_Favtor \times OverclockFactor^(Recipe_Tier\frac {RecipeTier}{RunningTier}}</Running_Tier))math>. Running_TierRunningTier is whatever tier you choose to run the process at. We will call this value Real_Recipe_TimeRealRecipeTime as it's the time you will be experiencing with any given process.
It's important to keep the quantity of machines out of this calc, as we will be using the Real_Recipe_TimeRealRecipeTime variable to define the quantity of machines.
 
There is however a small issue with this calculation as it is. Single recipe time before parallels can only function within ticks. As the time is defined in ticks, we can simply apply a roundup function on it to always give a full tick time, as well as cap recipes at 1t. This gives us roundup(Recipe_Time/(Speed_Bonus*Overclock_Favtor^(Recipe_Tier/Running_Tier)))/Parallels = Real_Recipe_time.:
 
<math>RealRecipeTime = \frac {\left \lceil \frac {RecipeTime} {SpeedBonus \times OverclockFactor^\frac {RecipeTier} {RunningTier}} \right \rceil} {Parallels}</math>
 
 
==='''Initial machine quantities'''===
 
Now it's time to give a start point to your processing chain. You can do this by manually setting a desired output rate, setting a specific machine quantity yourself, or accounting for a given input. For something such as ore processing, it could be easier to account for an input rate, while something like power gen would function best with setting a desired fuel output. If you have one particularly expensive machine in your chain, it could be best to set the quantity of those, in order to maximize efficiency of a set amount of that machine. If you want to put more work into it, you could give a setup a fixed power usage, and calculate everything based on that, however that is more complex. Whatever you do, you'll need to set one value in order to calculate everything else.
 
If you choose an output/input rate, the calculation of Machine_QuantityMachineQuantity for that step will be your next goal. Here is where Input_QuantityInputQuantity and Output_QuantityOutputQuantity come into play. Say you're defining an output, we will lable that Set_Output_RateSetOutputRate. What you will do next is define a value in ticks, for example 500 L/t. Then you will use Output_Quantity<math>\frac{OutputQuantity}{RealRecipeTime \times SetOutputRate}</(Real_Recipe_Time*Set_Output_Rate)math> to define Machine_QuantityMachineQuantity. What this does is tell you how many of that machine you will need to reach your desired output. With this value, you can start calculating the rest of the chain.
 
If you were calculating based on an input, you would use Input_QuantityInputQuantity instead of Output_QuantityOutputQuantity. If you were setting Machine_QuantityMachineQuantity you wouldn't set the output rate, and instead just set the Machine_QuantityMachineQuantity to a static value instead of an expression.
 
 
==='''Calculating Input/Output rates'''===
 
This will be almost the reverse of using a fixed output to define Machine_QuantityMachineQuantity. Here you will use Input_QuantityInputQuantity and Output_QuantityOutputQuantity for each item/fluid in a recipe you wish to evaluate. This number is primarily for calculating other Machine_QuantitiesMachineQuantities, so you can simply calculate values for items you wish to view outputs for, or items you are generating within the processing chain. This value is calculated through
 
Machine_Quantity*<math>MachineQuantity \times Output( \quad or)Input_Quantity \quad \frac {InputQuantity}{RealRecipeTime}</Real_Recipe_Timemath>. This will provide an input or output value in ticks for any given item. We will ascribe the names Input_RateInputRate and Output_RateOutputRate to these values.
 
==='''Calculating Machine_Quantity'''===
 
This will be the value that tells you how many machines will be needed. The build requirement at a given tier, to reach a given output. This value is calculated with an Output_QuantityOutputQuantity from one machine, and an Input_QuantityInputQuantity from another. If calculating a machine (aA) that will input something created by another quantity defined machine (bB), it will use the equation of Output_Rate(b)*Real_Recipe_Time(a)<math>OutputRate_B \times \frac {RealrecipeTime_A}{InputQuantity_A}</Input_Quantity(a)math>. If you are defining an output based on another machines input, you would simply flip Output_RateOutputRate to Input_RateInputRate, and Input_QuantityInputQuantity to Output_QuantityOutputQuantity. This will give you a value of machines needing to be built. The small issue here is that machine quantities can be fractional, which doesn't work. Rounding this number up in a 2nd step will display how many you will need, however it's important to keep the fractional values for speed calcs. If you need to run 7.5 machines, then build 8, but supply them with the same input rates the 7.5 needed, you will be running 7 of them constantly, and one 50% of the time, resulting in the speeds of 7.5 machines.
 
==='''Power calculations'''===
 
When it comes to calculating power to machines in a setup, you'll need to get a few values. First off, a general overall power usage is important. This is calculated as Recipe_Voltage*Machine_Quantity*Overclock_Power<math>RecipeVoltage \times MachineQuantity \times OverclockPower^({Tier-Recipe_Tier)RecipeTier}</math> for any machine that doesn't have dynamic parallels. If a machine can run parallels itself, such as GT++ multis, you will need another equation to calculate this, as you won't be overclocking as much as normal. Once you calculate this value for each step, simply summing them together gets your average power draw.
 
However there is more to power than simply your average draw. This is where machine quantities being fractional comes in, as well as values useful for setting up power logistics. Using a rounded up calc on machine quantity, you can find the maximum draw your setup will take, which is useful for skipping battery buffer usage, and wiring for Max draw instead. This value will give you the amount of power each step will require at most, ensuring no machines get stuck/shut off.
 
==GTNH Overclock Calculator==
 
Given ''Recipe Voltage Tier'', ''Machine Voltage Tier'', ''EU/t'' and ''Recipe Time in seconds'', this Overclock Calculator application will compute the Overclock Time and Power for a recipe.
 
* Application: <nowiki>https://gtnh-oc.herokuapp.com/</nowiki> (no longer accessible)
* Source code: https://github.com/k3nw4y/gtnh-oc-calculator
4,389

edits