An optimal control method for valve regulation based on Pontryagin’s principle in energy interconnection systems | Synapse