I think you need a Machine Learning built on top of SDN to mitigate DDoS attack.
We usuallay use Mininet to build the network topology and POX controller to simulate the attack and the solution. POX controller is python-friendly tool where there exist several ML libraries to use. The Mininet hosts is somehow like real virtual machine and you can easily configure them and use common DDoS on top of them.
SDN DDoS attack Simulation tools using Machine learning are Software Defined Networking (SDN), as a new type of network architecture, has certain advantages in DDoS attack detection. Compared with traditional circuit-switched networks, SDN adopts a separated control and forwarding mode of operation and make the network programming. With the deepening and development of SDN research, the application of SDN network architecture in the traditional VNs architecture has better performance in security management. The emergence of SDN paradigm has created tremendous potential for the development of VNs. Different from traditional VNs, Software Defined Vehicular Networks (SDVNs) have rich management advantages due to the centralized intelligent control brought by SDN [2]. As shown in Figure 1, the SDN framework introduces application plane and control plane to VNs. The application plane is designed to provide a set of services and applications.
I looked at a lot of tools for my purpose and ended up using NetSim by Tetcos in labs to simulate DDOS attacks. It is pretty flexible and feature-rich. It has both an SDN module and can also interface with Python for machine learning. You can even integrate with MATLAB or Wireshark natively as well.
You can find their projects already created in git also.