Text this: Determination of the Optimal Algorithm for the Operation of a Hybrid Power System with a Regulating Generator