Commit 3e83a872 authored by Nathaniel Osgood (ndo885)'s avatar Nathaniel Osgood (ndo885)
Browse files

Fixed formula for CompletingLatentPeriod to not scale by dt, given that...

Fixed formula for CompletingLatentPeriod to not scale by dt, given that resulting net flows are multiplied by dt
parent cfa72a20
......@@ -166,7 +166,7 @@ countParticles <- 800; # # 800;
#countMCMCIterations <- 100;
#countMCMCIterations <- 50000;
countMCMCIterations <- 6000;
countMCMCIterations <- 120000; # started 23:07
countReportingPeriod <- 1; # report every MCMC iteration
countObservables <- 1; # one observable per observable timepoint (prevalence)
......
......@@ -2474,13 +2474,13 @@ double integrateODEFromPreviousToCurrentTimepointModelSpecificOsgoodLiuPF2014(in
prevalenceOfInfection), 5);
#endif
double MeanLatentPeriodInWeeks = 0.42857;
double CompletingLatentPeriod = (currentE / MeanLatentPeriodInWeeks)*dt;
currentE += (NewInfectionsFlow - CompletingLatentPeriod)*dt;
double CompletingLatentPeriodFlow = (currentE / MeanLatentPeriodInWeeks);
currentE += (NewInfectionsFlow - CompletingLatentPeriodFlow)*dt;
double MeanTimeToRecoveryInWeeks = 1.0;
double Recovery = (currentI / MeanTimeToRecoveryInWeeks);
currentI += (CompletingLatentPeriod - Recovery)*dt;
currentR += (Recovery)*dt;
double RecoveryFlow = (currentI / MeanTimeToRecoveryInWeeks);
currentI += (CompletingLatentPeriodFlow - RecoveryFlow)*dt;
currentR += (RecoveryFlow)*dt;
// now initialize the contacts per day
double perturbC = rnorm(0, cRandomWalkStdDev); // draw a value from a normal distribution with mean 0, standard deviation cRandomWalkStdDev
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment