public void RunMultipleStepByStep(SignalProgram signalProgram, int numberOfSimulations)
 {
     for (int i = 0; i < numberOfSimulations; i++)
     {
         RunStepByStep(signalProgram);
     }
     //
 }
 /// <summary>
 /// Runs entire simulation step by step
 /// </summary>
 /// <param name="signalProgram">Current signal program</param>
 public void RunStepByStep(SignalProgram signalProgram)
 {
     simulationPeriod = COM.getSimulationPeriod(currentSimulation);
     simulationTime   = 0;
     for (int i = 0; i < (simulationPeriod * simulationResolution); i++)
     {
         SimulationStep(signalProgram);
         simulationTime = simulationTime + (1 / simulationResolution);
     }
     //GET SIMULATION RESULTS HERE
 }
 /// <summary>
 /// Performs one sigle simulation step, and checks possible algorithms and implemenations
 /// </summary>
 public void SimulationStep(SignalProgram signalProgram)
 {
     try
     {
         currentSimulation.RunSingleStep();
         SensorCheck();
         signalProgram.Step(this.simulationResolution, vissimConnection.GetVissimInstance());
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }