Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Nov 18, 2024
1 parent e3b3c8a commit ade574a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pypesto/objective/amici/amici.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def __init__(
self.parameter_mapping = parameter_mapping
# parameter mapping independent of fixed parameters
self._parameter_mapping_full = copy.deepcopy(parameter_mapping)
self._fixed_parameter_ids = []
# If supported, enable `guess_steadystate` by default. If not
# supported, disable by default. If requested but unsupported, raise.
if (
Expand Down Expand Up @@ -479,7 +480,11 @@ def call_unprocessed(
if parameter_mapping is None:
parameter_mapping = self.parameter_mapping
ret = self.calculator(
x_dct=x_dct,
x_dct={
par_id: val
for par_id, val in x_dct.items()
if par_id not in self._fixed_parameter_ids
},
sensi_orders=sensi_orders,
mode=mode,
amici_model=self.amici_model,
Expand Down Expand Up @@ -679,6 +684,7 @@ def update_from_problem(
# and replace the IDs of all fixed parameters by their respective
# values.
self.parameter_mapping = copy.deepcopy(self._parameter_mapping_full)
self._fixed_parameter_ids = [self.x_ids[i] for i in x_fixed_indices]
if not len(x_fixed_indices):
return

Expand Down

0 comments on commit ade574a

Please sign in to comment.