Hello,

I am writing this email to ask about an error I encountered in using traci. I 
developed on Ubuntu 20.0 with SUMO 1.8.0.

In one of my projects, I intended to develop an adaptive traffic signal 
controller and use traci.junction.subscribeContext as below:


traci.junction.subscribeContext(tlid, traci.constants.CMD_GET_VEHICLE_VARIABLE, 
self.detect_radius,
                                [traci.constants.VAR_LANEPOSITION,
                                traci.constants.VAR_SPEED,
                                traci.constants.VAR_LANE_ID,
                                traci.constants.VAR_ROAD_ID])

When I run the whole project and the program executes the 
traci.simulationStep() later, the sumo would encounter an error "Error: 
tcpip::Socket::recvAndCheck @ recv: peer shutdown". But if I comment out the 
traci.junction.subscribeContext, the traci.simulationStep() can be executed 
properly.

Also, if I run a separate python file to solely run sumo simulation with 
traci.junction.subcribeContext and traci.simulationStep under the same sumo 
configure file and the same environment, the code can be executed without any 
errors.

In this case, I am wondering if there were any possible causes that can 
influence traci.junction.subscribeConext and traci.simulationStep() under a 
certain condition? Or under what circumstances can traci.simulationStep() be 
interrupted by traci.junction.subscribeConext?

I really appreciate your help. Thank you for your time.

Best regards,
George

_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to