Exemplo n.º 1
0
 public ParameterFactory(IPKSimObjectBaseFactory objectBaseFactory, IFormulaFactory formulaFactory, IDimensionRepository dimensionRepository, IDisplayUnitRetriever displayUnitRetriever)
 {
     _objectBaseFactory    = objectBaseFactory;
     _formulaFactory       = formulaFactory;
     _dimensionRepository  = dimensionRepository;
     _displayUnitRetriever = displayUnitRetriever;
 }
        protected override Task Context()
        {
            _tableFormulaMapper = A.Fake <TableFormulaMapper>();
            _formulaFactory     = A.Fake <IFormulaFactory>();
            sut = new DistributedTableFormulaMapper(_tableFormulaMapper, _formulaFactory);

            _distributedTableFormula = new DistributedTableFormula();

            _distributionMetaData1 = new DistributionMetaData
            {
                Mean         = 1,
                Deviation    = 2,
                Distribution = DistributionTypes.LogNormal
            };

            _distributionMetaData2 = new DistributionMetaData
            {
                Mean         = 3,
                Deviation    = 4,
                Distribution = DistributionTypes.Normal
            };


            _distributedTableFormula.AddDistributionMetaData(_distributionMetaData1);
            _distributedTableFormula.AddDistributionMetaData(_distributionMetaData2);

            _distributedTableFormula.Percentile = 0.8;

            return(Task.FromResult(true));
        }
 public ParameterImporter(IObjectPathFactory objectPathFactory, IObjectBaseFactory objectBaseFactory, ASTHandler astHandler, IMoBiContext context, IUnitDefinitionImporter unitDefinitionImporter, IFormulaFactory formulaFactory)
     : base(objectPathFactory, objectBaseFactory, astHandler, context)
 {
     _paramList = new List <IEntity>();
     _unitDefinitionImporter = unitDefinitionImporter;
     _formulaFactory         = formulaFactory;
 }
Exemplo n.º 4
0
 public IndividualModelTask(IParameterContainerTask parameterContainerTask, ISpeciesContainerQuery speciesContainerQuery,
                            IBuildingBlockFinalizer buildingBlockFinalizer, IFormulaFactory formulaFactory)
 {
     _parameterContainerTask = parameterContainerTask;
     _speciesContainerQuery  = speciesContainerQuery;
     _buildingBlockFinalizer = buildingBlockFinalizer;
     _formulaFactory         = formulaFactory;
 }
Exemplo n.º 5
0
 public QuantityValuesUpdater(IKeywordReplacerTask keywordReplacerTask, ICloneManagerForModel cloneManagerForModel,
                              IFormulaFactory formulaFactory, IConcentrationBasedFormulaUpdater concentrationBasedFormulaUpdater)
 {
     _keywordReplacerTask              = keywordReplacerTask;
     _cloneManagerForModel             = cloneManagerForModel;
     _formulaFactory                   = formulaFactory;
     _concentrationBasedFormulaUpdater = concentrationBasedFormulaUpdater;
 }
Exemplo n.º 6
0
 protected override void Context()
 {
     _dimensionFactory  = A.Fake <IDimensionFactory>();
     _formulaFactory    = A.Fake <IFormulaFactory>();
     _objectBaseFactory = A.Fake <IObjectBaseFactory>();
     _concentrationBasedFormulaUpdater = A.Fake <IConcentrationBasedFormulaUpdater>();
     _displayUnitRetriever             = A.Fake <IDisplayUnitRetriever>();
     sut = new ParameterFactory(_formulaFactory, _objectBaseFactory, _dimensionFactory, _concentrationBasedFormulaUpdater, _displayUnitRetriever);
 }
Exemplo n.º 7
0
 public ParameterFactory(IFormulaFactory formulaFactory, IObjectBaseFactory objectBaseFactory, IDimensionFactory dimensionFactory,
                         IConcentrationBasedFormulaUpdater concentrationBasedFormulaUpdater, IDisplayUnitRetriever displayUnitRetriever)
 {
     _formulaFactory    = formulaFactory;
     _objectBaseFactory = objectBaseFactory;
     _dimensionFactory  = dimensionFactory;
     _concentrationBasedFormulaUpdater = concentrationBasedFormulaUpdater;
     _displayUnitRetriever             = displayUnitRetriever;
 }
Exemplo n.º 8
0
 protected override void Context()
 {
     _context = A.Fake <IExecutionContext>();
     _applicationController = A.Fake <IApplicationController>();
     _dataImporter          = A.Fake <IDataImporter>();
     _dimensionRepository   = A.Fake <IDimensionRepository>();
     _ontogenyRepository    = A.Fake <IOntogenyRepository>();
     _entityTask            = A.Fake <IEntityTask>();
     _formulaFactory        = A.Fake <IFormulaFactory>();
     sut = new IndividualOntogenyTask(_context, _applicationController, _dataImporter, _dimensionRepository, _ontogenyRepository, _entityTask, _formulaFactory);
 }
Exemplo n.º 9
0
 public CompartmentImporter(IObjectPathFactory objectPathFactory, IObjectBaseFactory objectBaseFactory,
                            IMoBiSpatialStructureFactory spatialStructureFactory, IMoBiDimensionFactory moBiDimensionFactory,
                            ASTHandler astHandler, IMoBiContext context, IFormulaFactory formulaFactory, IUnitDefinitionImporter unitDefinitionImporter)
     : base(objectPathFactory, objectBaseFactory, astHandler, context)
 {
     _objectBaseFactory       = objectBaseFactory;
     _spatialStructureFactory = spatialStructureFactory;
     _dimensionFactory        = moBiDimensionFactory;
     _formulaFactory          = formulaFactory;
     _unitDefinitionImporter  = unitDefinitionImporter;
 }
Exemplo n.º 10
0
 public OntogenyTask(IExecutionContext executionContext, IApplicationController applicationController, IDataImporter dataImporter,
                     IDimensionRepository dimensionRepository, IOntogenyRepository ontogenyRepository, IEntityTask entityTask, IFormulaFactory formulaFactory)
 {
     _executionContext      = executionContext;
     _applicationController = applicationController;
     _dataImporter          = dataImporter;
     _dimensionRepository   = dimensionRepository;
     _ontogenyRepository    = ontogenyRepository;
     _entityTask            = entityTask;
     _formulaFactory        = formulaFactory;
 }
        protected override void Context()
        {
            _concentrationBasedFormulaUpdater = A.Fake <IConcentrationBasedFormulaUpdater>();
            _keywordReplacerTask  = A.Fake <IKeywordReplacerTask>();
            _cloneManagerForModel = A.Fake <ICloneManagerForModel>();
            _formulaFactory       = A.Fake <IFormulaFactory>();

            sut = new QuantityValuesUpdater(_keywordReplacerTask, _cloneManagerForModel, _formulaFactory, _concentrationBasedFormulaUpdater);

            _model = A.Fake <IModel>();
            _buildConfiguration = A.Fake <IBuildConfiguration>();
        }
 protected override void Context()
 {
     _objectBaseFactory   = A.Fake <IObjectBaseFactory>();
     _formulaMapper       = A.Fake <IFormulaBuilderToFormulaMapper>();
     _parameterMapper     = A.Fake <IParameterBuilderCollectionToParameterCollectionMapper>();
     _keywordReplacerTask = A.Fake <IKeywordReplacerTask>();
     _formulaFactory      = A.Fake <IFormulaFactory>();
     _dimensionFactory    = A.Fake <IDimensionFactory>();
     _parameterFactory    = A.Fake <IParameterFactory>();
     sut = new MoleculeBuilderToMoleculeAmountMapper(_objectBaseFactory, _formulaMapper, _parameterMapper, _dimensionFactory,
                                                     _keywordReplacerTask, _formulaFactory, _parameterFactory);
 }
Exemplo n.º 13
0
 public override void GlobalContext()
 {
     _speciesContainerQuery  = A.Fake <ISpeciesContainerQuery>();
     _parameterContainerTask = A.Fake <IParameterContainerTask>();
     _buildingBlockFinalizer = A.Fake <IBuildingBlockFinalizer>();
     _formulaFactory         = A.Fake <IFormulaFactory>();
     _compartment            = new Compartment().WithName("compartment");
     _organ      = new Organ().WithName("organ");
     _organ.Name = "organ";
     _organism   = new Organism().WithName("organism");
     sut         = new IndividualModelTask(_parameterContainerTask, _speciesContainerQuery, _buildingBlockFinalizer, _formulaFactory);
 }
Exemplo n.º 14
0
 public PKSimMoleculeStartValuesCreator(
     IMoleculeStartValuesCreator moleculeStartValuesCreator,
     IMoleculeStartFormulaRepository moleculeStartFormulaRepository,
     IFormulaFactory formulaFactory,
     IModelContainerMoleculeRepository modelContainerMoleculeRepository,
     IEntityPathResolver entityPathResolver)
 {
     _moleculeStartValuesCreator     = moleculeStartValuesCreator;
     _moleculeStartFormulaRepository = moleculeStartFormulaRepository;
     _formulaFactory = formulaFactory;
     _modelContainerMoleculeRepository = modelContainerMoleculeRepository;
     _entityPathResolver = entityPathResolver;
 }
Exemplo n.º 15
0
 public PKSimMoleculeStartValuesCreator(IMoleculeStartValuesCreator moleculeStartValuesCreator,
                                        IObjectPathFactory objectPathFactory,
                                        IExpressionContainersRetriever expressionContainersRetriever,
                                        IMoleculeStartFormulaRepository moleculeStartFormulaRepository,
                                        IFormulaFactory formulaFactory,
                                        IModelContainerMoleculeRepository modelContainerMoleculeRepository)
 {
     _moleculeStartValuesCreator     = moleculeStartValuesCreator;
     _objectPathFactory              = objectPathFactory;
     _expressionContainersRetriever  = expressionContainersRetriever;
     _moleculeStartFormulaRepository = moleculeStartFormulaRepository;
     _formulaFactory = formulaFactory;
     _modelContainerMoleculeRepository = modelContainerMoleculeRepository;
 }
 public MoleculeBuilderToMoleculeAmountMapper(IObjectBaseFactory objectBaseFactory,
                                              IFormulaBuilderToFormulaMapper formulaMapper,
                                              IParameterBuilderToParameterMapper parameterMapper,
                                              IDimensionFactory dimensionFactory, IKeywordReplacerTask keywordReplacerTask, IFormulaFactory formulaFactory,
                                              IParameterFactory parameterFactory)
 {
     _objectBaseFactory   = objectBaseFactory;
     _formulaMapper       = formulaMapper;
     _parameterMapper     = parameterMapper;
     _keywordReplacerTask = keywordReplacerTask;
     _formulaFactory      = formulaFactory;
     _parameterFactory    = parameterFactory;
     _amountDimension     = dimensionFactory.Dimension(Constants.Dimension.MOLAR_AMOUNT);
 }
Exemplo n.º 17
0
 public ParameterAlternativeFactory(
     IObjectBaseFactory objectBaseFactory,
     ICloner cloner,
     ISpeciesRepository speciesRepository,
     ICoreUserSettings userSettings,
     IFormulaFactory formulaFactory
     )
 {
     _objectBaseFactory = objectBaseFactory;
     _cloner            = cloner;
     _speciesRepository = speciesRepository;
     _userSettings      = userSettings;
     _formulaFactory    = formulaFactory;
 }
 public AmountToConcentrationConverter(IReactionDimensionRetriever reactionDimensionRetriever,
                                       IDimensionFactory dimensionFactory, IAmoutToConcentrationFormulaMapper amoutToConcentrationFormulaMapper,
                                       IObjectBaseFactory objectBaseFactory, IFormulaTask formulaTask, IDisplayUnitRetriever displayUnitRetriever,
                                       IObjectTypeResolver objectTypeResolver, IFormulaFactory formulaFactory)
 {
     _reactionDimensionRetriever        = reactionDimensionRetriever;
     _amoutToConcentrationFormulaMapper = amoutToConcentrationFormulaMapper;
     _objectBaseFactory             = objectBaseFactory;
     _formulaTask                   = formulaTask;
     _displayUnitRetriever          = displayUnitRetriever;
     _objectTypeResolver            = objectTypeResolver;
     _formulaFactory                = formulaFactory;
     _concentrationDimension        = dimensionFactory.Dimension(Constants.Dimension.MOLAR_CONCENTRATION);
     _concentrationPerTimeDimension = dimensionFactory.Dimension(Constants.Dimension.MOLAR_CONCENTRATION_PER_TIME);
 }
Exemplo n.º 19
0
 public ApplicationFactory(IApplicationRepository applicationRepository, IObjectBaseFactory objectBaseFactory,
                           IObjectPathFactory objectPathFactory, IParameterSetUpdater parameterSetUpdater,
                           IDimensionRepository dimensionRepository, IParameterContainerTask parameterContainerTask,
                           IParticleApplicationCreator particleApplicationCreator, ICloneManagerForBuildingBlock cloneManagerForBuildingBlock, IFormulaFactory formulaFactory)
 {
     _applicationRepository        = applicationRepository;
     _objectBaseFactory            = objectBaseFactory;
     _objectPathFactory            = objectPathFactory;
     _parameterSetUpdater          = parameterSetUpdater;
     _dimensionRepository          = dimensionRepository;
     _parameterContainerTask       = parameterContainerTask;
     _particleApplicationCreator   = particleApplicationCreator;
     _cloneManagerForBuildingBlock = cloneManagerForBuildingBlock;
     _formulaFactory = formulaFactory;
 }
 protected override void Context()
 {
     _reactionDimensionRetriever        = A.Fake <IReactionDimensionRetriever>();
     _dimensionFactory                  = A.Fake <IDimensionFactory>();
     _amoutToConcentrationFormulaMapper = A.Fake <IAmoutToConcentrationFormulaMapper>();
     _objectBaseFactory                 = A.Fake <IObjectBaseFactory>();
     _formulaTask          = A.Fake <IFormulaTask>();
     _displayUnitRetriever = A.Fake <IDisplayUnitRetriever>();
     _formulaFactory       = A.Fake <IFormulaFactory>();
     _constantZeroFormula  = new ConstantFormula(0);
     _formulaCache         = new FormulaCache();
     _objectTypeResolver   = new ObjectTypeResolver();
     A.CallTo(() => _formulaTask.AddParentVolumeReferenceToFormula(A <IFormula> ._)).Returns(Constants.VOLUME_ALIAS);
     A.CallTo(() => _dimensionFactory.Dimension(Constants.Dimension.AMOUNT)).Returns(DomainHelperForSpecs.AmountDimension);
     A.CallTo(() => _dimensionFactory.Dimension(Constants.Dimension.AMOUNT_PER_TIME)).Returns(DomainHelperForSpecs.AmountPerTimeDimension);
     A.CallTo(() => _dimensionFactory.Dimension(Constants.Dimension.MOLAR_CONCENTRATION)).Returns(DomainHelperForSpecs.ConcentrationDimension);
     A.CallTo(() => _dimensionFactory.Dimension(Constants.Dimension.MOLAR_CONCENTRATION_PER_TIME)).Returns(DomainHelperForSpecs.ConcentrationPerTimeDimension);
     A.CallTo(() => _objectBaseFactory.Create <ExplicitFormula>()).Returns(new ExplicitFormula());
     A.CallTo(() => _formulaFactory.ConstantFormula(0, DomainHelperForSpecs.ConcentrationDimension)).Returns(_constantZeroFormula);
     sut = new AmountToConcentrationConverter(_reactionDimensionRetriever, _dimensionFactory, _amoutToConcentrationFormulaMapper,
                                              _objectBaseFactory, _formulaTask, _displayUnitRetriever, _objectTypeResolver, _formulaFactory);
 }
Exemplo n.º 21
0
 public FirstOrderValuesRetriever(IFormulaFactory formulaFactory) : base(formulaFactory)
 {
 }
Exemplo n.º 22
0
 public SpeciesImporter(IObjectPathFactory objectPathFactory, IObjectBaseFactory objectBaseFactory, IMoleculeBuilderFactory moleculeBuilderFactory, IMoleculeStartValuesCreator moleculeStartValuesCreator, IMoBiDimensionFactory moBiDimensionFactory, ASTHandler astHandler, IMoBiContext context, IUnitDefinitionImporter unitDefinitionImporter, IFormulaFactory formulaFactory)
     : base(objectPathFactory, objectBaseFactory, astHandler, context)
 {
     _moleculeBuilderFactory     = moleculeBuilderFactory;
     _moleculeStartValuesCreator = moleculeStartValuesCreator;
     _moBiDimensionFactory       = moBiDimensionFactory;
     _counter                = 1;
     _dimensionDictionary    = new Dictionary <string, Dimension>();
     _unitDefinitionImporter = unitDefinitionImporter;
 }
Exemplo n.º 23
0
 public ConversionService(IFormulaFactory formulaFactory)
 {
     FormulaFactory = formulaFactory;
 }
Exemplo n.º 24
0
 public WeibullValuesRetriever(IFormulaFactory formulaFactory) : base(formulaFactory)
 {
 }
Exemplo n.º 25
0
 public DissolvedValuesRetriever(IFormulaFactory formulaFactory) : base(formulaFactory)
 {
 }
Exemplo n.º 26
0
 public DistributedTableFormulaMapper(TableFormulaMapper tableFormulaMapper, IFormulaFactory formulaFactory)
 {
     _tableFormulaMapper = tableFormulaMapper;
     _formulaFactory     = formulaFactory;
 }
Exemplo n.º 27
0
 public TableSolubilityParameterPresenter(ITableParameterView view, IParameterTask parameterTask, IFormulaFactory formulaFactory, ICloner cloner, ICompoundAlternativeTask compoundAlternativeTask) :
     base(view, parameterTask, formulaFactory, cloner, compoundAlternativeTask.ImportSolubilityTableFormula)
 {
 }
Exemplo n.º 28
0
 public IndividualOntogenyTask(IExecutionContext executionContext, IApplicationController applicationController, IDataImporter dataImporter, IDimensionRepository dimensionRepository, IOntogenyRepository ontogenyRepository, IEntityTask entityTask, IFormulaFactory formulaFactory) : base(executionContext, applicationController, dataImporter, dimensionRepository, ontogenyRepository, entityTask, formulaFactory)
 {
 }
 public TableFormulationParameterPresenter(ITableParameterView view, IParameterTask parameterTask, IFormulaFactory formulaFactory, ICloner cloner, IFormulationTask formulationTask) :
     base(view, parameterTask, formulaFactory, cloner, formulationTask.ImportTableFormula)
 {
 }
Exemplo n.º 30
0
 public Lint80ValuesRetriever(IFormulaFactory formulaFactory) : base(formulaFactory)
 {
 }