-
Notifications
You must be signed in to change notification settings - Fork 2
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
Idea: Make projectConfiguration
object contain _ALL_ the project's parameters
#560
Milestone
Comments
Felixmil
changed the title
Idea: Make
Idea: Make Oct 25, 2023
projectConfiguration
object contain **ALL** the project's parametersprojectConfiguration
object contain *ALL* the project's parameters
Felixmil
changed the title
Idea: Make
Idea: Make Oct 25, 2023
projectConfiguration
object contain *ALL* the project's parametersprojectConfiguration
object contain __ALL__ the project's parameters
Felixmil
changed the title
Idea: Make
Idea: Make Oct 25, 2023
projectConfiguration
object contain __ALL__ the project's parametersprojectConfiguration
object contain _ALL_ the project's parameters
Quick demo of what I got so far: devtools::load_all()
#> ℹ Loading esqlabsR
#> Loading required package: ospsuite
#>
#> Loading required package: rClr
#>
#> Loading the dynamic library for Microsoft .NET runtime...
#> Loaded Common Language Runtime version 4.0.30319.42000
myProject <- Project$new(projectConfiguration = testProjectConfiguration())
myProject$models
#> [1] "Aciclovir.pkml"
names(myProject$configurations)
#> [1] "modelParameters" "individuals" "applications"
myProject$configurations$modelParameters
#> $Global
#> $Global$`EHC continuous fraction`
#> $Global$`EHC continuous fraction`$containerPath
#> [1] "Organism|Liver"
#>
#> $Global$`EHC continuous fraction`$parameterName
#> [1] "EHC continuous fraction"
#>
#> $Global$`EHC continuous fraction`$value
#> [1] 1
#>
#> $Global$`EHC continuous fraction`$units
#> [1] NA
#>
#>
#>
#> $MissingParam
#> $MissingParam$bar
#> $MissingParam$bar$containerPath
#> [1] "foo"
#>
#> $MissingParam$bar$parameterName
#> [1] "bar"
#>
#> $MissingParam$bar$value
#> [1] 2
#>
#> $MissingParam$bar$units
#> [1] NA
#>
#>
#>
#> $Aciclovir
#> $Aciclovir$Lipophilicity
#> $Aciclovir$Lipophilicity$containerPath
#> [1] "Aciclovir"
#>
#> $Aciclovir$Lipophilicity$parameterName
#> [1] "Lipophilicity"
#>
#> $Aciclovir$Lipophilicity$value
#> [1] -0.1
#>
#> $Aciclovir$Lipophilicity$units
#> [1] "Log Units"
myProject$configurations$individuals
#> $Indiv1
#> $Indiv1$characteristics
#> IndividualCharacteristics:
#> Species: Human
#> Population: European_ICRP_2002
#> Gender: MALE
#> Age: 30.00 [year(s)]
#> Gestational age: 40.00 [week(s)]
#> Weight: 73.00 [kg]
#> Height: 176.00 [cm]
#>
#> $Indiv1$parameters
#> $Indiv1$parameters$GFR
#> $Indiv1$parameters$GFR$containerPath
#> [1] "Organism|Kidney"
#>
#> $Indiv1$parameters$GFR$parameterName
#> [1] "GFR"
#>
#> $Indiv1$parameters$GFR$value
#> [1] 90
#>
#> $Indiv1$parameters$GFR$units
#> [1] "ml/min"
subsetScenarios <- c("TestScenario", "TestScenario2")
myProject$setScenarioConfigurations(subsetScenarios)
myProject$runScenarios()
#> Creating scenarios
#> ■■■■■■■■■■■■■■■■ 50% | ETA: 3s Running simulations
#> Simulation Results computed for:
#> - TestScenario,
#> - TestScenario2
names(myProject$simulationResults)
#> [1] "TestScenario" "TestScenario2" Created on 2024-04-22 with reprex v2.1.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This would allow the user to navigate in the projectConfiguration easily using only one entry point:
This would exploit the most of the OOP structure of our project since we could use active bindings to validate projectConfiguration.
For example:
individualId
used for a scenario is actually defined in the object.Plots
is defined inScenarios
Also, this would simplify the code in many parts where we pass
projectConfiguration
to other methods or functions.This would also make things easier to import/export all the configuration and wrangle between format (json, excel, R object).
The text was updated successfully, but these errors were encountered: