add  a piece of code for  stoped button

if (!ujObj.isRunning) {
            sim.resetSimulation();

        }