An analysis of cost relationships in grain plants