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

What is the difference between toleranceMoveToCore and toleranceInterruptSimulation? #166

Closed
connie opened this issue Dec 9, 2013 · 5 comments

Comments

@connie
Copy link
Member

connie commented Dec 9, 2013

I am embarrassed to be asking this question, but can someone explain to me the difference in the two values used in the input.py file?

I see the logging statement:

Conducting simulation of reaction system 1...
At time 2.0000e-15 s, species [CH2]CCCCCCC(14) exceeded the minimum rate for moving to model core
Characteristic rate: 7.5653e-08 mol/m^3_s
[CH2]CCCCCCC(14) rate: 1.5641e-10 mol/m^3_s (0.002067)
At time 8.3886e-09 s, species CCCCCCC(C)OO exceeded the minimum rate for simulation interruption
Characteristic rate: 7.5653e-08 mol/m^3_s
CCCCCCC(C)OO rate: 9.0736e-09 mol/m^3_s (0.1199)

But only the first species gets added to the core. So what is the purpose of the toleranceInterruptSimulation?

@rwest
Copy link
Member

rwest commented Dec 13, 2013

If you aren't pruning, there is no need to have these differ, and they used to always be the same.
Once you have chosen which species first exceeded the movetocore threshold, you would interrupt the simulation, and move it to the core. Running simulations for longer is just a waste of time.

When we introduced pruning, we wanted to avoid pruning things that have low flux early in the simulation but are important later on, so we daredn't make pruning decisions until we have run a simulation to completeness. If we keep interrupting the simulation, this will never happen, and we will never prune. We therefore set another tolerance: interruptsimulation. Set this to infinity if you always want to run to completeness. However, if your leaking edge flux is really very high, your simulation probably can't be trusted... So some number that is high but not too high is a good choice. How high depends on how important it is for you to prune.

This should be documented somewhere. Is it not?

@KEHANG
Copy link
Member

KEHANG commented Dec 13, 2013

When choosing to prune, as you mentioned, we have to run to completeness. Just curious about the procedure of picking prunable species, we need rank the edge fluxes at goal conversion or rank the peak edge fluxes along simulation time?

@rwest
Copy link
Member

rwest commented Dec 13, 2013

I believe we rank based on peak relative flux reached at any point in the simulation. (Nb. The flux it is relative to changes throughout the simulation too)

@chatelak
Copy link
Contributor

chatelak commented Oct 3, 2014

I was on the way to open a new issue to understand their differences but this one is still running.
If I understood well the pruning needs to be high enough to avoid interrupting the simulation all the time and thus avoid to miss species which become important at the end of the simulation, is that correct?
Why don't we set the tolerancetoInterrupt as function of toleranceMoveToCore. With two or three if or even a case (it depends how much we want to make it precise):
toleranceToInterrupt = Z
toleranceMoveToCore = X
if X > 0.1
Z=1-(1-X)/2
if 0.01< X < 0.1
Z= 0.1 or if it is not precise enough Z=0.1-(0.1-X)/2
if 0.001 < X < 0.01
Z= 0.01 or if it is not precise enough Z=0.01-(0.01-X)/2
.......

Like this we could avoid user errors like the one I am pointing here #299

@connie
Copy link
Member Author

connie commented Jan 26, 2016

Updated in latest documentation and the warnings for how to set them are now in the code. (see the issue above)

@connie connie closed this as completed Jan 26, 2016
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

No branches or pull requests

4 participants