A Component-Based Framework for Simulating Agricultural Production and Externalities