ebf39920ac018372b6f10b487c07feaaf7525fa4,flow/core/kernel/vehicle/aimsun.py,AimsunKernelVehicle,get_length,#AimsunKernelVehicle#Any#Any#,483

Before Change


        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=""):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: flow-project/flow
Commit Name: ebf39920ac018372b6f10b487c07feaaf7525fa4
Time: 2018-12-24
Author: akreidieh@gmail.com
File Name: flow/core/kernel/vehicle/aimsun.py
Class Name: AimsunKernelVehicle
Method Name: get_length


Project Name: flow-project/flow
Commit Name: 2e1726149346f5f555c2df28dccc629283d836c0
Time: 2018-01-30
Author: akreidieh@gmail.com
File Name: flow/core/vehicles.py
Class Name: Vehicles
Method Name: _prev_edge_followers


Project Name: flow-project/flow
Commit Name: 117232d40d5dc67aa174573aeccb743818ec36f7
Time: 2018-02-19
Author: akreidieh@gmail.com
File Name: flow/core/vehicles.py
Class Name: Vehicles
Method Name: get_length