Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading Error when creating populations #1498

Open
Felixmil opened this issue Nov 25, 2024 · 0 comments
Open

Misleading Error when creating populations #1498

Felixmil opened this issue Nov 25, 2024 · 0 comments
Assignees

Comments

@Felixmil
Copy link
Contributor

Felixmil commented Nov 25, 2024

library(ospsuite)
populationCharacteristics <- createPopulationCharacteristics(
  species = Species$Human,
  population = ospsuite::HumanPopulation$WhiteAmerican_NHANES_1997,
  numberOfIndividuals = 50,
  proportionOfFemales = 50,
  ageMax = 85, # LIMIT FOR AMERICANS IS 81 years
  ageMin = 10
)
population <- createPopulation(populationCharacteristics = populationCharacteristics)
Error in do.call(".External", c(list("r_call_method", self$pointer, methodName),  : 
  Type:    OSPSuite.Utility.Exceptions.OSPSuiteException
Message: Maximum value for BMI should be less than or equal to 150.00 kg/m².
Method:  Void validate(PKSim.Core.Model.RandomPopulationSettings)
Stack trace:
   at PKSim.R.Services.PopulationFactory.validate(RandomPopulationSettings populationSettings)
   at PKSim.R.Services.PopulationFactory.CreatePopulation(PopulationCharacteristics populationCharacteristics)
   at InvokeStub_PopulationFactory.CreatePopulation(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Whil I passed a value that is above accepted limit for ageMax the error I got is complaining about BMI. Very misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants