Rate maximizing and state variable theories of diet selection