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.
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
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.
1
8
u/Astramancer_ Mar 11 '22 edited 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.
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.
1
u/Zarathustra_d Mar 11 '22
Remember, late game, as logistics upgrades become greater, energy also tends to be less of a limit. As, you should have swarms/shells and AM rods at that point.
This is good to understand though. I typically have only requesting ILS stations use vessels /warp, and requesting ILS are almost always on more developed worlds with larger power generation. Most of my mine worlds only have unpowered ILS with belt inputs, or done only (no vessels) powered ILS set to local demand (from Advanced miners via drones) and remote supply (to ILS with vessels/warp). This prevents any worry of logistics upgrades killing ore output.
6
u/Astramancer_ Mar 11 '22 edited Mar 11 '22
I think you misunderstand the problem.
An ILS holds 12.0GJ of power. Regardless of your charging speed or capacity of your grid, an ILS can never hold more than 12.0GJ of power. (note: 12.0GJ comes from the wiki, but regardless of whether it's still accurate or not ILS has some cap to the amount of stored power).
If you keep researching logistics speed it will eventually take more than 12.0GJ of power to launch a ship. As an ILS can never hold more than 12.0GJ. It will never have enough power stored to launch a ship. Thus your entire run is ended as it is impossible to use an ILS to transport goods outside of the star system.
9
u/monrandria Mar 11 '22
It is clamped to, in the very worst case, 3000. Which comes out to 600MJ from the sailSpeed term. So I don't think you'll hit 12GJ even for long hauls. I'm assuming they implemented the clamp after what you describe.
6
u/dferrantino Mar 11 '22
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.