Closed SongKun2023 closed 1 year ago
Hello? Could you give me some help?
No reason to scream just because it's weekend and people do other stuff.
Please define useless. Where did you check the speed limit?
Hi, I'm so sorry to get back to you so late. there is a simple test in the zip file. And I set speed limits for several edges in code called "runner.py". As I have said that that the speed limit for the first edge is working ,the others are invalid.
Thanks a lot.
Hello sir?
You have defined vehicle class specific speed limits as part of edge types which override the general speed limit, see an excerpt of your net file below:
<type id="G0512" priority="14" numLanes="3" speed="33.33">
<restriction vClass="bus" speed="27.78"/>
<restriction vClass="trailer" speed="27.78"/>
</type>
<type id="G5" priority="14" numLanes="3" speed="33.33">
<restriction vClass="private" speed="30.00"/>
<restriction vClass="bus" speed="27.78"/>
<restriction vClass="truck" speed="28.00"/>
<restriction vClass="trailer" speed="27.78"/>
</type>
<type id="SA2" priority="14" numLanes="3" speed="27.78">
<restriction vClass="private" speed="30.56"/>
<restriction vClass="bus" speed="22.22"/>
<restriction vClass="truck" speed="30.56"/>
<restriction vClass="trailer" speed="22.22"/>
</type>
So you cannot have both at the same time. If you want to use traci.edge.setMaxSpeed
, please remove the speed restrictions.
OK, thank you sir. Can this conflict be resolved in the future, as both are important in my project.
what other methods can achieve the same goal?
A workaround: You can define multiple vehicle types and change the vehicles' type using a calibrator item at the begin and the end of the section previously using edge types. Define a different max. speed for the vehicle type you want to use inside this segment.
Thank you very much. I will try. And I want to know if the priority can be defined between different speed limit functions including dynamics and constants .
Add your issue description here. Hello sir. If I want to set the speed limit for multiple edges with traci, how can I do? For instance, I set the max speed for the two edges as is shown in the screenshot in below. I find that first is working, but the second is useless. I don't know the reason. I'll appreciate it if you can give me some suggestions.
SUMO-version: 1.17
operating system: Windows