alsnhll / SEIR_COVID19

SEIR model for COVID-19 infection, including different clinical trajectories of infection
194 stars 105 forks source link

Problem with maximum time and intervention end time mismatch #7

Closed mountainMath closed 4 years ago

mountainMath commented 4 years ago

Thanks for making this great app available! The intervention and capacity tabs currently crash when adjusting the maximum time below the default 300 without also adjusting the intervention end time accordingly.

Capping the intervention end time at the maximum time of the simulation solves this. Or just replacing

Tend=input$Tend

with

Tend=pmin(input$Tend,input$Tmax)

in the SimSEIRintB function.

alsnhll commented 4 years ago

Thanks! I actually had something in the code that creates the sliders to catch this, but it was only updating the maximum value of Tend, not the currently selected value, which weirdly is not responsive the maximum. Your solution works great :) I'm deploying a new version tonight with a bunch of updates and I'll include this.