Optimal weed control under static and dynamic decision rules