Open-Systems-Pharmacology / MoBi

MoBi® is a software tool for multiscale physiological modeling and simulation
Other
31 stars 10 forks source link

Error during Parameter Identification in MoBi #1495

Open AyaSaleh90 opened 2 months ago

AyaSaleh90 commented 2 months ago

I encountered an error while attempting to run a Parameter Identification step in MoBi. The issue arose after I added the amounts of metabolites excreted in urine (in µmol) and the fraction of parent excreted (as a percentage), along with plasma concentration data, that were all exported from a simulation created in PK-Sim. But when I attempted to open the concentration-time profile during the first step of PI, I received the below error. After encountering this issue, I closed and reopened the application. However, now when I attempt to open the Parameter Identification step, it fails to open entirely and throws the same error. I would greatly appreciate any help or guidance on resolving this issue. Thank you in advance!

Application: MoBi® 11.3.207

Key 'µmol' 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.UnitSystem.MergedDimensionFor`1.Unit(String name)
   at OSPSuite.UI.Binders.CurveBinder.get_LLOQ()
   at OSPSuite.Presentation.Presenters.Charts.ChartDisplayPresenter.<>c.<updateCurves>b__57_0(ICurveBinder x)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at OSPSuite.Presentation.Presenters.Charts.ChartDisplayPresenter.updateCurves()
   at OSPSuite.Presentation.Presenters.Charts.ChartDisplayPresenter.updateChart()
   at OSPSuite.Presentation.Presenters.Charts.ChartDisplayPresenter.Refresh()
   at OSPSuite.Presentation.Services.Charts.ChartPresenterContext.Refresh()
   at OSPSuite.Presentation.Presenters.Charts.ChartPresenter`3.Refresh()
   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)
AyaSaleh90 commented 2 months ago

I think the above-mentioned error arose because, my dataset included three types of measurements: concentrations, fractions, and amounts. I revised the dataset to include only concentrations (in mg/L) and amounts (in µmol). The PI step worked fine when I applied it to a single simulation. However, after adding individual data for multiple simulations, I encountered the following error:

Application: MoBi® 11.3.207

An item with the key 'Measurement' has already been added

An item with the same key has already been added.

Stack trace:

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at OSPSuite.Utility.Collections.Cache`2.Add(TKey key, TValue value)
 --- End of inner exception stack trace ---
   at OSPSuite.Utility.Collections.Cache`2.Add(TKey key, TValue value)
   at OSPSuite.Utility.Collections.Cache`2.Add(TValue value)
   at OSPSuite.Presentation.Presenters.Charts.DataBrowserPresenter.<AddDataColumns>b__13_0(DataColumn c)
   at OSPSuite.Utility.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 list, Action`1 action)
   at OSPSuite.Presentation.Presenters.Charts.DataBrowserPresenter.AddDataColumns(IEnumerable`1 dataColumns)
   at OSPSuite.Presentation.Presenters.Charts.ChartEditorPresenter.AddDataRepositories(IEnumerable`1 dataRepositories)
   at OSPSuite.Presentation.Presenters.Charts.ChartPresenter`3.AddDataRepositoriesToEditor(IEnumerable`1 dataRepositories)
   at OSPSuite.Presentation.Presenters.Charts.SimulationAnalysisChartPresenter`3.AddObservedDataForOutput(IGrouping`2 outputMappingsByOutput)
   at OSPSuite.Utility.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 list, Action`1 action)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationAnalysisChartPresenter`3.AddUsedObservedDataToChart()
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationTimeProfileChartPresenter.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)

Does anyone have experience with this error or suggestions on how to resolve it? Thanks in advance, Aya

Yuri05 commented 2 months ago

Can you try this? This issue was fixed in v11.3 - however, if your simulations were created with an earlier version of the OSP Suite, this still might produce such behaviour.