Optimise allocation of nitrogen within leaf to maximise net photosynthesis