There is currently an under-documented hooks system in the latest version of NengoGUI (0.47.0). You can use the
on_start hook to get access to the simulator object and run the ablation function.
I have not done it myself, but I believe the way that you use it is like this:
# Create your model as usual, but do not construct a nengo.Simulator
# Then at the bottom of your model, add in this:
ablate_ensemble(ens, 0.01, sim)
The print statement there isn’t necessary, but I thought it would be useful to ensure that you are indeed running this hook function when you start the simulation in the GUI.