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

AMICI simulation fails when having initial states defined as NaN in the condition table #1396

Closed
elbaraim opened this issue Feb 1, 2021 · 3 comments · Fixed by #1417
Closed
Assignees
Labels
bug PEtab PEtab-import related

Comments

@elbaraim
Copy link

elbaraim commented Feb 1, 2021

I provide here a minimal example of code with a PEtab model in which when I set both initial conditions to numerical values in the condition table, it simulates and returns the expected value (the initial condition of the input).

However, if I set one or both to NaN (or empty string) it fails instead of simulation without doing assignments.

The minimal example reproduces the error scenario. Executing test.py.
test.zip

I have latest develop version.

@dilpath
Copy link
Member

dilpath commented Feb 1, 2021

Could you try the above PR with the following script (and the PEtab you supplied -- thanks for that)?

import petab
from amici.petab_import import import_petab_problem
from amici.petab_objective import simulate_petab


petab_problem = petab.Problem.from_yaml("test/Pom1p_Problem.yml")
amici_model = import_petab_problem(petab_problem)
result = simulate_petab(petab_problem, amici_model)
for rdata in result['rdatas']:
    print(rdata['y'])

@dweindl
Copy link
Member

dweindl commented Feb 1, 2021

Related to #1319, #1345 and #1344.

@dweindl dweindl added bug PEtab PEtab-import related labels Feb 12, 2021
dweindl added a commit that referenced this issue Feb 18, 2021
…fixes (#1417)

Adds possibility to provide state indices for selective reinitialization based on fixed parameters.

The previous `ExpData::reinitializeFixedParameterInitialStates` is still there, but will be removed in an upcoming version.


Addresses #1345, #1396, #1319

Supersedes #1344 

Include new test cases from PEtab-dev/petab_test_suite#35
@dweindl
Copy link
Member

dweindl commented Feb 20, 2021

Should be fixed in 0.11.13

@dweindl dweindl closed this as completed Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug PEtab PEtab-import related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants