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:
There is a new method get_initial_speed in vehicle/traci.py that is not in vehicle/base.py nor in vehicle/aimsun.py, but at some point it gets called on the Aimsun vehicle kernel, thus resulting in an error.
There is a new section in aimsun/vehicle.py to add vehicles (on top of the add and add_vehicle methods) that doesn't define everything the vehicle needs (in particular 'type_name')
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.
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:
There is a new method
get_initial_speed
invehicle/traci.py
that is not invehicle/base.py
nor invehicle/aimsun.py
, but at some point it gets called on the Aimsun vehicle kernel, thus resulting in an error.There is a new section in
aimsun/vehicle.py
to add vehicles (on top of theadd
andadd_vehicle
methods) that doesn't define everything the vehicle needs (in particular'type_name'
)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.