I am trying to debug some simulation problems, from C++ code.
Our main class is
class TrafficModel : public TraCIAPI
and in its constructor we have this, which works:
mStartTime = simulation.getTime();
mDeltaTime = simulation.getDeltaT();
however, if I call
they block and the application freezes.
What I am actually trying to do is
const std::vector<int> varsSimulation{
libsumo::VAR_TELEPORT_STARTING_VEHICLES_NUMBER,
libsumo::VAR_TELEPORT_STARTING_VEHICLES_IDS,
libsumo::VAR_TELEPORT_ENDING_VEHICLES_NUMBER,
libsumo::VAR_TELEPORT_ENDING_VEHICLES_IDS,
libsumo::VAR_ARRIVED_VEHICLES_NUMBER,
libsumo::VAR_ARRIVED_VEHICLES_IDS,
};
simulation.subscribeContext("", libsumo::CMD_GET_SIM_VARIABLE, 99999, varsSimulation, 0, 999999999);
but this also blocks, so I was trying to work out what to pass for the first parameter to subscribeContext.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system sender. This message may contain confidential
information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.