flow-project / flow

Computational framework for reinforcement learning in traffic control
MIT License
1.06k stars 375 forks source link

Incompatibilities with Aimsun in new Flow release #551

Closed nathanlct closed 5 years ago

nathanlct commented 5 years ago

Choose an option This is a:

Describe the issue Aimsun examples are not running in Flow release 0.4.0

Two bugs I had but there might be more, I didn't dwelve into it much:

        self.__vehicles.clear()
        for typ in vehicles.initial:
            for i in range(typ['num_vehicles']):
                veh_id = '{}_{}'.format(typ['veh_id'], i)
                self.__vehicles[veh_id] = dict()
                self.__vehicles[veh_id]['type'] = typ['veh_id']
                self.__vehicles[veh_id]['initial_speed'] = typ['initial_speed']
                self.num_vehicles += 1
                if typ['acceleration_controller'][0] == RLController:
                    self.num_rl_vehicles += 1

I'll look into it more later, especially I'll try to find a way to write tests for Aimsun so that this doesn't happen in the future.

To Reproduce Run an Aimsun example (sugiyama, figure eight...) with the latest Flow release.

nathanlct commented 5 years ago

Fixed in #565