LiangZhang1996 / DataLight-old

code for "Data Might be Enough: Bridge Real-World Traffic Signal Control Using Offline Reinforcement Learning"
GNU General Public License v3.0
10 stars 1 forks source link

Meaning of phase_map feature in config #3

Closed sallyqiansun closed 1 year ago

sallyqiansun commented 1 year ago

Hi! May I ask how you formulated the phase_map feature in the configuration? Thanks in advance!

LiangZhang1996 commented 1 year ago

When we get the observations from the CityFlow simulator, the features are presented as a list of fixed order (from the lane). In our model, we would like to construct phase features from lane features, so phase_map is introduced to re-organize the lane features into phase features. If you are very familiar with the simulator, you may fully understand the usage.

sallyqiansun commented 1 year ago

Thank you! So for example, [[1, 4], [7, 10], [0, 3], [6, 9]] means that phase 0 corresponds to the 1st and 4th lanes' features, and phase 1 corresponds to the 7th and 10th lanes' features?

LiangZhang1996 commented 1 year ago

Yes, for more details, you can refer to the traffic road net file, which pre-defines the relationship between phase and lane. And our phase map is constructed according to that.