Safe Coordination Of A Collection Of Switched Systems, Applied To Coordination Of Distributed Energy Resources