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

fix ode-energy-sample and clean/fix librr stuff #361

Closed

Conversation

drbergman
Copy link
Collaborator

@drbergman drbergman commented Feb 11, 2025

Update [25-02-13]: See PR #362 for a better update to the libRR api.

  • introduce update_time_step in RoadRunnerIntracellular
    • set for each instance of RoadRunnerIntracellular
    • this controls the timestep for the model
    • will be set to intracellular_dt if not specified in the xml for the given cell type
    • add the intracellular_dt element as a child of the intracellular element in the xml
    • could be set on a cell-by-cell basis if desired
  • introduce previous_update_time in RoadRunnerIntracellular
    • tracks the previous update time
    • used to determine how long to run the ODE when updating
    • set to current_time when copying/cloning
  • fix next_librr_run in RoadRunnerIntracellular
    • was not being updated and thus ODE models were running at every time step
    • check current_time >= next_librr_run - 0.5 * diffusion_dt to determine if an update is needed
    • set to current_time + update_time_step when copying/cloning
  • cleaned up librr files
  • fixed and cleand ode-energy-sample
    • it was running the intracellular models in main.cpp and in the update cells function
    • it seemed to try to set intracellular_dt inside the intracellular element of the xml
    • messy custom.cpp and custom.h

- introduce `update_time_step` in `RoadRunnerIntracellular`
    - set for each instance of `RoadRunnerIntracellular`
    - this controls the timestep for the model
    - will be set to `intracellular_dt` if not specified in the xml for the given cell type
    - add the `intracellular_dt` element as a child of the `intracellular` element in the xml
    - could be set on a cell-by-cell basis if desired
- introduce `previous_update_time` in `RoadRunnerIntracellular`
    - tracks the previous update time
    - used to determine how long to run the ODE when updating
    - set to `current_time` when copying/cloning
- fix `next_librr_run` in `RoadRunnerIntracellular`
    - was not being updated and thus ODE models were running at every time step
    - check `current_time >= next_librr_run - 0.5 * diffusion_dt` to determine if an update is needed
- cleaned up librr files
- fixed and cleand ode-energy-sample
    - it was running the intracellular models in `main.cpp` and in the update cells function
    - it seemed to try to set intracellular_dt inside the intracellular element of the xml
    - messy custom.cpp and custom.h
before, only new ones were validated. those "copied" from previously read defs were not
Presumably, it was assumed that they fully inherited their parent's model, but as of now, they read the xml to get their model, so they need to be validated.
@drbergman drbergman mentioned this pull request Feb 13, 2025
@drbergman
Copy link
Collaborator Author

See PR #362 for a better update to the libRR api.

@drbergman drbergman closed this Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant