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

Calculate rates of change for dependent species #1013

Open
hsauro opened this issue May 24, 2022 · 2 comments
Open

Calculate rates of change for dependent species #1013

hsauro opened this issue May 24, 2022 · 2 comments
Assignees

Comments

@hsauro
Copy link

hsauro commented May 24, 2022

Add the following new methods (I assume getRatesOfChange is deprecated) to the C API (rrc_api.cpp)

vector getFloatingSpeciesRatesOfChange (RoadRunner* rr, bool amounts);
vector getIndFloatingSpeciesRatesOfChange (RoadRunner* rr, bool amounts);
vector getDepFloatingSpeciesRatesOfChange (RoadRunner* rr, bool amounts);

The methods should include some kind of flag (bool or int?) to set whether the rate of amounts or concentrations are to be returned.

Obviously, we also need to add the corresponding C interface methods, eg:

RRVectorPtr rrcCallConv getFloatingSpeciesRatesOfChange (RRHandle handle, bool amounts);

@luciansmith
Copy link

Currently, all dependent species have no rates of change because when conserved moiety analysis is on, they are set by assignment rules. In this particular case, we can back-calculate the rate of change and provide it if asked. If we do, it would also be possible to add it to the list of all floating species rates of change, and the dependent floating species rates of change.

Note that there's not a way to easily calculate the rate of change for anything else set by an assignment rule, only those species whos values are set by an assignment rule due to turning on conserved moiety analysis.

@luciansmith luciansmith changed the title C API: Add new rates of change methods Calculate rates of change for dependent species May 25, 2022
@luciansmith
Copy link

Once we have the calculated values, we can provide new API routines, for both C and C++

getIndependentRatesOfChangeIds --> currently implemented by getRatesofChangeIds.
getDependentRatesOfChangeIds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants