public IndividualTransporter CreateFor(ISimulationSubject simulationSubject, string moleculeName, TransportType transporterType)
        {
            var transporter = CreateMolecule(moleculeName);

            if (HasAgeParameter(simulationSubject))
            {
                AddOntogenyParameterTo(transporter);
            }

            //default transporter type
            transporter.TransportType = transporterType;

            //default transport direction
            addGlobalExpression(transporter, BLOOD_CELLS, DefaultBloodCellsDirectionFor(transporterType), RelExpParam(REL_EXP_BLOOD_CELLS));

            //Special direction for vascular endothelium that is independent from the default direction choice
            addGlobalExpression(transporter, VASCULAR_ENDOTHELIUM, DefaultVascularEndotheliumDirectionFor(transporterType),
                                RelExpParam(REL_EXP_VASCULAR_ENDOTHELIUM));

            addVascularSystemInitialConcentration(simulationSubject, transporter);
            addTissueOrgansExpression(simulationSubject, transporter);
            addMucosaExpression(simulationSubject, transporter);

            simulationSubject.AddMolecule(transporter);

            _individualPathWithRootExpander.AddRootToPathIn(simulationSubject, moleculeName);

            return(transporter);
        }
Beispiel #2
0
        private void finalizeIndividual(Individual individual)
        {
            if (individual == null)
            {
                return;
            }

            _neighborhoodFinalizer.SetNeighborsIn(individual);
            _individualPathWithRootExpander.AddRootToPathIn(individual);
            _keywordReplacerTask.ReplaceIn(individual);
            _referencesResolver.ResolveReferencesIn(individual);
        }
Beispiel #3
0
        public override IndividualMolecule AddMoleculeTo(ISimulationSubject simulationSubject, string moleculeName)
        {
            var molecule = CreateMolecule(moleculeName);

            if (HasAgeParameter(simulationSubject))
            {
                AddOntogenyParameterTo(molecule);
            }

            //default localization
            molecule.Localization = Localization.Intracellular;

            AddGlobalExpression(molecule,
                                RelExpParam(REL_EXP_BLOOD_CELLS),
                                FractionParam(FRACTION_EXPRESSED_BLOOD_CELLS, CoreConstants.Rate.ONE_RATE),
                                FractionParam(FRACTION_EXPRESSED_BLOOD_CELLS_MEMBRANE, CoreConstants.Rate.PARAM_F_EXP_BC_MEMBRANE)
                                );

            AddGlobalExpression(molecule, RelExpParam(REL_EXP_PLASMA));

            AddGlobalExpression(molecule,
                                RelExpParam(REL_EXP_VASCULAR_ENDOTHELIUM),
                                FractionParam(FRACTION_EXPRESSED_VASC_ENDO_ENDOSOME, CoreConstants.Rate.ONE_RATE),
                                FractionParam(FRACTION_EXPRESSED_VASC_ENDO_PLASMA_SIDE, CoreConstants.Rate.ZERO_RATE),
                                FractionParam(FRACTION_EXPRESSED_VASC_ENDO_TISSUE_SIDE, CoreConstants.Rate.PARAM_F_EXP_VASC_TISSUE_SIDE)
                                );

            addVascularSystemInitialConcentration(simulationSubject, moleculeName);
            AddTissueOrgansExpression(simulationSubject, moleculeName);
            AddLumenExpression(simulationSubject, moleculeName);
            AddMucosaExpression(simulationSubject, moleculeName);

            simulationSubject.AddMolecule(molecule);

            _individualPathWithRootExpander.AddRootToPathIn(simulationSubject, moleculeName);
            return(molecule);
        }