Skip to content

Commit 52d7e2e

Browse files
k-arakaneHiroaki Imoto
andauthored
Fix infinite loop during parameter estimation (#40)
Hello @himoto! I hope this finds you well. While reproducing the results in this repository, we found that the code gets stuck in an infinite loop during [the parameter estimation step](https://pasmopy.github.io/breast_cancer/getting-started/individualization.html). More specifically, it was failing to generate the initial values for the parameters, causing the code to retry indefinitely. After some investigation, I think I have pinned down the cause of this problem to the line that checked the exit status of the simulation: `is_successful = ifelse(sol.retcode === :Success, true, false)` Changing the comparison operator to a *looser* `==` fixed the problem. It's a very subtle change, but I thought I'd push this in case anyone else wants to reproduce the results. Co-authored-by: Hiroaki Imoto <hiroaki.imoto@ucd.ie>
1 parent 55ba0f5 commit 52d7e2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

training/erbb_network_jl/simulation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function solveode(
4444
prob,CVODE_BDF(),
4545
abstol=ABSTOL,reltol=RELTOL,saveat=dt,dtmin=eps(),verbose=false
4646
)
47-
is_successful = ifelse(sol.retcode === :Success, true, false)
47+
is_successful = ifelse(sol.retcode == :Success, true, false)
4848
catch
4949
is_successful = false
5050
finally
@@ -71,7 +71,7 @@ function get_steady_state(
7171
),
7272
dt=dt,verbose=false
7373
)
74-
is_successful = ifelse(sol.retcode === :Success, true, false)
74+
is_successful = ifelse(sol.retcode == :Success, true, false)
7575
catch
7676
is_successful = false
7777
finally

0 commit comments

Comments
 (0)