ebf39920ac018372b6f10b487c07feaaf7525fa4,flow/core/kernel/vehicle/aimsun.py,AimsunKernelVehicle,get_position,#AimsunKernelVehicle#Any#Any#,419

Before Change


    def get_position(self, veh_id, error=-1001):
        See parent class.
        // FIXME: do it the way we do, in case veh_id is not a list
        positions = []
        for veh in veh_id:
            pos = self.__vehicles[veh]["tracking_info"].CurrentPos
            positions.append(pos)
        return positions

    def get_position_world(self, veh_id, error=-1001):
        Return the position of the vehicle relative to its current edge.

After Change



    def get_position(self, veh_id, error=-1001):
        See parent class.
        if isinstance(veh_id, (list, np.ndarray)):
            return [self.get_position(veh, error) for veh in veh_id]
        return self.__vehicles[veh_id]["tracking_info"].CurrentPos

    def get_position_world(self, veh_id, error=-1001):
        Return the position of the vehicle relative to its current edge.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 20

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_position


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_position


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_speed


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_lane