  We introduce a model of the diffusion of an epidemic with demographically
heterogeneous agents interacting socially on a spatially structured network.
Contagion-risk averse agents respond behaviorally to the diffusion of the
infections by limiting their social interactions. Schools and workplaces also
respond by allowing students and employees to attend and work remotely. The
spatial structure induces local herd immunities along socio-demographic
dimensions, which significantly affect the dynamics of infections. We study
several non-pharmaceutical interventions; e.g., i) lockdown rules, which set
thresholds on the spread of the infection for the closing and reopening of
economic activities; ii) neighborhood lockdowns, leveraging granular
(neighborhood-level) information to improve the effectiveness public health
policies; iii) selective lockdowns, which restrict social interactions by
location (in the network) and by the demographic characteristics of the agents.
Substantiating a "Lucas critique" argument, we assess the cost of naive
discretionary policies ignoring agents and firms' behavioral responses.
