コード例 #1
0
ファイル: Converter632To641.cs プロジェクト: valdiman/PK-Sim
        private void convertIndividual(Individual individual)
        {
            if (individual == null)
            {
                return;
            }

            // create hidden Renal Aging factor-parameter and set it to 1
            var kidney = individual.Organism.Organ(CoreConstants.Organ.Kidney);

            var renalAgingParameter = _parameterFactory.CreateFor(ConverterConstants.Parameter.RenalAgingScaleFactor, 1.0, PKSimBuildingBlockType.Individual);

            renalAgingParameter.CanBeVaried             = false;
            renalAgingParameter.CanBeVariedInPopulation = false;
            renalAgingParameter.Editable = false;
            renalAgingParameter.Visible  = false;

            kidney.Add(renalAgingParameter);

            _renalAgingCalculationMethodUpdater.AddRenalAgingCalculationMethodTo(individual);
        }
コード例 #2
0
        public void Visit(Individual individual)
        {
            _renalAgingCalculationMethodUpdater.AddRenalAgingCalculationMethodTo(individual);

            performCommonConversion(individual);
            Visit(individual.OriginData);

            foreach (var transporter in individual.AllMolecules <IndividualTransporter>().SelectMany(x => x.AllExpressionsContainers()))
            {
                var oldProcessNames = transporter.ProcessNames.ToList();
                transporter.ClearProcessNames();
                foreach (var processName in oldProcessNames)
                {
                    transporter.AddProcessName(processName.Replace("_MM", ""));
                }
            }

            //change container type for molecules
            foreach (var molecule in individual.AllMolecules())
            {
                molecule.ContainerType = ContainerType.Molecule;
                updateOntogeny(molecule);
            }

            //special parameters that need conversion by hand
            convertIndividualParameters(individual.Organism);
            convertIndividualForTwoPore(individual);

            var human = _defaultIndividualRetriever.DefaultHuman();

            individual.Organism.Add(clone(human.Organism, CoreConstants.Parameter.ONTOGENY_FACTOR_ALBUMIN));
            individual.Organism.Add(clone(human.Organism, CoreConstants.Parameter.ONTOGENY_FACTOR_AGP));
            individual.Organism.Add(clone(human.Organism, CoreConstants.Parameter.PLASMA_PROTEIN_SCALE_FACTOR));


            if (!individual.IsHuman)
            {
                individual.OriginData.AddCalculationMethod(_calculationMethodRepository.FindByName("MucosaVolume_Animals"));
            }
            else
            {
                individual.OriginData.AddCalculationMethod(_calculationMethodRepository.FindByName("MucosaVolume_Human"));
                individual.OriginData.GestationalAge     = CoreConstants.NOT_PRETERM_GESTATIONAL_AGE_IN_WEEKS;
                individual.OriginData.GestationalAgeUnit = CoreConstants.Units.Weeks;

                var gestationalAge = human.Organism.Parameter(CoreConstants.Parameter.GESTATIONAL_AGE);

                if (!individual.Organism.ContainsName(CoreConstants.Parameter.GESTATIONAL_AGE))
                {
                    individual.Organism.Add(_cloner.Clone(gestationalAge));
                }
            }
        }
コード例 #3
0
        private void convertIndividual(Individual individual)
        {
            if (individual == null)
            {
                return;
            }

            _renalAgingCalculationMethodUpdater.AddRenalAgingCalculationMethodTo(individual);

            individual.AllMolecules().SelectMany(m => m.AllExpressionsContainers())
            .Select(c => c.RelativeExpressionParameter)
            .Each(p => p.Dimension = Constants.Dimension.NO_DIMENSION);
        }
コード例 #4
0
ファイル: Converter551To552.cs プロジェクト: valdiman/PK-Sim
        public void Visit(Individual individual)
        {
            if (individual == null)
            {
                return;
            }

            _renalAgingCalculationMethodUpdater.AddRenalAgingCalculationMethodTo(individual);
            _individualUpdater.AddScalingExponentForFluidFlowTo(individual);

            addSurfaceAreaParametersTo(individual);
            updateSurfaceAreaIntCellMucosa(individual);
        }
コード例 #5
0
        private void convertIndividual(Individual individual)
        {
            //possible for imported simulation where individual is not defined
            if (individual == null)
            {
                return;
            }

            _renalAgingCalculationMethodUpdater.AddRenalAgingCalculationMethodTo(individual);
            _individualUpdater.AddScalingExponentForFluidFlowTo(individual);

            updateLiverStructure(individual);
            updateIsLiverZonatedValue(individual);
            updateLiverExpressions(individual);
            updateOntogenyFactorVisibility(individual);
            removeVolumePlasmaParameter(individual.Organism);
            _neighborhoodFinalizer.SetNeighborsIn(individual);
        }
コード例 #6
0
 public void Visit(Individual individual)
 {
     _renalAgingCalculationMethodUpdater.AddRenalAgingCalculationMethodTo(individual);
     addIndividualParameters(individual, individual.Species);
 }
コード例 #7
0
ファイル: Converter513To514.cs プロジェクト: valdiman/PK-Sim
 public void Visit(Individual individual)
 {
     _currentSpecies = individual.Species;
     convertTransitTimeFor(individual);
     _renalAgingCalculationMethodUpdater.AddRenalAgingCalculationMethodTo(individual);
 }
コード例 #8
0
ファイル: Converter531to532.cs プロジェクト: valdiman/PK-Sim
 public void Visit(Individual individual)
 {
     _renalAgingCalculationMethodUpdater.AddRenalAgingCalculationMethodTo(individual);
     updateVariableInPopulationFlag(individual);
 }