Abstract Vigorously developing flexible resources in power systems will be the key to building a new power system and realizing energy transformation. The investment construction cost and operation cost of various flexible resources are different, and the adjustment ability is different in different timescales. Therefore, the optimization of complementary allocation of various resources needs to take into account the economy and adjustment ability of different resources. In this paper, the global K-means load clustering model is proposed and the 365-day net load is reduced to eight typical daily net loads by clustering. Secondly, a two-level optimization model of flexible resource complementary allocation considering wind power and photovoltaic consumption is constructed. The flexible resources involved include the flexible transformation of thermal power, hydropower, pumped storage, energy storage, and demand response. The upper-layer model optimizes the capacity allocation of various flexible resources with the minimum investment and construction cost as the goal and the lower layer optimizes the operating output of various units with the minimum operating cost as the goal. The results of the example analysis show that the flexible capacity of thermal power units has nothing to do with the abandonment rate of renewable energy. As the abandonment rate of renewable energy decreases, the optimal capacity of pumped storage, electrochemical energy storage, and hydropower units increases. When the power-abandonment rate of renewable energy is 5%, the optimal allocation capacity of thermal power flexibility transformation, pumped storage, electrochemical energy storage, hydropower unit, and adjustable load in Province A is 5313, 17 090, 5830, 72 113, and 4250 MW, respectively. Under the condition that the renewable-energy abandonment rate is 0, 5%, and 10% respectively, the configured capacity of pumped storage is 20 000, 17 090, and 14 847 MW, respectively.