Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] question about the "Subscribe" and "Subscribecontext"


Dear all,
If I would like to get the occupancy for one lane area director E2 located on  known  lane What could I do?
The TRACI command would be useful to do that?  
If I could use TRACI   to do that, how to do I?
Is that command right below?

********************************************


Example from : SUMO_HOME/tests/complex/tutorial/traci_tls/data/

testlane=4i_0;

 traci.lane.subscribeContext(testlane,traci.constants.CMD_SUBSCRIBE_LANEAREA_CONTEXT );
    lane4i0ContextResults = traci.lanei.getContextSubscriptionResults('4i_0');
    occupancy4i0Handle1 = lane4i0ContextResults('0');
    occupancy4i0 = occupancy4i0Handle1(traci.CMD_GET_E2_VARIABLE.LAST_STEP_OCCUPANCY);  


Any kindly help would be appreciated!


Jane






Back to the top