This patch provides an implementation of a ns-3 model for PI Square (or PI2) . It contains the required documentation, example and the test suite for PI2.
I have followed the Linux Implementation of PI2 to implement this queue disc in ns-3.
The PI2 paper states minor changes in the design with regard to PIE. However, I felt that the changes were substantial enough to make it as a separate module in ns-3.
I would be glad if you could look into the implementation and provide your feedback.
Thank you very much,
Rohit P. Tahiliani
 De Schepper, K., Bondarenko, O., Tsang, J., & Briscoe, B. (2016, November). PI2: A Linearized AQM for both Classic and Scalable TCP. In Proceedings of the 12th International on Conference on emerging Networking EXperiments and Technologies (pp. 105-119). ACM.