Skip to content

Commit

Permalink
Try wrapping 'change local parameters' error.
Browse files Browse the repository at this point in the history
Since this used to work for changing values at the beginning of a simulation, I think the error might be triggering too often; we no longer run biomodels 10, for example.
  • Loading branch information
luciansmith committed Jan 20, 2024
1 parent 677437c commit e7bd99b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions biosimulators_tellurium/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,9 @@ def set_model_variable_value(model, target, symbol, value, preprocessed_task):
preprocessed_task.road_runners[taskid][tellurium_id] = value
success = True
if not success:
if "reaction[" in target and "kineticLaw/" in target:
raise NotImplementedError("Unable to process a change to model '" + model.id + "' with the target "
+ target + " because changing local parameters is not yet implemented.")
raise ValueError("No stored variable with target '" + target + "' and symbol '" +
str(symbol if symbol else '') + "' in model " + model.id)

Expand Down Expand Up @@ -600,10 +603,6 @@ def get_model_change_target_tellurium_change_map(model_etree, changes, alg_kisao
change.symbol = None
__, sep, __ = change.target.rpartition('/@')

if "reaction[" in change.target and "kineticLaw/" in change.target:
raise NotImplementedError("Unable to process a change to model '" + model_id + "' with the target "
+ change.target + " because changing local parameters is not yet implemented.")

sbml_id = change_targets_to_sbml_ids[change.target]

if alg_kisao_id == 'KISAO_0000029' and sbml_id in species_ids:
Expand Down

0 comments on commit e7bd99b

Please sign in to comment.