user12345
user12345

Reputation: 55

Control lane change decision in SUMO

I am using VEINS 4.4 , OMNET 5.0 and SUMO 0.25 in my project. i want to stop vehicles from changing their lanes when they become near to the intersection .

i have searched in google but i didn't get an answer

how to do it, please ?

Upvotes: 0

Views: 561

Answers (1)

Hamzah
Hamzah

Reputation: 120

You need to implement a Traci command that control the changing lane in Veins. I came across this implementation in burtonwilliamt github rep:

void TraCICommandInterface::Vehicle::setLaneChangeMode(int32_t bitset) {
    uint8_t variableId = VAR_LANECHANGE_MODE;
    uint8_t variableType = TYPE_INTEGER;
    TraCIBuffer buf = traci->connection.query(CMD_SET_VEHICLE_VARIABLE, TraCIBuffer() << variableId << nodeId << variableType << bitset);
    ASSERT(buf.eof());
}

I have not tested it thou.

Upvotes: 1

Related Questions