Text this: Grid structure optimization using slow coherency theory and holomorphic embedding method