public void UpdateSettingsAfterSpeciesChange(IndividualSettingsDTO individualSettingsDTO)
        {
            var species    = individualSettingsDTO.Species;
            var population = _populationRepository.DefaultPopulationFor(species);

            individualSettingsDTO.Species            = species;
            individualSettingsDTO.Population         = population;
            individualSettingsDTO.Gender             = population.DefaultGender;
            individualSettingsDTO.CalculationMethods = individualCalculationMethods(species);

            //after species change, we are always in healthy state
            individualSettingsDTO.DiseaseState = _diseaseStateRepository.HealthyState;
            UpdateDiseaseStateFor(individualSettingsDTO);
        }
예제 #2
0
 public Individual DefaultIndividualFor(Species species)
 {
     return(DefaultIndividualFor(_populationRepository.DefaultPopulationFor(species)));
 }
예제 #3
0
 public SpeciesPopulation DefaultPopulationFor(Species species)
 {
     return(_populationRepository.DefaultPopulationFor(species));
 }