Stochastic modeling and decision making in two healthcare applications: inpatient flow management and influenza pandemics