public ParameterIdentificationConfigurationDTO MapFrom(ParameterIdentificationConfiguration parameterIdentificationConfiguration, IReadOnlyList <IOptimizationAlgorithm> allAlgorithms)
 {
     return(new ParameterIdentificationConfigurationDTO(parameterIdentificationConfiguration)
     {
         OptimizationAlgorithm = algorithmByName(allAlgorithms, parameterIdentificationConfiguration.AlgorithmProperties?.Name)
     });
 }
コード例 #2
0
        public IResidualCalculator CreateFor(ParameterIdentificationConfiguration parameterIdentificationConfiguration)
        {
            var residualCalculator = createCalculator(parameterIdentificationConfiguration.LLOQMode);

            residualCalculator.Initialize(parameterIdentificationConfiguration.RemoveLLOQMode);
            return(residualCalculator);
        }
        public void EditParameterIdentification(ParameterIdentification parameterIdentification)
        {
            _parameterIdentification = parameterIdentification;
            _configuration           = _parameterIdentification.Configuration;

            //Sequence is important here :Set default algorithm if required and then create the DTO
            setDefaultAlgorithm();
            var parameterIdentificationConfigurationDTO = _configurationToConfigurationDTOMapper.MapFrom(_configuration, Algorithms);

            editAlgorithmOptions();
            editParameterIdentificationOptions();
            _view.BindTo(parameterIdentificationConfigurationDTO);
        }
 protected override void Context()
 {
     base.Context();
     _cloneManager = A.Fake <ICloneManager>();
     _sourceParameterIdentificationConfiguration = new ParameterIdentificationConfiguration
     {
         LLOQMode            = LLOQModes.SimulationOutputAsObservedDataLLOQ,
         RemoveLLOQMode      = RemoveLLOQModes.NoTrailing,
         AlgorithmProperties = new OptimizationAlgorithmProperties("toto"),
         RunMode             = new MultipleParameterIdentificationRunMode {
             NumberOfRuns = 10
         }
     };
 }
コード例 #5
0
        protected override Task Context()
        {
            _parameterIdentificationConfigurationMapper = A.Fake <ParameterIdentificationConfigurationMapper>();
            _outputMappingMapper                   = A.Fake <OutputMappingMapper>();
            _identificationParameterMapper         = A.Fake <IdentificationParameterMapper>();
            _parameterIdentificationAnalysisMapper = A.Fake <ParameterIdentificationAnalysisMapper>();
            _objectBaseFactory = A.Fake <IObjectBaseFactory>();
            _logger            = A.Fake <IOSPSuiteLogger>();

            _project         = new PKSimProject();
            _snapshotContext = new SnapshotContext(_project, ProjectVersions.Current);
            _simulation      = new IndividualSimulation().WithName("S1");
            _project.AddBuildingBlock(_simulation);

            _parameterIdentification = new ModelParameterIdentification();
            _snapshotParameterIndentificationConfiguration = new ParameterIdentificationConfiguration();
            _snapshotOutputMapping = new Snapshots.OutputMapping();
            _outputMapping         = new OutputMapping();
            _parameterIdentification.AddSimulation(_simulation);
            _parameterIdentification.AddOutputMapping(_outputMapping);

            _identificationParameter = new IdentificationParameter {
                Name = "IP"
            };
            _parameterIdentification.AddIdentificationParameter(_identificationParameter);

            _snapshotIdentificationParameter         = new Snapshots.IdentificationParameter();
            _snapshotParameterIdentificationAnalysis = new ParameterIdentificationAnalysis();
            _parameterIdentificationAnalysis         = A.Fake <ISimulationAnalysis>();
            _parameterIdentification.AddAnalysis(_parameterIdentificationAnalysis);


            sut = new ParameterIdentificationMapper(
                _parameterIdentificationConfigurationMapper,
                _outputMappingMapper,
                _identificationParameterMapper,
                _parameterIdentificationAnalysisMapper,
                _objectBaseFactory,
                _logger
                );


            A.CallTo(() => _parameterIdentificationConfigurationMapper.MapToSnapshot(_parameterIdentification.Configuration)).Returns(_snapshotParameterIndentificationConfiguration);
            A.CallTo(() => _outputMappingMapper.MapToSnapshot(_outputMapping)).Returns(_snapshotOutputMapping);
            A.CallTo(() => _identificationParameterMapper.MapToSnapshot(_identificationParameter)).Returns(_snapshotIdentificationParameter);
            A.CallTo(() => _parameterIdentificationAnalysisMapper.MapToSnapshot(_parameterIdentificationAnalysis)).Returns(_snapshotParameterIdentificationAnalysis);

            return(_completed);
        }
コード例 #6
0
        protected override void Context()
        {
            sut = new ParameterIdentificationConfigurationToParameterIdentificationConfigurationDTOMapper();

            _parameterIdentificationConfiguration = new ParameterIdentificationConfiguration();
            _option1 = A.Fake <IOptimizationAlgorithm>();
            A.CallTo(() => _option1.Name).Returns("option1");

            _option2 = A.Fake <IOptimizationAlgorithm>();
            A.CallTo(() => _option2.Name).Returns("option2");

            _option3 = A.Fake <IOptimizationAlgorithm>();
            A.CallTo(() => _option3.Name).Returns("option3");

            _allAlgorithms = new[] { _option2, _option1, _option3 };
        }
コード例 #7
0
 public ParameterIdentificationConfigurationDTO(ParameterIdentificationConfiguration parameterIdentificationConfiguration)
 {
     _parameterIdentificationConfiguration = parameterIdentificationConfiguration;
 }