The IBM System 370 computer systems used a motor-generator set to isolate the computer electronics from mains feeds. You just change the motor to match the power from the panel. (Frequency didn't matter to the generator side, because everything was converted to DC anyway.)
There are two things I wonder about.
1. According to the article they are going to be tapping into the existing California power grid. California has rolling brownouts and complete blackouts during the annual fire season. Imagine having to guarantee power to those ships even during the fire season.
2. How many ports worldwide have shore power readily available for every berth in every port. I imagine this is a 1st world every day thing, a 2nd world luxury and a 3rd world pipe dream.
This isn’t a necessary policy. It’s one of those Green policies that isn’t well thought out.