parameters: (self, id_veh, length_plat)
docstring: Propagates length to the first vehicle of the platoon
docstring_summary: Propagates length to the first vehicle of the platoon
docstring_tokens: Propagates length to the first vehicle of the platoon
function: def _update_concatenate(self, id_veh, length_plat):
          """
          Propagates length to the first vehicle of the platoon
          """
          # TODO: this is a very inefficient method because call each time a vehicle is added.
          # Try to avoid altogether
          print '_update_concatenate prt.%s, length_plat=%.1f, length=%.1f,' % (id_veh, length_plat, self.length), 'id_leader', self.ids_leader[id_veh]
          if self.ids_leader[id_veh] == -1:
              # first vehicle
              # print '  first vehicle prt.%s'%id_veh,length_plat
              self.lengths_plat[id_veh] = length_plat
          else:
              # propagate platoon length
              self.lengths_plat[id_veh] = 0.0
              self._update_concatenate(self.ids_leader[id_veh], length_plat + self.length)
function_tokens: def _update_concatenate ( self , id_veh , length_plat ) : # TODO: this is a very inefficient method because call each time a vehicle is added. # Try to avoid altogether print '_update_concatenate prt.%s, length_plat=%.1f, length=%.1f,' % ( id_veh , length_plat , self . length ) , 'id_leader' , self . ids_leader [ id_veh ] if self . ids_leader [ id_veh ] == - 1 : # first vehicle # print '  first vehicle prt.%s'%id_veh,length_plat self . lengths_plat [ id_veh ] = length_plat else : # propagate platoon length self . lengths_plat [ id_veh ] = 0.0 self . _update_concatenate ( self . ids_leader [ id_veh ] , length_plat + self . length )