public void should_create_a_valid_individual() { _populationRepository.All().Each(x => { var individual = DomainFactoryForSpecs.CreateStandardIndividual(population: x.Name); individual.ShouldNotBeNull(); }); }
public void should_create_a_valid_individual() { _populationRepository.All().Each(x => { var individual = DomainFactoryForSpecs.CreateStandardIndividual(population: x.Name); individual.ShouldNotBeNull(); //check that the sum of the organ weights is equal to the input weight individual.InputWeight.ShouldBeEqualTo(individual.WeightParameter.Value, 1e-5, x.Name); }); }
public void should_set_min_max_age_population_dependent() { var ageDependentPops = _populationRepository.All().Where(pop => pop.IsAgeDependent); //check [Min..Max] range of the Age parameter for every {Population, Gender}-combination foreach (var population in ageDependentPops) { foreach (var gender in population.Genders) { checkPopulationAgeSettings(population.Name, gender.Name); } } }
public Species MapFrom(FlatSpecies flatSpecies) { var species = new Species { Id = flatSpecies.Id, Name = flatSpecies.Id, Icon = flatSpecies.IconName }; foreach (var population in _populationRepository.All().Where(pop => pop.Species == flatSpecies.Id).OrderBy(x => x.Sequence)) { species.AddPopulation(population); } foreach (var pvvCategory in _pvvCategoriesMapper.MapFrom(_flatParameterValueVersionRepository.All(), flatSpecies.Id)) { species.AddPVVCategory(pvvCategory); } return(species); }
private IEnumerable <SpeciesPopulation> allPopulationsFor(FlatSpecies flatSpecies) => _populationRepository.All().Where(x => x.Species == flatSpecies.Id).OrderBy(x => x.Sequence);