-
Notifications
You must be signed in to change notification settings - Fork 33
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
Hybrid Rate Rules #583
Merged
Merged
Hybrid Rate Rules #583
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Restructure call order in constructor - Add `use_*` methods for reactions to separate concerns
When calling `BuildEngine#prepare`, the `model` argument can be either a `Model` or `SanitizedModel`. - Converts `Model` to `SanitizedModel` - Hybrid solver overrides `_build` to pre-convert and add options - Removed `__init__` call in hybrid solver, replaced with `_build`
- No classes accept `custom_definitions` as constructor arguments - No functions accept `custom_definitions` as arguments - Replaced `custom_definitions` with `SanitizedModel#get_options`
- Added template handling for rate rules in C++ templates - Updated `DifferentialEquation` class to operate on rate rules - Replaced `std::vector` usage with raw pointers - Allows passing integrator state from Sundials to rate rule object
- Pulls `name` property from `Species` object - Converts from string to `Species` if necessary - Moved reserved names to a separate dict
- Add new template header, `template_params.h` - Provides `extern` declarations to Gillespy params - Remove `static` keyword from `template.cpp` params
Branch `feature/expression-validation` implements these already
Was preventing new options from being populated if no prior options existed - Changed call to use auxiliary method to generate options dict - Explicit check added to the result of this method
- Added `boundary_conditions` property to C++ `HybridSpecies` class - Added template parameter `boundary_mode` to `GPY_HYBRID_SPECIES_MODES` - Added `boundary_conditions` check before state update
- Added `#include` for math operations in partial template header - Added `std` namespace strip to be compatible with C operations - Added `factorial()` definition
- Created `test_tau_hybrid_c_solver.py` test file with test cases for `TauHybridCSolver` - Added test cases for models using rate rules and boundary conditions - Fixed issue in RHS function not initializing boundary condition values
seanebum
approved these changes
Sep 14, 2021
… feature/cpp-hybrid-rate-rules
BryanRumsey
requested changes
Sep 21, 2021
… feature/cpp-hybrid-rate-rules
… parameter as a variable.
BryanRumsey
approved these changes
Sep 21, 2021
briandrawert
approved these changes
Sep 21, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: This implementation of rate rules is dependent on the
Expression
utility class implemented in PR #582. Please merge that one in first!Implementation of SBML rate rules (represented with
RateRule
class) for theTauHybridCSolver
class. Includes full support for math operations, as well as access to the point-in-time valuet
. Expressions are contextual to differential equations and make use of integrator state in the RHS function of the integrator.Changes
TauHybridCSolver
class for SBML rate rules.template_params.h
header file to allow solver-specific template objects to access model parameters.cmath
include to provide access to math functions in propensity functions and rate rules