Modeling energy and agriculture interactions—I: A rural energy systems model