Power Generation - Cracking the code

    Lix

    Joined
    Jun 27, 2013
    Messages
    6
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    So much of this info is wrong. I'll do my best to redo it sometime soon. Read in the comments for more info.



    I have been doing some research into how power generation works because I'm getting tired of the "try it and see" method of building power. I want to be able to calculate my power before I actually build the reactors. So there's what I've come up with

    Power Charge(e/sec) = ?(power objects)

    Power objects for this explanation are any group of SD HCT xm3.4 Power blocks that are touching with at least one side. If a block is not touching the side of another they are not in the same power object. This counts for diagonals.

    So the power generation of each individual power object is calculated based on the number of unique power blocks in each of the X, Y, and Z directions and the number of non-unique power blocks in each direction. Unique power blocks generate power in an increasing way based on the number of them that I will explain later. Non-unique power blocks give a flat 25 e/sec power generation per block.

    So now what constitutes a unique power block and a non-unique power block? Let’s start with unique power blocks in one dimension (aka. a line). This dimension shall be X. Every block in the line fills a unique spot in the X dimension.



    Now we will move to two dimensions. This second dimension shall be Y. In two dimensions there are several unique spots in both dimensions.





    When determining uniqueness each block may only be used once. If a block is unique for both dimensions it is not counted twice. Therefor the block in the corner that is unique to both X and Y only counts for one.



    Now for non-unique blocks in two dimensions. Any block that shares a location with another block in a two separate dimensions is non-unique. I will use U for unique blocks and N for non-unique blocks.



    In this picture the N block shares a location in the X dimension with a U block and in the Y dimension with a U block so it is non-unique.

    These same ideas apply to the third dimension as well. This dimension shall be Z. Z has its own set of unique blocks that are separate from X and Y.



    Again Z does not get to count the block in the corner (the block that is currently hidden that was the first unique block in X). Also the rules for non-uniqueness apply in Z as well.



    So now that we have determined what is unique and what is not lets go back to our calculations. As stated earlier I have found that:

    Power = ?(power objects) = ?(Power generated by all unique blocks + Power generated by all non-unique blocks)

    Power generated by non-unique blocks = (Number of non-unique blocks * 25 e/sec)

    Where it becomes tricky is calculating the power of the unique blocks. The power generated by unique blocks is only based on how many there are as long as they are all unique. This means that placement does not matter as long as every block is still contiguous and unique.

    Examples: (Note the blocks number and the e/sec generation)







    (EDIT: I apologize for the pictures. I thought you would be able to see the e/sec and block count. Just go build these for yourself and see)

    In each of those pictures the form the blocks are in takes up a larger area than the last but they still produce the same amount of energy. When I first began designing power generators I thought that the generation power was based on the amount of area that the blocks encompassed. This is not the case.

    So after figuring out that the unique blocks could be placed in any configuration I began running some numbers.



    I found out from this information that power generation for each power object increases in a logarithmic fashion. That means that each block will increase the total e/sec more than the last one did but also each new block will increase slightly slower than the last.

    So in the end I came up with the power equation of:

    Power = ?(power objects) = ?(Power generated by all unique blocks + Power generated by all non-unique blocks)= ?((140.8+98.1*U+E)+(25*N))

    EDIT: This equation is kinda made up and isn't really all that good. That's one of the reasons I posted this because I was hoping someone better at math could help me fix it. ThyLordRoot's equation lower is much better.

    Where U= the number of unique blocks in each individual power object

    N= the number of non-unique blocks in each individual power object

    And E is the factor of growth represented by ??Power. I wasn’t able to figure out this equation.



    EDIT: So I was talking to Raok and we figured about the the dimensions of the bounding box that the blocks form (eg. 10x10x5) is a quick way to figure out the number of blocks used. How you do this is you take the three dimensions and you add them together (10+10+5=25) and then you subtract 2 (25-2=23) and that is how many blocks it took to make that structure.

    Also ThyLordRoot figured out a really good equation for computing power that integrates U and N blocks in one equation and put it into use in a program that will compute the optumum power placement for a given area.

    This is his equation: ((x+y+z )/ 3)^1.7029*114.8+25n+1 where n is the number of blocks used and x, y, and z are the longest of each of those dimensions in the shape

    This is a link to his post: http://star-made.org/content/reactor-breeder-genetic-algorithm-reactor-design



    Here's a link to all of my work: https://docs.google.com/spreadsheet/ccc?key=0At6aQJTDkXyMdERka0QxUk5FUlpfTy1xTTNMd3I2NFE#gid=0

    It is late now and I feel like there are some things I forgot to explain and some things I explained badly. I will likely come back and edit this post later. Please feel free to ask questions! I'm tackling power storage next. Anyone have some numbers on that so I don't have to spend hours on it as well?



    tl;dr: If you think power generation is based on the area the cube that the power blocks create you are WRONG! WRONG WRONG WRONG! Go read the post to know why.
     
    Joined
    Jun 24, 2013
    Messages
    15
    Reaction score
    0
    I wasn’t able to figure out this equation.

    edit: Also: When people talk about \'box dimensions\' for the additional power of a power-generator group the only relevant number is x-dimension + y-dimension + z-dimension.
     
    Joined
    Jun 25, 2013
    Messages
    98
    Reaction score
    0
    I like they way you did it (did this for AMC damage myself Link) but there is a conflict in your post.

    I found out from this information that power generation for each power object increases in a logarithmic fashion.

    But your formular

    (140.8+98.1*U+E)+(25*N)

    indicates a linear growth (not logarithmic) with some kind of \"magic\" correction value E which i would have to look up in my table. I think that\'s not the way you should go since if i\'d ask you now how much a generator with 8k unique blocks does generate you\'d need to build it, calc the magic E value and then calculate it with your formular.

    My susggestion is to go for some kind of formular like:

    a+x*log(b,U)+25*N

    where a is a linear offset, x is a linear factor and b is the basis of the logarithm.

    But before i forget: Thanks for the work so far and the insight not the volume defines the generation but the number of \"unique\" blocks.
     
    Joined
    Jun 25, 2013
    Messages
    98
    Reaction score
    0
    ok... my suggestion is obviously bullshit since power doesn\'t grow logarithmic, but power gain^^ thus we need an exponetial function for power.
     

    Lix

    Joined
    Jun 27, 2013
    Messages
    6
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    That equation is pretty terrible. I boiled down the numbers into a series but I couldn\'t remember what to do with it then. I was talking to a friend and since the rate of change of e/sec steadily increased with blocks added but the rate of the rate of change decreased he sugjested it might be logarithmic. Here are the numbers I was able to boil the power equations down into:

    Power = (140.8)+(98.1)+(98.1+14.1)+(98.1+14.1+13.1)+(98.1+14.1+13.1+12.4)+(98.1+14.1+13.1+12.4+12)+(98.1+14.1+13.1+12.4+12+11.4)+(98.1+14.1+13.1+12.4+12+11.4+10.9)+(98.1+14.1+13.1+12.4+12+11.4+10.9+10.8)+(98.1+14.1+13.1+12.4+12+11.4+10.9+10.8+10.4)+(98.1+14.1+13.1+12.4+12+11.4+10.9+10.8+10.4+10)+..... Where the Power is the first n number of terms where n is the number of unique blocks.

    This equation sorta becomes:

    ?Power for n terms = 140.8 + 98.1*(n-1) + 14.1*(n-2)+13.1*(n-3)+12.4*(n-4)+12*(n-5)+11.4*(n-6)+10.9*(n-7)+10.8*(n-8)+10.4*(n-9)+.... Where n = number of unique blocks.

    This equation of course doesn\'t work because of the negative numbers but if you only take the first n number of terms it does.

    I\'m not the best at math and it\'s been a little while since I\'ve dealt with series so I know I\'m doing something wrong I just don\'t know what. I understand what is going on basicly but my equation is still very hand wavy.



    @Littlehelper the relevant number is actually x dimension + y dimension + z dimension - ( 2 if in 3D, 1 if in 2D, and 0 if in 1D). The reason for this is that in 2D and 3D a block is shared between dimensions.

    @Trinova I like how you called them \"unique\" blocks. I had such a hard time deciding what to call things in this post... I still don\'t know how to refer to them, but I had to pick a name so I could present my info.



    I wish the devs could just give us the equations for these things.
     
    Joined
    Jun 20, 2013
    Messages
    4
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    If you made those graphs in Excel, right click the line, and hit \"Add Trendline\", and in the box that shows up, try different fits (Exponential, Logmarithmic, Linear etc.), and check the \"Show Equation on Graph\" option.

    Find out which trend line makes the best fit, and tell us what the equation is.

    For the Unique Block e/sec, it\'s probably exponential,

    For the Delta Power for Unique Blocks, it\'s probably logarithmic.
     
    Joined
    Jun 25, 2013
    Messages
    98
    Reaction score
    0
    I just beat the numbers a littel and I\'m now sure it\'s not as simple as:

    140.8 * U ^ c + 25 * N

    with c beeing a constant exponent. The Problem is: most algorithms for interpolation assume a polynomial representation. But x^1.5 is not a polynom... since 1.5 is not element of the integer numbers. And as far as i can see this screws up with everything from Lagrange to Hermite.

    My next guess would be something like (ignoring the linear part for \"non-unique\" blocks):

    power = a + b * U ^ c

    wit a, b and c beeing element of the real numbers. This wouldn\'t be an exponential grows but in the complexity of polynomial growth. I\'d expect c to be somewhere between 1 and 2.
     
    Joined
    Jun 24, 2013
    Messages
    36
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    It will definitely help designing better stealth ships, nice work man.
     
    Joined
    Jun 26, 2013
    Messages
    3
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Does this mean that the \"box dimension\" calculations that everyone has been talking about is wrong?

    for example, if I\'ve understood this right, you\'re saying that:
    XXXXX

    is equivalent to

    XXX
    X
    X

    because they both have 5 unique blocks. whereas the box dimension theory would hold that the bottom one is almost twice as good as the top (5x1 vs. 3x3).

    does this apply to thrust as well?
     
    Joined
    Jun 20, 2013
    Messages
    4
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Yes, the \"block\" dimension of efficient power regen blocks isn\'t necessary. You can have straight lines without any touching of these blocks, and it will have the same power regen as if you used the same amount of blocks to make the axes of a cube.

    So you could make efficient use of space by having lines of the energy blocks and thrusters, here\'s what the cross section should look like

    O = Power Regen, X = Thrusters

    X O X O

    O X O X

    X O X O
     
    Joined
    Jun 20, 2013
    Messages
    4
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Just make long lines of energy cubes, each line not touching.

    Or you could do the cube thing where you make the edges of a hollow cube with the power blocks.

    Either one will provide the same amount of power if you use the same amount of blocks.
     
    Joined
    Jun 26, 2013
    Messages
    262
    Reaction score
    15
    • Legacy Citizen
    • Purchased!
    Personally I think of it as \'total dimensions\' (xdim+ydim+zdim) and \'total blocks\'. With optimal placement total blocks will be 2 less than total dimensions. If you have \"non-unique blocks\" then you\'ll have a larger difference than 2, indicating the wastefulness of your setup.

    This may be informative: http://star-made.org/content/starmade-009282-new-recharge-calculation-fixes
    So basically. I have done tests previously and recorded the power recharge with various dimension blocks, like you. So I have numbers. With a dimension 3 block (1x1x1) I had 140.8 e/sec, with a dimension 6 block (2x2x2 or 4x1x1) I had 476.4, with a 200x200x200 I had 751403.5 e/sec, for instance. 1 e/sec of those was from the core.

    From that page, we can come up with an overall equation of (1/(1+1.0007^-((x/3)^1.7*0.333))-0.5)*2*1000000 + 10 * (x-2) for optimal placement. If using non-optimal placement then use the actual number of blocks in the power construct in place of (x-2).

    We are expecting something close to this for x={3, 6, 600, 900}: The actual measured e/sec for generators with those dimensions are: {139.8, 475.4, 751402.5, 976916.1}

    This equation comes out wrong, of course. (How wrong? {126.509, 418.54, 746147., 964733.})

    I fiddled with it and came up with this:
    (1/(1+1.00069^-((x/3)^1.7005*0.333))-0.5)*2*1000000 + 25 * (x-2)
    For the same x values, result: {139.845, 473.263, 750060., 976284.}
    That\'s much closer.
     
    Joined
    Jun 25, 2013
    Messages
    98
    Reaction score
    0
    If I feed your formular with your numbers my computer tells my totaly different values than you. Either im unable to type, you have some typos, your formular is wrong or i just got wrong what you tried to tell me.

    PS: but thanks for the insight which gives us the hint we should calc with x+2 instead of just with x.
     
    Joined
    Jun 24, 2013
    Messages
    15
    Reaction score
    0
    The last formula and values do fit together. So .. try typing again, as you probably just have a typo.
     
    Joined
    Jun 26, 2013
    Messages
    262
    Reaction score
    15
    • Legacy Citizen
    • Purchased!
    What numbers your computer gives you?

    Assuming I didn\'t explain well enough, if you have a line of power generators that\'s 4 blocks long, that\'s 4x1x1, and you add up the x y and z dimensions (4+1+1) to 6. The total number of blocks is 4. That\'s the x value in the formula. (It\'s more complicated in the page I linked to because of the way coordinates are in the game, it subtracts min and max coordinates and adds one to get lengths for each dimension)

    Or, showing it another way:
    (1/(1+1.00069^-(((length+width+height)/3)^1.7005*0.333))-0.5)*2*1000000 + 25 * (totalBlocks)

    So if you had a 2x2x2 cube of power generators, you\'d say it\'s 2 blocks long, wide, and tall, for a total of 6, and 8 blocks total, so you\'d do (1/(1+1.00069^-(((6)/3)^1.7005*0.333))-0.5)*2*1000000 + 25 * 8 and that comes out to around 573.263. When I build a 2x2x2 cube of power generators on a ship core, the ship designer says my regen rate is 576.4 e/sec (and 1 e/sec of that is from the core itself), which is much closer than I\'ve gotten with anything else.
     
    Joined
    Jun 21, 2013
    Messages
    175
    Reaction score
    1
    Originally power was based purely on the dimensions of the box it created, now it\'s based on that and the fact each block adds 25 e/s to the total.
     
    Joined
    Jun 25, 2013
    Messages
    98
    Reaction score
    0
    the numbers are FAR from what you\'d expect (for 900 i have only 31k). Please point the error for me:

    (1./(1.+pow(1.00069, -(pow(x/3., 1.7005*0.333))))-0.5)*2000000 + 25. * (x-2.)

    With pow(x,y) meaning x^y
     
    Joined
    Jun 26, 2013
    Messages
    262
    Reaction score
    15
    • Legacy Citizen
    • Purchased!
    That *0.333 does not go inside your second pow. Exponents come before multiplication in order of operations.


    Also, we\'ve only discussed how this works when you have only one power generator collection, and the curve that reduces recharge is actually being applied to the sum of all (length*width*height/3)^1.7005 (or some other approximation), not each one separately. So it\'s really more like totalBasePowerRecharge = sum of (length+width+height)/3)^1.7005 for each generator collection,
    then rechargeRate = (1/(1+1.00069^-((totalBasePowerRecharge*0.333))-0.5)*2*1000000 + 25 * (totalGeneratorBlocks)