예제 #1
0
        public static Individual CreateIndividual()
        {
            var originData = new OriginData();

            originData.SubPopulation     = new SubPopulation();
            originData.Species           = new Species().WithName("Species");
            originData.Gender            = new Gender().WithName("Gender");
            originData.SpeciesPopulation = new SpeciesPopulation().WithName("Population");
            var pvv      = new ParameterValueVersion().WithName("PVVName");
            var category = new ParameterValueVersionCategory().WithName("CategoryName");

            category.Add(pvv);
            originData.SubPopulation.AddParameterValueVersion(pvv);
            var organism   = new Organism().WithName("Organism").WithId("OrganismId");
            var organLiver = new Organ().WithName(CoreConstants.Organ.Liver).WithId("LiverId");

            organLiver.OrganType = OrganType.Liver;
            var periportal = new Compartment().WithName(CoreConstants.Compartment.Periportal).WithId("PeriportalId");

            periportal.Add(new Container().WithName(CoreConstants.Compartment.Intracellular).WithId("PeriportalIntracellular"));
            var pericentral = new Compartment().WithName(CoreConstants.Compartment.Pericentral).WithId("PericentralId");

            pericentral.Add(new Container().WithName(CoreConstants.Compartment.Intracellular).WithId("PericentralIntracellular"));
            organLiver.Add(periportal);
            organLiver.Add(pericentral);

            var organKidney = new Organ().WithName(CoreConstants.Organ.Kidney).WithId("KidneyId");

            organKidney.OrganType = OrganType.Kidney;
            organKidney.Add(new Compartment {
                Visible = true
            }.WithName(CoreConstants.Compartment.Plasma).WithId("KidneyPlasma"));
            var lumen = new Organ().WithName("GiTract").WithId("GiTract");

            lumen.OrganType = OrganType.Lumen;

            var duodenum  = new Compartment().WithName("Duodenum").WithId("Duodenum");
            var caecum    = new Compartment().WithName("Caecum").WithId("Caecum");
            var dimension = Constants.Dimension.NO_DIMENSION;

            var parameterLiver = new PKSimParameter().WithName("PLiver").WithId("PLiverId").WithFormula(new ExplicitFormula("1").WithId("1")).WithDimension(dimension);

            parameterLiver.Info = new ParameterValueMetaData {
                DefaultValue = 1
            };
            var parameterKidney = new PKSimParameter().WithName("PKidney").WithId("PKidneyId").WithFormula(new ExplicitFormula("2").WithId("2")).WithDimension(dimension);

            parameterKidney.Info = new ParameterValueMetaData {
                DefaultValue = 2
            };
            var parameterOrganism = new PKSimParameter().WithName(ParameterInOrganism).WithId("POrganismId").WithFormula(new ExplicitFormula("3").WithId("3")).WithDimension(dimension);

            parameterOrganism.Info = new ParameterValueMetaData {
                DefaultValue = 3
            };
            organLiver.Add(parameterLiver);
            organKidney.Add(parameterKidney);
            organism.Add(organLiver);
            organism.Add(organKidney);
            organism.Add(lumen);
            organism.Add(parameterOrganism);
            lumen.Add(duodenum);
            lumen.Add(caecum);

            var individual = new Individual {
                OriginData = originData
            }.WithName("Individual").WithId("IndividualId");

            individual.Add(organism);

            return(individual);
        }
예제 #2
0
        public static Individual CreateIndividual(string speciesName = "Species")
        {
            var originData = new OriginData
            {
                SubPopulation = new SubPopulation(),
                Species       = new Species {
                    DisplayName = speciesName, Id = speciesName
                }.WithName(speciesName),
                Gender     = new Gender().WithName("Gender"),
                Population = new SpeciesPopulation().WithName("Population"),
            };

            var pvv      = new ParameterValueVersion().WithName("PVVName");
            var category = new ParameterValueVersionCategory().WithName("CategoryName");

            category.Add(pvv);
            originData.SubPopulation.AddParameterValueVersion(pvv);
            var organism   = new Organism().WithName(Constants.ORGANISM).WithId("OrganismId");
            var organLiver = new Organ().WithName(CoreConstants.Organ.LIVER).WithId("LiverId");

            organLiver.OrganType = OrganType.TissueOrgansNotInGiTract;
            var periportal = new Compartment().WithName(CoreConstants.Compartment.PERIPORTAL).WithId("PeriportalId");

            periportal.Add(new Container().WithName(CoreConstants.Compartment.INTRACELLULAR).WithId("PeriportalIntracellular"));
            var pericentral = new Compartment().WithName(CoreConstants.Compartment.PERICENTRAL).WithId("PericentralId");

            pericentral.Add(new Container().WithName(CoreConstants.Compartment.INTRACELLULAR).WithId("PericentralIntracellular"));
            organLiver.Add(periportal);
            organLiver.Add(pericentral);

            var organKidney = new Organ().WithName(CoreConstants.Organ.KIDNEY).WithId("KidneyId");

            organKidney.OrganType = OrganType.TissueOrgansNotInGiTract;
            organKidney.Add(new Compartment {
                Visible = true
            }.WithName(CoreConstants.Compartment.PLASMA).WithId("KidneyPlasma"));
            var lumen = new Organ().WithName("GiTract").WithId("GiTract");

            lumen.OrganType = OrganType.Lumen;

            var duodenum  = new Compartment().WithName("Duodenum").WithId("Duodenum");
            var caecum    = new Compartment().WithName("Caecum").WithId("Caecum");
            var dimension = Constants.Dimension.NO_DIMENSION;

            var parameterLiver = new PKSimParameter().WithName("PLiver").WithId("PLiverId").WithFormula(new ExplicitFormula("1").WithId("1")).WithDimension(dimension);

            parameterLiver.Info = new ParameterValueMetaData {
                DefaultValue = 1
            };
            var parameterKidney = new PKSimParameter().WithName("PKidney").WithId("PKidneyId").WithFormula(new ExplicitFormula("2").WithId("2")).WithDimension(dimension);

            parameterKidney.Info = new ParameterValueMetaData {
                DefaultValue = 2
            };
            var parameterOrganism = new PKSimParameter().WithName(ParameterInOrganism).WithId("POrganismId").WithFormula(new ExplicitFormula("3").WithId("3")).WithDimension(dimension);

            parameterOrganism.Info = new ParameterValueMetaData {
                DefaultValue = 3
            };
            organLiver.Add(parameterLiver);
            organKidney.Add(parameterKidney);
            organism.Add(organLiver);
            organism.Add(organKidney);
            organism.Add(lumen);
            organism.Add(parameterOrganism);
            lumen.Add(duodenum);
            lumen.Add(caecum);

            var individual = new Individual {
                OriginData = originData
            }.WithName("Individual").WithId("IndividualId");

            individual.Add(organism);

            return(individual);
        }