The first method and system that provide combined optimal cell PCI and RSI allocation in 5G wireless networks. It essentially addresses PCI/RSI requirements specific to 5G deployment. It provides initial optimal PCI/RSI allocation and automated PCI/RSI adjustment based on neighbor relation changes in 5G network. The system is implemented as a closed loop 5G SON use case in ONAP/ECOMP platform. The system is policy-driven where requirements can be added and/or removed as policies/rules.