Exemple #1
0
        private void updateMoleculeOntogeny(IndividualMolecule molecule, Ontogeny ontogeny, Population population, IReadOnlyList <double> allAges, IReadOnlyList <double> allGAs)
        {
            var ontogenyFactorPath   = _entityPathResolver.PathFor(molecule.OntogenyFactorParameter);
            var ontogenyFactorGIPath = _entityPathResolver.PathFor(molecule.OntogenyFactorGIParameter);

            molecule.Ontogeny = ontogeny;

            clearOntogenyFor(ontogenyFactorPath, ontogenyFactorGIPath, population);

            if (ontogeny.IsUndefined())
            {
                return;
            }

            var ontogenyFactors   = new ParameterValues(ontogenyFactorPath);
            var ontogenyFactorsGI = new ParameterValues(ontogenyFactorGIPath);

            for (int i = 0; i < population.NumberOfItems; i++)
            {
                var age = allAges[i];
                var ga  = allGAs[i];
                ontogenyFactors.Add(_ontogenyRepository.OntogenyFactorFor(ontogeny, CoreConstants.Groups.ONTOGENY_LIVER, age, ga, population.RandomGenerator));
                ontogenyFactorsGI.Add(_ontogenyRepository.OntogenyFactorFor(ontogeny, CoreConstants.Groups.ONTOGENY_DUODENUM, age, ga, population.RandomGenerator));
            }

            population.IndividualPropertiesCache.Add(ontogenyFactors);
            population.IndividualPropertiesCache.Add(ontogenyFactorsGI);
        }
Exemple #2
0
        public void ShowOntogenyData(Ontogeny ontogeny)
        {
            if (ontogeny.IsUndefined())
            {
                return;
            }

            using (var presenter = _applicationController.Start <IShowOntogenyDataPresenter>())
            {
                presenter.Show(ontogeny);
            }
        }