wsyCUHK / Reinforcement-Learning-for-Real-time-Pricing-and-Scheduling-Control-in-EV-Charging-Stations

Reinforcement Learning for Real time Pricing and Scheduling Control in EV Charging Stations
123 stars 32 forks source link

the charging order is right? #6

Open lalala215 opened 2 years ago

lalala215 commented 2 years ago

https://github.com/wsyCUHK/Reinforcement-Learning-for-Real-time-Pricing-and-Scheduling-Control-in-EV-Charging-Stations/blob/cbd4c8b3be01f779bb2c7e9fad9cc2c822b49442/code/HSA.py#L77-L83

Dear Author I am wondering If this order is right? order=[operator.itemgetter(0)(t)-1 for t in sorted(enumerate(least,1), key=operator.itemgetter(1), reverse=True)]

residual_demand[:,1] is parking time residual_demand[:,0] is charging demand

order put the biggest in least as the most need to be charged. But the biggest in least means its parking time is much larger than charging demand, I thought in this case the biggest in least means it can wait more time, so cannot put it as the most urgent.

maybe the reserse should be False, such as: order=[operator.itemgetter(0)(t)-1 for t in sorted(enumerate(least,1), key=operator.itemgetter(1), reverse=False)]

wsyCUHK commented 2 years ago

Yes, the reverse should be False. Thank you for pointing out the error. I will check the code recently.

lalala215 commented 2 years ago

OK! And I also have other two questions:

  1. this line 38 no need for indentation https://github.com/wsyCUHK/Reinforcement-Learning-for-Real-time-Pricing-and-Scheduling-Control-in-EV-Charging-Stations/blob/cbd4c8b3be01f779bb2c7e9fad9cc2c822b49442/code/HSA.py#L36-L43

  2. In the paper feature2(Eq.(15)) is electricity price multiply total charging rate f{2}\left(S{t}, A{t}\right)=-c{t} e_{t} However in line 115 the feature2 is action[1], i.e. the total charging rate. https://github.com/wsyCUHK/Reinforcement-Learning-for-Real-time-Pricing-and-Scheduling-Control-in-EV-Charging-Stations/blob/cbd4c8b3be01f779bb2c7e9fad9cc2c822b49442/code/HSA.py#L115