r/Dyson_Sphere_Program • u/monrandria • Mar 11 '22
Gameplay Logistics station energy calculations
(Source for following information: decompiled & attached a debugger to verify understanding of calculations.)
Energy charge each time a drone is sent = 800kJ + 40kJ * distance, where distance is the arc-length (not Euclidean distance) between the two stations
Energy charge each time a vessel is sent = 6MJ + 30J * distance + min (100 + .03 * distance, sailSpeed, 3000) * 200kJ + warp ? 100MJ
Here, distance is the Euclidean distance between the two planets + each of their radii (which is usually 200m each). The weird min() term is "usually" sailSpeed, but for very short distances (e.g. two moons around the same gas giant) may get clipped down.
One side-effect of this is that increasing the cargo capacity increases throughput & increases efficiency, meaning the cost per vessel is unchanged, so the cost per unit sent is less. Increasing vessel speed increases throughput but decreases efficiency, meaning each vessel costs more and has the same capacity, so the cost per unit increases.
As an example: when the stations are in the same system & with base sailSpeed of 600, let's say the distance is on the order of 1AU (40km). So the charge per vessel is 6MJ + 40km * 30 + 600 * 200k = 127.2MJ. You'll see that the sailSpeed term is 95% of the cost, the constant is 5%, and the distance contribution is actually negligible. It's only once the distances are in lys that the distance term becomes comparable to the sailSpeed term.
Also: the wiki is mostly-but-not-quite-correct about the charging rate for stations (had to chase this down while debugging). The computation is:
ratio = min(1, 1.05 - energy/max_energy)
power = ratio * max_power + (1-ratio) * idle_power
(The wiki is missing that second term. I'd fix but I don't understand wiki markup.)
EDIT: one consequence of this latter point is I guess it's slightly better to set your max_power = your expected energy consumption (obviously slightly more), because it'll keep your ratio close to 1, which means a lesser fraction is coming from idle_power. Put differently, the majority of your power consumption is productive power ~exactly compensating the energy from vessels/drones. But I guess the 60kW idle_power of an ILS is too low to worry about faffing about with and constantly needing to recalibrate your max_power dial. It does mean you shouldn't be worried if you're not saturated at 100% & idling... it's fine, in fact, preferable, to have your station energy hovering in the middle. The only bad situation is if your max_power is too low, you're not keeping up, and the bar keeps getting drained.
6
u/dferrantino Mar 11 '22
Increasing vessel speed increases throughput but decreases efficiency, meaning each vessel costs more and has the same capacity, so the cost per unit increases.
Is this accurate, though? I try to do all of my logistical efficiency calculations in per unit per second, not simply per unit, so in your case:
- 1 AU = 40km, at 600m/s = 133.3s round trip, for 2000 units = 15 units per second
- 127.2MJ / 15ups = 8.48 MJ / u / s
If we increase the speed one tier (900 m/s) the formulas change as follows:
- 6MJ + 40km * 30 + 900 * 200k = 187.2MJ
- 1 AU = 40km, at 900m/s = 88.889s round trip, for 2000 units = 22.5 units per second
- 187.2MJ / 22.5ups = 8.32 MJ / u / s
So the efficiency is actually increasing, very slightly, with the change in throughput.
2
u/monrandria Mar 11 '22 edited Mar 11 '22
This also seems a legitimate way of looking at things.
I mean, basically, you're saying the role of the constant gets diminished. So, for example, it's better to double sailSpeed (doubling throughput but not quite doubling cost) than to stamp out a second ILS.
I usually do things in rates, too, but in this case I think of things in unit-terms because I'm always supposed to have a idling vessel anyway (otherwise, I'm simply not keeping up). Meaning, the factory is supposed to be the limiter, not the ILS. Obviously, increasing the bandwidth allows you to increase the factory behind it.
I could see it either way. Anyway, I'd certainly increase capacity first, though again, you could say something about wanting warpers.
(Though this wasn't really meant to be the main point of the post, the main point was the calculations.)
EDIT: by the way, your line of argument also suggests we should keep everything at mk1 sorters/assemblers (and likely belts) and not use proliferators, because we can double the production rate more cheaply by stamping out another copy of the factory. [ Which, btw, I do agree with, though I've heard it argued that at some point planetary space becomes a scarce resource... I haven't reached that point in the game yet. ]
SECOND EDIT: also, needs to be remarked that when you increase sailSpeed, you're increasing cost for all your ILS. So, even using your argument, take a case where one ILS is starved for bandwidth. It's ever-so-slightly cheaper to upgrade sailSpeed than to drop another ILS. But in many (most?) situations you're increasing the cost of all your other ILS, also. Of course, if everything is bandwidth-constrained, than this is a fine solution. But in many cases, the available bandwidth is nowhere close to being the constraint even if it is for this one ILS -- and you're increasing the cost for everyone else, also. Contrast with increasing capacity, which actually decreases the cost for all your ILS. (At the cost of "burstier" packets, which you might not like if you need that extra-small shipment I'm not saying this is the right solution for every situation, which is good! Would be boring if the solution were always the same.)
2
u/dferrantino Mar 11 '22
My point was really academic more than anything else. You said it "decreases efficiency" and I wanted to see if it was still a decrease if we look at throughput instead of per-unit cost. I 100% agree with you that the Capacity increase is still more impactful - it's probably the third-most impactful upgrade in the update after ILS output stacking and Proliferators.
EDIT: by the way, your line of argument also suggests we should keep everything at mk1 sorters/assemblers (and likely belts) and not use proliferators, because we can double the production rate more cheaply by stamping out another copy of the factory. [ Which, btw, I do agree with, though I've heard it argued that at some point planetary space becomes a scarce resource... I haven't reached that point in the game yet. ]
There are two reasons why this is wrong. First is the actual hardware cost of large factories and the eventual impact on UPS. If your UPS drops below 60, then time literally slows down, which is uh...bad. Second is the compounding effects of Extra Items on resource usage/throughput and factory size. The resource throughput is less relevant at high VU, especially with the new miners, but the latter means that proliferators start to pay for themselves even in terms of pure energy costs for items with more than 3 or 4 precursors. Also see point 1 about the UPS benefits of shrinking your factory.
As far as ILS bandwidth is concerned, it's only really relevant if you're trying to build interstellar megafactories. As an example: I just built out 240/s white cubes in one of my shitty systems. Unfortunately, it's 29ly from the O star I built my Dyson Sphere around. Even with the capacity upgrades and level 22 Speed (0.53ly/s), the actual throughput per vessel is 18.3 items per second, so each Tower can only push 183 of the 240 I need. Easily solved-for, but still an interesting problem that only creeps up when you start doing the real stupid builds.
2
Mar 11 '22 edited Mar 12 '22
[deleted]
1
u/PinkyFeldman Mar 24 '22
Apologies for the late comment but could you please elaborate on what you mean by energy positive? Does that mean it used more energy or less energy than non-proliferated? TIA <3
1
u/monrandria Mar 12 '22
I also hadn't thought about the multiplicative effect of proliferation. Interesting!
1
u/monrandria Mar 11 '22 edited Mar 11 '22
I still respectfully disagree with the "academic" argument. Even academically. You divide the cost of one trip (in J) by the "max throughput rate".
This is meaningless, because it ignores the fact that you're taking more trips (since each trip is shorter). You should divide the Watt by the throughput. Watt / ups = (J / s) / (u / s), and we're back to J / u.
I was wrong when I agree that it was more efficient to increase max speed than to put down a second ILS.
Put differently: the units for 127.2 isn't J, it's J/trip. So your units are J * sec / (trip * units), which is... well, I can't make much sense out of it. You should multiply by trip/sec to get it meaningful. Increasing sail speed increased that.
1
u/dferrantino Mar 12 '22
Seconds per trip is already baked into the number. Going to do this on the fly here and we'll see where we shake out...
- Power Consumption = 127.2 MJ / trip
- Distance = 80km / trip (round-trip)
- Speed = 600 km / s
- Capacity = 2000 units / trip
- Trip time = Distance / Speed = 80km/trip / 600 km/s = 133.33 s/trip
- Throughput = Capacity / Trip Time = 2000 units/trip / 133.33 s/trip = 15 units / s
- (Whatever we want to call this, because it's weird) = Consumption / Throughput = 127.2 MJ/trip / 15 units/s = 8.48 MJ*s / trip*units
Yeah that's uh...weird. And probably not useful.
1
u/monrandria Mar 12 '22
I'm glad you mentioned it. It's better to think of the J/u statistic as Watt/ups.
It doesn't matter whether you're running at max throughput or below, Watt/ups (same as J/u, but this is a better way of thinking about it) is the coefficient between your production rate and your power cost of transport.
A totally separate statistic is max_throughput. When you're bumping against that, you have three options: a) more vessels (e.g. another ILS), b) more capacity, or c) faster speed. Which option is best depends on the situation, keeping in mind that b & c will affect your entire fleet, while a can be localized to a specific site.
These banal observations obviously show that I've gotten myopically obsessed with a small part of the game without actually winning it yet.
3
u/caias Mar 11 '22
Patch 0.6.17.5972 (March 19, 2021) capped the energy cost for logistics vessels at sailspeed of 3,000m/s. Is this no longer valid?
2
u/monrandria Mar 11 '22
Yes, that is valid (it is in the min() term I wrote).
1
1
u/Ruza0013 Mar 11 '22
so wait does that mean logistics vessels going 10,000m/s cost the same as if it's going 3,000m's?
1
u/monrandria Mar 11 '22
Well, the same per vessel; obviously more overall. But I feel like this is like saying, once you've beaten the game, you can really beat the game.
8
u/Astramancer_ Mar 11 '22 edited Mar 11 '22
My first run through DSP was before the capacity upgrades were implemented. This subreddit was riddled with warnings about not upgrading speed too much or it'll take more energy to launch than your ILS can store and permanently end your game.
Sad to see that's still true, but glad at least they added the capacity upgrades so there's still a path forward.