1c016b3e14c5e13034481a15bbdacd402750a50a,flow/utils/rllib.py,,get_flow_params,#Any#,140

Before Change


    // reinitialize the vehicles class from stored data
    veh = Vehicles()
    for veh_id, veh_params in flow_params["veh"].items():
        acceleration_controller = (
            eval(veh_params["acceleration_controller"][0]),
            veh_params["acceleration_controller"][1])

        lane_change_controller = (
            eval(veh_params["lane_change_controller"][0]),
            veh_params["lane_change_controller"][1])

After Change


        veh_id = veh_params["veh_id"]
        print(veh_id)

        module = __import__(
            "flow.controllers",
            fromlist=[veh_params["acceleration_controller"][0]]
        )
        acc_class = getattr(module, veh_params["acceleration_controller"][0])
        lc_class = getattr(module, veh_params["lane_change_controller"][0])

        acc_controller = (acc_class, veh_params["acceleration_controller"][1])
        lc_controller = (lc_class, veh_params["lane_change_controller"][1])

        rt_controller = None
        if veh_params["routing_controller"] is not None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: flow-project/flow
Commit Name: 1c016b3e14c5e13034481a15bbdacd402750a50a
Time: 2018-05-06
Author: akreidieh@gmail.com
File Name: flow/utils/rllib.py
Class Name:
Method Name: get_flow_params


Project Name: flow-project/flow
Commit Name: 57620dad729d59f27ee7745fa3a48491045f7c0c
Time: 2018-11-16
Author: akreidieh@gmail.com
File Name: flow/benchmarks/baselines/merge012.py
Class Name:
Method Name: merge_baseline


Project Name: pyannote/pyannote-audio
Commit Name: abbfdc5b04ec1824e42cebb472626d234ff7bd36
Time: 2017-01-09
Author: bredin@limsi.fr
File Name: scripts/speaker_embedding.py
Class Name:
Method Name: tune


Project Name: pyannote/pyannote-audio
Commit Name: abbfdc5b04ec1824e42cebb472626d234ff7bd36
Time: 2017-01-09
Author: bredin@limsi.fr
File Name: scripts/speaker_embedding.py
Class Name:
Method Name: test