Flexibility Resource Planning and Stability Optimization Methods for Power Systems with High Penetration of Renewable Energy | Synapse