Guts of calculating cargo when fleets split. |
Thu, 13 January 2022 15:51 |
|
ricks03 | | | Messages: 231
Registered: January 2012 Location: NC | |
|
I'm trying to figure out the formula for how cargo splits when a fleet splits. At a simple level, it's:
$cargoFleetA * ($cargoCapacityFleetA / ($cargoCapacityFleetA + $cargoCapacityFleetB)
$cargoFleetB * ($cargoCapacityFleetB / ($cargoCapacityFleetA + $cargoCapacityFleetB)
Which of course almost always leaves you with a fraction. Yet simply rounding the result doesn't provide the correct answer in all cases; there's variance +/- 1
Example:
I have a fleet, that starts out with 58800+7000 cargo space (the two resulting fleets combined cargo) before the split, and 515,180,270,252 cargo.
Simply applying the above formula after a split should give:
55,19,29,27 cargo
460,161,241,223 cargo
where Stars! reports:
55,20,28,26
460,160,232,224
So it's not simple rounding. I can get close to the right formula, but can't quite get there. Split all also spreads out results across fleets somehow. Anyone ever figured this out?
[Updated on: Thu, 13 January 2022 16:31]
https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHostReport message to a moderator
|
|
|
|
|