Optimization of intervention levels in ecological restoration