11aecadfacf1c4e95fac567afd007e2135f2c86b,cistar-dev/cistar/controllers/base_controller.py,BaseController,safe_action,#BaseController#Any#,38

Before Change


         USE THIS INSTEAD OF GET_ACTION for computing the actual controls.
        Prevents crashes. 
        
        return min(self.get_action(env), self.safe_velocity(env))

    def safe_velocity(self, env):
        Finds maximum velocity such that if the lead vehicle breaks
        with max acceleration, we can bring the following vehicle to rest

After Change


        if this_vel + self.get_action(env)*time_step > safe_velocity:
            return (safe_velocity - this_vel)/time_step
        else:
            return self.get_action(env)


    def safe_velocity(self, env):
        Finds maximum velocity such that if the lead vehicle breaks
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: flow-project/flow
Commit Name: 11aecadfacf1c4e95fac567afd007e2135f2c86b
Time: 2017-02-27
Author: eugenevinitsky@calvisitor-10-105-138-180.calvisitor.1918.berkeley.edu
File Name: cistar-dev/cistar/controllers/base_controller.py
Class Name: BaseController
Method Name: safe_action


Project Name: flow-project/flow
Commit Name: a767813b1aae7c7b4ba59b88c2dc9beab1e8c1ba
Time: 2017-03-07
Author: eugenevinitsky@calvisitor-10-105-138-180.calvisitor.1918.berkeley.edu
File Name: cistar-dev/cistar/controllers/base_controller.py
Class Name: BaseController
Method Name: safe_action


Project Name: reinforceio/tensorforce
Commit Name: ca070637fdd0292822eda0f43657c27ed8827c47
Time: 2017-04-29
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/agents/dqfd_agent.py
Class Name: DQFDAgent
Method Name: get_action