private void addPKAnalysisSensitivities(VariationData variationData, SimulationResults simulationResults, SensitivityAnalysisRunResult sensitivityRunResult, SensitivityAnalysis sensitivityAnalysis) { var pkAnalyses = _pkAnalysesTask.CalculateFor(sensitivityAnalysis.Simulation, simulationResults); foreach (var pkParameter in pkAnalyses.All()) { sensitivityAnalysis.AllSensitivityParameters.Each(sensitivityParameter => { var pkSensitivity = calculatePKParameterSensitivity(sensitivityParameter, variationData, pkParameter); if (pkSensitivity != null) { sensitivityRunResult.AddPKParameterSensitivity(pkSensitivity); } }); } }
protected override void Context() { base.Context(); _sensitivityAnalysisRunResult = new SensitivityAnalysisRunResult(); _simulation = A.Fake <IModelCoreSimulation>().WithName("Sim"); var pkParameter = new PKParameterSensitivity { QuantityPath = "Liver", PKParameterName = "AUC", ParameterName = "P1", Value = 0.5, ParameterPath = "ParameterPath" }; _sensitivityAnalysisRunResult.AddPKParameterSensitivity(pkParameter); }
public SensitivityAnalysisRunResult CreateFor(SensitivityAnalysis sensitivityAnalysis, VariationData variationData, SimulationResults simulationResults) { var sensitivityRunResult = new SensitivityAnalysisRunResult(); var pkAnalyses = _pkAnalysesTask.CalculateFor(sensitivityAnalysis.Simulation, variationData.NumberOfVariations, simulationResults); foreach (var pkParameter in pkAnalyses.All()) { sensitivityAnalysis.AllSensitivityParameters.Each((sensitivityParameter, index) => { var pkSensitivity = calculateParameterSensitivity(sensitivityParameter, index, variationData, pkParameter); if (pkSensitivity != null) { sensitivityRunResult.AddPKParameterSensitivity(pkSensitivity); } }); } return(sensitivityRunResult); }