protected override void Context()
        {
            _organism            = new Container().WithName(Constants.ORGANISM);
            _liver               = new Container().WithName("Liver");
            _kidney              = new Container().WithName("Kidney");
            _liverIntracellular  = new Container().WithName(INTRACELLULAR);
            _kidneyIntracellular = new Container().WithName(INTRACELLULAR);
            _liverRelExp         = DomainHelperForSpecs.ConstantParameterWithValue(10).WithName("Relative expression (normalized)");
            _volumeLiver         = DomainHelperForSpecs.ConstantParameterWithValue(10).WithName(Constants.Parameters.VOLUME);

            _volumeLiver.Formula            = new ExplicitFormula("1+2");
            _volumeOrganism                 = DomainHelperForSpecs.ConstantParameterWithValue(20).WithName(Constants.Parameters.VOLUME);
            _volumeLiverCell                = DomainHelperForSpecs.ConstantParameterWithValue(5).WithName(Constants.Parameters.VOLUME);
            _liverIntracellularSubContainer = new Container().WithName("Intracellular Sub Container");
            _volumeKidneyCell               = DomainHelperForSpecs.ConstantParameterWithValue(3).WithName(Constants.Parameters.VOLUME);
            _gfr                     = DomainHelperForSpecs.NormalDistributedParameter(3).WithName("GFR");
            _volumeKidney            = DomainHelperForSpecs.ConstantParameterWithValue(14).WithName(Constants.Parameters.VOLUME);
            _height                  = DomainHelperForSpecs.ConstantParameterWithValue(175).WithName("Height");
            _weight                  = DomainHelperForSpecs.ConstantParameterWithValue(75).WithName("Weight");
            _paramWithRHS            = DomainHelperForSpecs.ConstantParameterWithValue(10).WithName("RHSParam");
            _paramWithRHS.RHSFormula = new ExplicitFormula();

            _clearance = DomainHelperForSpecs.ConstantParameterWithValue(5).WithName("CL");

            _organism.AddChildren(_liver, _kidney, _height, _weight, _volumeOrganism, _paramWithRHS);
            _liver.AddChildren(_liverIntracellular, _volumeLiver);
            _liverIntracellular.AddChildren(_volumeLiverCell, _liverIntracellularSubContainer, _liverRelExp);
            _liverIntracellularSubContainer.Add(_clearance);

            _kidney.AddChildren(_kidneyIntracellular, _volumeKidney);
            _kidneyIntracellular.AddChildren(_volumeKidneyCell, _gfr);

            _liverIntracellularMoleculeAmount = new MoleculeAmount().WithName("Drug");
            _liverIntracellular.Add(_liverIntracellularMoleculeAmount);

            _simulation            = A.Fake <ISimulation>();
            _simulation.Model.Root = _organism;
        }
示例#2
0
 public static IContainer WithChildren(this IContainer container, IEnumerable <IEntity> children)
 {
     container.AddChildren(children);
     return(container);
 }