AbstractThe outbreak of coronavirus disease 2019 (COVID-19) disrupted our regular life. Many local authorities enforced a cordon sanitaire to contain the rapid spread of the disease. Travelers can only pass the cordon after the disease screening. This paper aims to propose a method to design a traffic inflow control scheme for onramp metering to maximize urban freeway network throughput with an endurable queuing delay constraint at all offramps around cordon sanitaire. A bilevel programming model is formulated where the lower level is transportation system equilibrium to predict link traffic flows. The upper level is onramp metering optimization that is nonlinear programming. A stochastic queuing model is used to represent the waiting phenomenon at each offramp where the disease testing is conducted. A heuristic algorithm is designed to solve the proposed bilevel programming model where the method of successive averages (MSA) is adopted for the lower-level model, and a genetic algorithm (GA) with elite strategy is adopted for the upper-level model. An experimental study is conducted to demonstrate the effectiveness of the proposed method and algorithm. The results show that these methods can find a good heuristic optimal solution. These methods are useful for freeway operators to determine the optimal onramp control for disease control and prevention. They are also beneficial to set up checkpoints for all kinds of risks such as drunk driving and criminal searching.