An Optimal Control Framework for Resources Management in Agriculture. (23rd September 2013)