Dynamic control of rural–urban migration