From: Chaitanya M. <Cha...@ni...> - 2011-09-21 03:31:40
|
Good Day, All On congested networks, cars tend to get stuck at green lights even when the following lane is empty. This seems to be happening because cars are waiting on each other assuming a car that partially overlaps into a junction's internal lane is blocking it (foe traffic). I have here an example as well as the snippet of code where this happens. Please see attached image. Car t9135, which slightly overlaps into the junction in the top left, is blocking all cars at this junction. The car I am tracking is Vehicle t11151, which is in the bottom-centre, stuck at the green light. It's best lane goes straight ahead. The fix I'm thinking of is perhaps to alter the car following code so that no car tries to cross a junction unless the lane it is aiming for has enough space for it's vehicle class(or as an ad-hoc fix, say a certain fixed length). Would you suggest an alternative fix? Regards, Chaitanya In MSLink::opened(), for (std::vector<MSLane*>::const_iterator i=myFoeLanes.begin(); i!=myFoeLanes.end(); ++i) { if ((*i)->getVehicleNumber()>0||(*i)->getPartialOccupator()!=0) { //c if(testCar2 == true){ if((*i)->getVehicleNumber()>0){ std::cerr << "------------blocked foe lanes "<< (*i)->getVehicleNumber()<<" vehicles\n"; } else{ std::cerr << "------------blocked foe lanes "<< (*i)->getPartialOccupator()->getID()<<" vehicle_id\n"; } } // return false; } } The information in this e-mail may be confidential and subject to legal professional privilege and/or copyright. National ICT Australia Limited accepts no liability for any damage caused by this email or its attachments. |