An agricultural system (102) includes a drivetrain (106) with an engine (202), and an electric machine (208) configured to be operated in a motor mode or a generator mode, and a control unit (110) configured to execute a method including determining a maximum total system efficiency of the…