ciemss / pyciemss

Causal and probabilistic reasoning with continuous time dynamical systems
Other
12 stars 4 forks source link

Simplify interchange dictionary processing #564

Closed SamWitty closed 2 months ago

SamWitty commented 2 months ago

This small PR removes some utilities that were previously used to splice in parameter interventions into the processed output. Previously, the utilities were agnostic to whether the intervention was on a state or a parameter. This is nice for its generality, but unfortunately caused some issues when there were multiple parameters that shared the same substring. See the last cell in this notebook for an example: https://github.com/ciemss/pyciemss/blob/ac-opt-fixedInterventions/docs/source/optimize_interface.ipynb

Fortunately, it turns out that splicing in the intervention values is only necessary for the interventions on parameters; interventions on states are already correctly reflected in the simulation output. Therefore, we can simply remove the state/parameter agnostic code, and manually pass in the target column name.