private void ApplyTechPop() { techRandSeed = new SystemRandomSource(Region.Seed); Tuple <double, double> alphaBeta = BetaTechDist.GetDistributionAlphaBeta(Region.TechLevel); techDist = new Beta(alphaBeta.Item1, alphaBeta.Item2, techRandSeed); double techWeight = techDist.Sample(); Pop += (UInt64)(techWeight * techMultiplier * maxPop); }
/// <summary> /// Sets up a new Beta distribution based on TechLevel. Each tech level has a specific alpha and /// beta that are hand-tailored to the expected wealth of a region. These distributions are not /// setup based on wealth as percieved at that time but instead as wealth compared to today. /// </summary> /// <param name="seed">Seed based on player and slice</param> /// <param name="techLevel">Region's tech level</param> private void FillDistribution(TechLevel techLevel) { Tuple <double, double> alphaBeta = BetaTechDist.GetDistributionAlphaBeta(techLevel); betaDist = new Beta(alphaBeta.Item1, alphaBeta.Item2, randSeed); }