Solve ODEs in SEIR COVID-19 Model

With the rapid spread of the disease COVID-19, epidemiologists have devised a strategy to "flatten the curve" by applying various levels of social distancing. The strategy is to reduce the transmission of the virus SARS-CoV-2 so that the healthcare system is not overburdened. Social distancing lowers the total number of people who are infected to keep hospitals below full capacity and reduces the total cumulative infected. Social distancing also minimizes the pandemic until a vaccine or effective treatments can be developed. One of the downsides of extended social distancing is economic disruption where businesses fail, unemployment rises, supplies become scare, and assistance is needed to provide for the most vulnerable. Repeated outbreak cycles over multiple years are common when the virus mutates and the fraction of susceptible individuals is high. The objective of this exercise is to not just "flatten the curve" but to optimize social distancing to minimize the outbreak time and keep healthcare services below full capacity. SEIR Compartmental Model The fraction of Susceptible, Exposed, Infected, and Recovered (SEIR) population is given by a compartmental model with four differential equations. Susceptible (s): population fraction that is susceptible to the virus Exposed (e): population fraction is infected with the virus but does not transmit to others Infectious (i): population fraction that is infected and can infect others Recovered (r): population fraction recovered from infection and is immune from further infection This model is a simplification and neglects mortality and birth rates. There is also an opportunity to update the model with data sources such as search engine queries to improve early identification of regional outbreaks. Outbreak data on cruise ships give a controlled study to better assess under-reported cases. The model also neglects the variable fraction of infected patients that will need healthcare services. This fraction depends on how well vulnerable populations such as the elderly or immuno-compromised patients are protected. Source Code for Simulation: https://apmonitor.com/pdc/index.php/M... Source Code for Optimization: https://apmonitor.com/do/index.php/Ma...