Skip to content

Commit d68504d

Browse files
authored
Fix HDF5 generation for state reinitialization with estimated initial conditions (#344)
1 parent ae54b7f commit d68504d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

python/parpe/hdf5_pe_input.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,18 @@ def _set_initial_concentration(condition_id, species_id,
418418
species_idx = state_id_to_idx[species_id]
419419
state_idxs_for_reinitialization_cur.append(
420420
species_idx)
421+
else:
422+
# If the state for the current species is not
423+
# reinitialized, this parameter should never be
424+
# used. We can set it to the same value as for
425+
# preequilibration, to avoid issues with AMICI,
426+
# where we cannot provide different values for
427+
# dynamic parameter for preequilibration and
428+
# simulation.
429+
condition_map_sim[init_par_id] = \
430+
condition_map_preeq[init_par_id]
431+
condition_scale_map_sim[init_par_id] = \
432+
condition_scale_map_preeq[init_par_id]
421433

422434
# for simulation
423435
init_par_id = f'initial_{species_id}_sim'

0 commit comments

Comments
 (0)