コード例 #1
0
        public static RacialTemplate GetHumanTemplate()
        {
            var cohortTemplates = CohortTemplate.CreateAll(
                new CohortTemplateConfiguration
            {
                InfantsRequireExtraCare = true,
                PhysicalMaturation      = 3,
                MentalMaturation        = 4,
                LowFertilityStart       = 7,
                InfertilityStart        = 9,
                LifetimeDistribution    = HumanLifetimeDistribution,
            });
            var birthRate = 0.1 / Constants.DaysPerYear;

            return(new RacialTemplate("human", "Human", HumanLifetimeDistribution, birthRate, cohortTemplates));
        }
コード例 #2
0
        public void Setup()
        {
            var lifetimeDistribution = new GompertzMakehamDistribution(1E-5, 0.085, 5.0E-3);
            var cohortTemplates      = CohortTemplate.CreateAll(
                new CohortTemplateConfiguration
            {
                InfantsRequireExtraCare = true,
                PhysicalMaturation      = 3,
                MentalMaturation        = 4,
                LowFertilityStart       = 7,
                InfertilityStart        = 9,
                LifetimeDistribution    = lifetimeDistribution,
            });
            var birthRate = 0.1 / Constants.DaysPerYear;

            m_racialTemplate = new RacialTemplate("human", "Human", lifetimeDistribution, birthRate, cohortTemplates);
        }
コード例 #3
0
 public CohortImpl(CohortTemplate template, long population)
 {
     m_template = template;
     Population = population;
 }