original_docstring: 
          Execute steps in sumo while gathering statistics
          
docstring: Execute steps in sumo while gathering statistics
docstring_tokens: Execute steps in sumo while gathering statistics
code: def _simulate(self, steps_todo):    
          """
          Execute steps in sumo while gathering statistics
          """
          if (self._step + steps_todo) >= self._max_steps:  # do not do more steps than the maximum allowed number of steps
              steps_todo = self._max_steps - self._step
  
          while steps_todo > 0:
              traci.simulationStep()  # simulate 1 step in sumo
              self._step += 1 # update the step counter
              steps_todo -= 1
              queue_length = self._get_queue_length()
              self._sum_queue_length += queue_length
              self._sum_waiting_time += queue_length # 1 step while waiting in queue means 1 second waited, for each car, therefore queue_lenght == waited_seconds
  
              #at each time step
              self._flow.append(self._get_flow())
              self._density.append(self._get_density())
              self._occupancy.append(self._get_occupancy())
code_tokens: def _simulate ( self , steps_todo ) : if ( self . _step + steps_todo ) >= self . _max_steps : steps_todo = self . _max_steps - self . _step while steps_todo > 0 : traci . simulationStep ( ) self . _step += 1 steps_todo -= 1 queue_length = self . _get_queue_length ( ) self . _sum_queue_length += queue_length self . _sum_waiting_time += queue_length self . _flow . append ( self . _get_flow ( ) ) self . _density . append ( self . _get_density ( ) ) self . _occupancy . append ( self . _get_occupancy ( ) )
short_docstring: Execute steps in sumo while gathering statistics
short_docstring_tokens: Execute steps in sumo while gathering statistics
comment: """
          Execute steps in sumo while gathering statistics
          """$SEP$# do not do more steps than the maximum allowed number of steps$SEP$# simulate 1 step in sumo$SEP$# update the step counter$SEP$# 1 step while waiting in queue means 1 second waited, for each car, therefore queue_lenght == waited_seconds$SEP$#at each time step