I would like to formulate the following problem:
Each state has multiple counties and each county has multiple municipalities. I have treatment cities and possible control cities (more possible control cities than treatment cities). I want to match each treatment city with the closest control cities (1:1) within the smallest administrative level possible.
So in the first iteration, we try to match each treated city to a control city within the same municipality so that the total distance of matches found is minimized. For the treated cities that could not be matched (as there was no possible control city in the same municipality), we repeat the step with possible control cities in the same county (second iteration). Finally, the remaining non-matching treated cities are matched with control cities in the same state (third iteration).
Furthermore, we restrict matches in each iteration to treat and control cities having the same urbanization status $u$. In the following, the assignment problem ($v$=treated, $c$=control) is shown without the iterative structure and the urbanization constraint. How can I adjust my formulation to take this into account? (I know how to code this but struggle to find the right formulation)
