Due to the Corona pandemic, measures to control the spread of the virus are much debated in society. Different countries pursued different policy approaches to reduce the outbreak of the pandemic. This paper deals with the optimal selection of measures to control the outbreak of a pandemic. The focus is on the beginning of a pandemic, when no vaccines or medical supplies are available. To illustrate the different approaches taken by governments, we demonstrate some practical data. We formulate a mathematical program to minimize the economic damage caused by measures while simultaneously considering the humanitarian damage caused by infections. To consider the progress of the pandemic, our model is based on epidemiological multi-group-SIRD model. This model is looking at a bunch of districts and their contact rates with each other. In each district, the population is divided into subgroups. The measures restrict contacts between these subgroups and affect the pandemic process. In addition to the consideration of minimizing costs, a limited mortality rate is also considered. To illustrate the model, a small case study inspired by cities in Germany is presented.