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); }
public Individual DefaultIndividualFor(Species species) { return(DefaultIndividualFor(_populationRepository.DefaultPopulationFor(species))); }
public SpeciesPopulation DefaultPopulationFor(Species species) { return(_populationRepository.DefaultPopulationFor(species)); }