Open-Systems-Pharmacology / PK-Sim

PK-Sim® is a comprehensive software tool for whole-body physiologically based pharmacokinetic modeling
Other
103 stars 50 forks source link

PI: Error creating Confidence Interval after simulation replacement #1329

Open Yuri05 opened 4 years ago

Yuri05 commented 4 years ago

Steps to reproduce:

The error below comes.

Application:
PK-Sim® 8.0.22

Key 'S2|Organism|PeripheralVenousBlood|Theophylline|Plasma (Peripheral Venous Blood)' could not be found

Stack trace:

at OSPSuite.Utility.Collections.Cache`2.<>c.<.ctor>b__11_0(TKey key)
   at OSPSuite.Utility.Collections.Cache`2.get_Item(TKey key)
   at OSPSuite.Core.Domain.JacobianMatrix.PartialDerivativesFor(String fullOutputPath)
   at OSPSuite.Core.Domain.Services.ParameterIdentifications.TimeProfileConfidenceIntervalCalculator.confidanceIntervalFor(OutputMapping outputMapping, Func`5 intervalCalculation, Boolean requiresActiveOutput)
   at OSPSuite.Core.Domain.Services.ParameterIdentifications.TimeProfileConfidenceIntervalCalculator.<>c__DisplayClass8_0.<calculateConfidenceIntervalFor>b__1(IGrouping`2 x)
   at OSPSuite.Utility.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 list, Action`1 action)
   at OSPSuite.Core.Domain.Services.ParameterIdentifications.TimeProfileConfidenceIntervalCalculator.calculateConfidenceIntervalFor(ParameterIdentification parameterIdentification, ParameterIdentificationRunResult runResult, String confidenceIntervalName, Func`5 intervalCalculation, Boolean requiresActiveOutput)
   at OSPSuite.Core.Domain.Services.ParameterIdentifications.TimeProfileConfidenceIntervalCalculator.CalculateConfidenceIntervalFor(ParameterIdentification parameterIdentification, ParameterIdentificationRunResult runResult)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.AbstractParameterIdentificationTimeProfileConfidenceIntervalChartPresenter`1.AddRunResultToChart(ParameterIdentificationRunResult selectedRunResults)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationSingleRunAnalysisPresenter`1.updateAnalysis()
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationSingleRunAnalysisPresenter`1.updateSelectedRunResults(ParameterIdentificationRunResult runResult)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationSingleRunAnalysisPresenter`1.UpdateAnalysisBasedOn(IReadOnlyList`1 parameterIdentificationResults)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationAnalysisChartPresenter`3.UpdateAnalysisBasedOn(IAnalysable analysable)
   at OSPSuite.Presentation.Presenters.Charts.SimulationAnalysisChartPresenter`3.InitializeAnalysis(ISimulationAnalysis simulationAnalysis, IAnalysable analysable)
   at OSPSuite.Presentation.Presenters.EditAnalyzablePresenter`4.createAnalysis(ISimulationAnalysis simulationAnalysis)
   at OSPSuite.Presentation.Presenters.EditAnalyzablePresenter`4.Handle(SimulationAnalysisCreatedEvent eventToHandle)
   at OSPSuite.Utility.Events.EventPublisher.<>c__DisplayClass4_1`1.<PublishEvent>b__1()
   at OSPSuite.Utility.Exceptions.ExceptionManagerBase.Execute(Action action)

If the PI is restarted: after that ConfInterval plots can be created again @UlrichSi FYI

UlrichSi commented 4 years ago

It is important to keep the following workflow open:

  1. Identify parameters
  2. Automatically transfer parameters to the simulation(s) involved, but also keep the original simulation
    • which should be still clonable without the need of newly recreating it from the building blocks
Yuri05 commented 4 years ago

It is important to keep the following workflow open: ...

@UlrichSi It seems to me that this point is not directly related to the replacement of simulations in a PI. But is more a general topic of cloning/configuring of altered simulations. s. discussion here and here

UlrichSi commented 4 years ago

So we should think twice how and when to fix this bug in case it has side-effects on the afore mentioned discussion.