071b27b1ffc1c38e84f64fafcc126fafa54369a1,cistar-dev/cistar/envs/lane_changing.py,SimpleLaneChangingAccelerationEnvironment,getState,#SimpleLaneChangingAccelerationEnvironment#,68

Before Change



            sorted_ids = np.array(self.ids)[sorted_indx]

            sorted_rl_cars = np.array([0] * len(sorted_ids))
            sorted_rl_cars[:len(self.rl_ids)] = np.sort([self.vehicles[veh_id]["absolute_position"]
                                                         for veh_id in self.rl_ids])

            state = np.array([[self.vehicles[veh_id]["speed"],
                              self.vehicles[veh_id]["lane"],
                              self.vehicles[veh_id]["absolute_position"]] for veh_id in sorted_ids]).T
            // state = np.vstack((state, sorted_rl_cars))

            return state
        else:
            return np.array([[self.vehicles[veh_id]["speed"],
                              self.vehicles[veh_id]["lane"],
                              self.vehicles[veh_id]["absolute_position"]] for veh_id in self.ids]).T

After Change


        sorted_indx = np.argsort([self.vehicles[veh_id]["absolute_position"] for veh_id in self.ids])
        sorted_ids = np.array(self.ids)[sorted_indx]

        return np.array([[self.vehicles[veh_id]["speed"] + normal(0, kwargs["observation_vel_std"]),
                          self.vehicles[veh_id]["absolute_position"] + normal(0, kwargs["observation_pos_std"]),
                          self.vehicles[veh_id]["lane"]] for veh_id in sorted_ids]).T
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: flow-project/flow
Commit Name: 071b27b1ffc1c38e84f64fafcc126fafa54369a1
Time: 2017-07-05
Author: akreidieh@gmail.com
File Name: cistar-dev/cistar/envs/lane_changing.py
Class Name: SimpleLaneChangingAccelerationEnvironment
Method Name: getState


Project Name: DistrictDataLabs/yellowbrick
Commit Name: 4d0483edd1468855df714f77bca1a0a93f01cbce
Time: 2018-06-18
Author: benjamin@bengfort.com
File Name: tests/test_features/test_pca.py
Class Name: PCADecompositionTests
Method Name: test_scale_true_3d_execption


Project Name: BYU-PCCL/holodeck
Commit Name: c0d3f71a194f30b8b25cb37813452367a02fc45a
Time: 2017-09-05
Author: joshua.greaves@googlemail.com
File Name: example.py
Class Name:
Method Name: editor_example


Project Name: flow-project/flow
Commit Name: 071b27b1ffc1c38e84f64fafcc126fafa54369a1
Time: 2017-07-05
Author: akreidieh@gmail.com
File Name: cistar-dev/cistar/envs/lane_changing.py
Class Name: SimpleLaneChangingAccelerationEnvironment
Method Name: getState