Skip to content

Fix ResidualJunctionCompartment not applying stochasticity correctly#473

Merged
Rowanmh merged 2 commits intostochastic_transitionsfrom
stochastic_transitions_fix
May 10, 2023
Merged

Fix ResidualJunctionCompartment not applying stochasticity correctly#473
Rowanmh merged 2 commits intostochastic_transitionsfrom
stochastic_transitions_fix

Conversation

@kelvinburke
Copy link
Contributor

The trouble was with a ">" residual link.

  • outflow wasn't updated with the stochastic outflow_fractions, and
  • The probabilities need to sum to 1 in a multinomial so we give the residual probability to the residual link

Also, this checks that net_inflow is an integer and throws an error if it is not. The other links coming into the ResidualJunctionCompartment should have integer flows when stochastic = True but I'm not sure it is appropriate to check this here and throw an error?

…with a ">" residual link.

 - `outflow` wasn't updated with the stochastic outflow_fractions, and
 - The probabilities need to sum to 1 in a multinomial so we give the residual probability to the residual link
 - Also checks that net_inflow is an integer and throws an error if it is not
@kelvinburke kelvinburke requested a review from Rowanmh March 2, 2023 03:40
@Rowanmh Rowanmh merged commit b955a10 into stochastic_transitions May 10, 2023
@Rowanmh Rowanmh deleted the stochastic_transitions_fix branch May 10, 2023 06:58
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.

2 participants