CORPORATION: update documentation (#1182)

Tweak several formulas
This commit is contained in:
catloversg 2024-03-22 04:37:50 +07:00 committed by GitHub
parent c637d0e4e4
commit 35a34470a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 7 deletions

@ -41,11 +41,11 @@ $$UpgradeCost = BasePrice\ast{1.09}^{\frac{CurrentSize}{3}}$$
Upgrade cost from size 3 to size n: Upgrade cost from size 3 to size n:
$$UpgradeCost_{From\ 3\ to\ n} = \sum_{k = 0}^{\frac{n}{3} - 1}{BasePrice\ast 1.09^k}$$ $$UpgradeCost_{From\ 3\ to\ n} = \sum_{k = 1}^{\frac{n}{3} - 1}{BasePrice\ast 1.09^k}$$
$$UpgradeCost_{From\ 3\ to\ n} = BasePrice\ast\left( \frac{{1.09}^{\frac{n}{3}} - 1}{0.09} \right)$$ $$UpgradeCost_{From\ 3\ to\ n} = BasePrice\ast\left( \frac{{1.09}^{\frac{n}{3}} - 1.09}{0.09} \right)$$
Upgrade cost size a to size b: Upgrade cost size a to size b:

@ -46,6 +46,6 @@ For each case, we need to find way(s) to detect congestion and mitigate it. In t
- If `productionAmount` is 0, increase the entry's value of this warehouse in the map by 1. If not, set the entry's value to 0. - If `productionAmount` is 0, increase the entry's value of this warehouse in the map by 1. If not, set the entry's value to 0.
- If the entry's value is greater than 5, the warehouse is very likely congested. - If the entry's value is greater than 5, the warehouse is very likely congested.
- This heuristic is based on the observation: when warehouse is filled with excessive input materials, the production process is halted completely, this means `productionAmount` is 0. We wait for 5 times to reduce false positives. - This heuristic is based on the observation: when warehouse is filled with excessive input materials, the production process is halted completely, this means `productionAmount` is 0. We wait for 5 times to reduce false positives.
- When we start our Smart Supply script, the `productionAmount` of output material/product may be 0, because there is nothing controls the production process in previous cycles. - When we start our Smart Supply script, `productionAmount` of output material/product may be 0, because nothing controls the production process in previous cycles.
When there are excessive input materials, discarding all of them is the simplest mitigation measure. It's inefficient, but it's the fastest way to make our production line restart. When there are excessive input materials, discarding all of them is the simplest mitigation measure. It's inefficient, but it's the fastest way to make our production line restart.

@ -30,7 +30,7 @@ Normal upgrade's formulas:
- Upgrade cost: - Upgrade cost:
$$UpgradeCost = BasePrice\ast{PriceMult}^{UpgradeCurrentLevel}$$ $$UpgradeCost = BasePrice\ast{PriceMult}^{CurrentLevel}$$
- Upgrade cost from level 0 to level n: - Upgrade cost from level 0 to level n:

@ -4,18 +4,26 @@ Warehouse starts at level 1 after being bought. The initial price is 5e9.
`BasePrice` in the following formulas is the upgrade's base price (1e9), not the initial price above. `BasePrice` in the following formulas is the upgrade's base price (1e9), not the initial price above.
Warehouse upgrade cost: its formula is a bit different from other upgrades (The exponent is `UpgradeCurrentLevel+1` instead of `UpgradeCurrentLevel`): Warehouse upgrade cost: its formula is a bit different from other upgrades (the exponent is `CurrentLevel+1` instead of `CurrentLevel`):
$$UpgradeCost = BasePrice\ast{1.07}^{UpgradeCurrentLevel + 1}$$ $$UpgradeCost = BasePrice\ast{1.07}^{CurrentLevel + 1}$$
Upgrade cost for buying from level 1 to level n: Upgrade cost for buying from level 1 to level n:
$$UpgradeCost_{From\ 1\ to\ n} = BasePrice\ast\left( \frac{{1.07}^{n + 1} - 1}{0.07} \right)$$ $$UpgradeCost_{From\ 1\ to\ n} = \sum_{k = 2}^{n}{BasePrice\ast {1.07}^k}$$
$$UpgradeCost_{From\ 1\ to\ n} = BasePrice\ast\left( \frac{{1.07}^{n + 1} - {1.07}^{2}}{0.07} \right)$$
Upgrade cost for buying from level a to level b: Upgrade cost for buying from level a to level b:
$$UpgradeCost_{From\ a\ to\ b} = BasePrice\ast\left( \frac{{1.07}^{b + 1} - {1.07}^{a + 1}}{0.07} \right)$$ $$UpgradeCost_{From\ a\ to\ b} = BasePrice\ast\left( \frac{{1.07}^{b + 1} - {1.07}^{a + 1}}{0.07} \right)$$
Maximum level with a given `MaxCost`:
$$MaxLevel = (log_{1.07}\left(MaxCost\ast\frac{0.07}{BasePrice} + {1.07}^{CurrentLevel+1} \right)) - 1$$
Warehouse size: Warehouse size:
- Upgrade multiplier: multiplier from Smart Storage. - Upgrade multiplier: multiplier from Smart Storage.