Method of controlling engine stop-start operation for heavy-duty hybrid-electric and hybrid-hydraulic vehicles