Improved P-cycle Capacity Optimization Algorithm