act.addSensorPtr(sens) control.addActuatorPtr(act) # Initialization process.initialize(processSimulation) control.initialize() # This is not working right now #eventsManager = s.eventsManager() # Matrix for data storage dataPlot = empty((N+1, outputSize)) #dataPlot[0, 0] = processDS.t0() dataPlot[0, 0] = t0 dataPlot[0, 1] = processDS.x()[0] dataPlot[0, 2] = processDS.x()[1] dataPlot[0, 3] = processDS.z()[0] dataPlot[0, 4] = processDS.z()[1] # Main loop k = 1 while(processSimulation.hasNextEvent()): processSimulation.computeOneStep() dataPlot[k, 0] = processSimulation.nextTime() dataPlot[k, 1] = processDS.x()[0] dataPlot[k, 2] = processDS.x()[1] dataPlot[k, 3] = processDS.z()[0] dataPlot[k, 4] = processDS.z()[1] k += 1 print processSimulation.nextTime() processSimulation.nextStep() # Resize matrix