lengths = []
for veh in veh_id:
lengths.append(self.__vehicles[veh]["length"]) // TODO double check
return lengths
def get_leader(self, veh_id, error=""):
See parent class.
// FIXME: do it the way we do, in case veh_id is not a list
After Change
def get_length(self, veh_id, error=-1001):
See parent class.
if isinstance(veh_id, (list, np.ndarray)):
return [self.get_length(veh, error)for veh in veh_id]
return self.__vehicles[veh_id]["static_info"].length
def get_leader(self, veh_id, error=""):