How to add a controller? - illinoistech-itm/py-mgipsim GitHub Wiki
Define controller class
Define the class similarly to already existing ones in the pymgipsim/Controllers folder.
The controller has to have a unique name, same as the folder name.
run function of the controller will be called in every sampling time of the simulation with the available data up to that point. The function has to modify inplace the current sample of the input array.
Adding it to the solver
Add the controller to the set_controller function in pymgipsim/ModelSolver/singlescale.py.
Update plots
Update plotting function with specifics of the defined controller.