Open-Systems-Pharmacology / OSPSuite.ReportingEngine

R implementation of the reporting engine
https://www.open-systems-pharmacology.org/OSPSuite.ReportingEngine/
Other
4 stars 5 forks source link

Crash when some of individuals in a population cannot be simulated #284

Open Yuri05 opened 4 years ago

Yuri05 commented 4 years ago

05.zip In the example attached 2 individuals in one of the populations cannot be simulated. The whole workflow crashes then.

How should we proceed here? I would suggest to define a _failurethreshold (max. acceptable percentage of failed individuals per population)

Questions:

  1. What should be the default value of _failurethreshold?
  2. Should it be defined per population simulation set or per workflow?
[1] "24/07/2020 - 13:14:39 : Run simulation: MiniModel2"

[CVODES ERROR]  CVode
  At t = 1e-10, mxstep steps taken before reaching tout.

[CVODES ERROR]  CVode
  At t = 1e-10, mxstep steps taken before reaching tout.

[1] "24/07/2020 - 13:14:39 : Run simulation: MiniModel2"
[1] "24/07/2020 - 13:14:40 : Starting Calculate PK parameters task"
[1] "24/07/2020 - 13:14:40 : Calculate PK parameters for simulation set Adults"
Error in rClr::clrCall(pkAnalysisTask, "CalculateFor", calculatePKAnalysisArgs) : 
  Type:    OSPSuite.Utility.Exceptions.OSPSuiteException
Message: Individual Id '8' does not match the expected number of individual '8'. A reason could be that the results were imported starting with an id of 1 instead of 0.
Method:  Void SetValue(Int32, Single)
Stack trace:
   bei OSPSuite.Core.Domain.QuantityPKParameter.SetValue(Int32 individualId, Single pkValue)
   bei OSPSuite.Core.Domain.Services.PKAnalysesTask.addPKParametersForOutput(IModelCoreSimulation simulation, Int32 numberOfIndividuals, SimulationResults simulationResults, Action`1 performIndividualScalingAction, QuantitySelection selectedQuantity, PopulationSimulationPKAnalyses popAnalyses, String moleculeName, PKCalculationOptions pkCalculationOptions, IReadOnlyList`1 allApplicationParameters)
   bei OSPSuite.Core.Domain.Services.PKAnalysesTask.CalculateFor(IModelCoreSimulation simulation, Int32 numberOfIndividuals, SimulationResults runResults, Action`1 performIndividualScalingAction)
   bei OSPSuite.Core.Doma
Yuri05 commented 4 years ago

@TWendl @sfrechen @ThomasGaub @msevestre Thoughts?

ThomasGaub commented 4 years ago

5% sounds like a reasonable starting point.

  1. I see good arguments for both options, but would start with per Worklow option
msevestre commented 4 years ago

Mostly an issue in Core

msevestre commented 2 years ago

Can you check if this is fixed?

Yuri05 commented 2 years ago

The issue with the crash is fixed. But let's keep the issue open in order to implement a threshold as discussed above in the future.