(self, time_elapsed, paused)
return finished
Simulate a simulation step.
Simulate a simulation step.
Simulate a simulation step .
def _step_simulation(self, time_elapsed, paused):
    """Simulate a simulation step."""
    finished = False
    if paused:
      self._step_paused()
    else:
      step_duration = min(time_elapsed, self.simulation_time_budget)
      actual_simulation_time = self.get_time()
      if self._tracked_simulation_time >= actual_simulation_time:
        end_time = actual_simulation_time + step_duration
        while not finished and self.get_time() < end_time:
          finished = self._step()
      self._tracked_simulation_time += step_duration
    return finished
def _step_simulation ( self , time_elapsed , paused ) : finished = False if paused : self . _step_paused ( ) else : step_duration = min ( time_elapsed , self . simulation_time_budget ) actual_simulation_time = self . get_time ( ) if self . _tracked_simulation_time >= actual_simulation_time : end_time = actual_simulation_time + step_duration while not finished and self . get_time ( ) < end_time : finished = self . _step ( ) self . _tracked_simulation_time += step_duration return finished