sumo
sumo copied to clipboard
show vClass-specific speeds in lane parameter dialog
Can I please work on this?
To my understanding, we should add new mkItem calls in GUILane::getParameterWindow() of the src/guisim/GUILane.cpp file. Is this correct?
Yes and yes. The new items should only be shown if the lane has vClass-specific speeds. The attribute name should be something like:
maxspeed [m/s] | 27.78
maxspeed (truck) | 16.67
with a slight indent to make it from a group with the default maxspeed [m/s] item
Awesome, thanks! Will work on it and make a PR soon.
and can we please rename the line to "allowed speed"?
Sure thing! Will do
Hello, while working on this, I faced an issue. This is the code so far:
if(MSNet::getInstance()->getRestrictions(myEdge->getEdgeType()) != nullptr){
auto map = MSNet::getInstance()->getRestrictions(myEdge->getEdgeType());
for (auto item = map->begin(); item != map->end(); item++) {
SUMOVehicleClass svc = item->first;
double speed = item->second;
// Convert svc into a string
// mkItem call
}
Can you please let me know if
- I'm on the right track
- If yes, how do you convert the
svcobject into a string for themkItemcall? I triedc_str()but it didn't work. - If not, which other function call I should focus on instead.
Thanks, Vijay
You can simply use toString(svc) to convert it into a string
Thanks a lot, https://github.com/eclipse/sumo/pull/11243 contains the changes mentioned, please check.
Thanks!