Let:
L = Total value sold locally (e.g. to Pierre, Willy, etc.)
S = Total value sold through the shipping bin
T = Local sales threshold (a minimum amount under which local sales are ignored) (by default 5000 G)
C_max = Maximum chance to be caught (by default 0.5 ie. 50%)
C = Final computed chance of being caught
1. If L ≤ 0
(If no local sales, no risk)
C = 0
2. If S ≤ 0
(If only local sales, fully suspicious)
C = C_max
3. If L < S and L > T
(If local sales are below shipping bin sales but above the threshold, increase risk linearly)
C = ((L − T) × 0.05) ÷ (S − T)
4. If L ≥ S
(If local sales are equal to or greater than shipping bin sales, the risk increases exponentially)
C = 2^((L − S) ÷ S) × 0.05
5. If C > C_max
(Final Clamping)
C = C_max
Example
If:
L = 10,000 G
S = 5,000 G
T= 1,000 G
C_max = 0.25 (25%)
Then since L > S, use the exponential formula:
C = 2^((10,000 − 5,000) / 5,000) × 0.05
C = 2^1 × 0.05 = 0.1 (or 10%)
0 comments