parameters: (self,  id_mode=None, mode=None, is_sumoid=False)
docstring: Returns  vehicle type ID of mode id_mode,
          chosen according to  predefined probabilities.
          depricated? Used by mapmatching
docstring_summary: Returns  vehicle type ID of mode id_mode,
          chosen according to  predefined probabilities.
          depricated? Used by mapmatching
docstring_tokens: Returns vehicle type ID of mode id_mode chosen according to predefined probabilities . depricated? Used by mapmatching
function: def get_vtype_for_mode(self,  id_mode=None, mode=None, is_sumoid=False):
          """
          Returns  vehicle type ID of mode id_mode,
          chosen according to  predefined probabilities.
          depricated? Used by mapmatching
          """
          # print 'get_vtypes_for_mode', id_mode, mode
          #
          if id_mode is None:
              id_mode = MODES[mode]
  
          ids_veh_mode = self.select_ids(self.ids_mode.get_value() == id_mode)
          if len(ids_veh_mode) == 0:
              return -1  # no vehicle type of this mode
  
          share_veh_mode = self.shares_in_mode[ids_veh_mode]
  
          # print '  ids_veh_mode',ids_veh_mode
          # print '  share_veh_mode',share_veh_mode
          ind = np.argmax(random.rand(len(share_veh_mode))*share_veh_mode)
          if is_sumoid:
              return self.ids_sumo[ids_veh_mode[ind]]
          else:
              return ids_veh_mode[ind]
function_tokens: def get_vtype_for_mode ( self , id_mode = None , mode = None , is_sumoid = False ) : # print 'get_vtypes_for_mode', id_mode, mode # if id_mode is None : id_mode = MODES [ mode ] ids_veh_mode = self . select_ids ( self . ids_mode . get_value ( ) == id_mode ) if len ( ids_veh_mode ) == 0 : return - 1 # no vehicle type of this mode share_veh_mode = self . shares_in_mode [ ids_veh_mode ] # print '  ids_veh_mode',ids_veh_mode # print '  share_veh_mode',share_veh_mode ind = np . argmax ( random . rand ( len ( share_veh_mode ) ) * share_veh_mode ) if is_sumoid : return self . ids_sumo [ ids_veh_mode [ ind ] ] else : return ids_veh_mode [ ind ]