31 #include "../../config.h" 36 #ifdef CHECK_MEMORY_LEAKS 38 #endif // CHECK_MEMORY_LEAKS 48 #pragma warning(disable: 4355) 51 : edge(*this), gui(*this), inductionloop(*this),
52 junction(*this), lane(*this), multientryexit(*this), poi(*this),
53 polygon(*this), route(*this), simulation(*this), trafficlights(*this),
54 vehicletype(*this), vehicle(*this), person(*this),
57 #pragma warning(default: 4355) 121 int length = 1 + 1 + 1 + 4 + (int) objID.length();
123 length += (int)add->
size();
164 const std::vector<int>& vars)
const {
170 int varNo = (int) vars.
size();
172 outMsg.
writeInt(5 + 1 + 4 + 4 + 4 + (
int) objID.length() + 1 + varNo);
182 for (
int i = 0; i < varNo; ++i) {
192 int domain,
SUMOReal range,
const std::vector<int>& vars)
const {
198 int varNo = (int) vars.
size();
200 outMsg.
writeInt(5 + 1 + 4 + 4 + 4 + (
int) objID.length() + 1 + 8 + 1 + varNo);
213 for (
int i = 0; i < varNo; ++i) {
252 if (command != cmdId && !ignoreCommandId) {
257 }
catch (std::invalid_argument&) {
260 switch (resultType) {
266 if (acknowledgement != 0) {
267 (*acknowledgement) =
".. Command acknowledged (" +
toString(command) +
"), [description: " + msg +
"]";
273 if ((cmdStart + cmdLength) != (
int) inMsg.
position()) {
287 if (!ignoreCommandId && cmdId != (command + 0x10)) {
290 if (expectedType >= 0) {
295 if (valueDataType != expectedType) {
389 for (
int i = 0; i < size; ++i) {
422 std::vector<std::string>
428 std::vector<std::string> r;
429 for (
int i = 0; i < size; ++i) {
451 while (variableCount > 0) {
489 into[objectID][variableID] = v;
500 const std::string objectID = inMsg.
readString();
507 const std::string contextID = inMsg.
readString();
510 int numObjects = inMsg.
readInt();
512 while (numObjects > 0) {
528 while (numSubs > 0) {
543 std::vector<std::string>
637 std::vector<std::string>
677 std::vector<std::string>
772 std::vector<std::string>
797 std::vector<std::string>
817 std::vector<TraCIAPI::InductionLoopScope::VehicleData>
822 std::vector<VehicleData> result;
827 for (
int i = 0; i < n; ++i) {
845 result.push_back(vd);
856 std::vector<std::string>
872 std::vector<std::string>
892 std::vector<std::string>
897 std::vector<std::string>
987 std::vector<std::string>
997 content.
writeInt((
int)allowedClasses.size());
998 for (
int i = 0; i < (int)allowedClasses.size(); ++i) {
1010 content.
writeInt((
int)disallowedClasses.size());
1011 for (
int i = 0; i < (int)disallowedClasses.size(); ++i) {
1043 std::vector<std::string>
1054 std::vector<std::string>
1069 std::vector<std::string>
1084 std::vector<std::string>
1176 std::vector<std::string>
1211 content.
writeInt((
int)shape.size());
1212 for (
int i = 0; i < (int)shape.size(); ++i) {
1247 int f = fill ? 1 : 0;
1252 content.
writeInt((
int)shape.size());
1253 for (
int i = 0; i < (int)shape.size(); ++i) {
1277 std::vector<std::string>
1282 std::vector<std::string>
1315 std::vector<std::string>
1325 std::vector<std::string>
1335 std::vector<std::string>
1345 std::vector<std::string>
1355 std::vector<std::string>
1377 myParent.send_commandSubscribeObjectVariable(domID, objID, beginTime, endTime, vars);
1379 myParent.check_resultState(inMsg, domID);
1380 myParent.check_commandGetResult(inMsg, domID);
1381 myParent.readVariableSubscription(inMsg);
1387 myParent.send_commandSubscribeObjectContext(domID, objID, beginTime, endTime, domain, range, vars);
1389 myParent.check_resultState(inMsg, domID);
1390 myParent.check_commandGetResult(inMsg, domID);
1391 myParent.readContextSubscription(inMsg);
1396 return myParent.mySubscribedValues;
1402 if (myParent.mySubscribedValues.find(objID) != myParent.mySubscribedValues.end()) {
1403 return myParent.mySubscribedValues[objID];
1412 return myParent.mySubscribedContextValues;
1418 if (myParent.mySubscribedContextValues.find(objID) != myParent.mySubscribedContextValues.end()) {
1419 return myParent.mySubscribedContextValues[objID];
1429 std::vector<std::string>
1439 std::vector<TraCIAPI::TraCILogic>
1444 std::vector<TraCIAPI::TraCILogic> ret;
1445 int logicNo = inMsg.
readInt();
1446 for (
int i = 0; i < logicNo; ++i) {
1454 int phaseIndex = inMsg.
readInt();
1456 int phaseNumber = inMsg.
readInt();
1457 std::vector<TraCIAPI::TraCIPhase> phases;
1458 for (
int j = 0; j < phaseNumber; ++j) {
1460 int duration = inMsg.
readInt();
1462 int duration1 = inMsg.
readInt();
1464 int duration2 = inMsg.
readInt();
1469 ret.push_back(
TraCIAPI::TraCILogic(subID, type, std::map<std::string, SUMOReal>(), phaseIndex, phases));
1474 std::vector<std::string>
1479 std::vector<TraCIAPI::TraCILink>
1484 std::vector<TraCIAPI::TraCILink> ret;
1486 for (
int i = 0; i < linkNo; ++i) {
1548 content.
writeInt(
int(1000 * phaseDuration));
1569 for (
int i = 0; i < (int) logic.
phases.size(); ++i) {
1591 std::vector<std::string>
1818 std::vector<std::string>
1873 std::vector<std::string>
1946 std::vector<TraCIAPI::VehicleScope::NextTLSData>
1951 std::vector<NextTLSData> result;
1955 const int n = inMsg.
readInt();
1956 for (
int i = 0; i < n; ++i) {
1970 result.push_back(d);
1978 const std::string& routeID,
1979 const std::string& typeID,
1981 const std::string& departLane,
1982 const std::string& departPos,
1983 const std::string& departSpeed,
1984 const std::string& arrivalLane,
1985 const std::string& arrivalPos,
1986 const std::string& arrivalSpeed,
1987 const std::string& fromTaz,
1988 const std::string& toTaz,
1989 const std::string& line,
1991 int personNumber)
const {
1993 if (depart ==
"-1") {
1994 depart =
toString(myParent.simulation.getCurrentTime() / 1000.0);
2065 myParent.send_commandMoveToXY(vehicleID, edgeID, lane, x, y, angle, keepRoute);
2099 std::vector<std::string>
std::vector< std::string > getIDList() const
SUMOReal getImperfection(const std::string &typeID) const
#define LAST_STEP_MEAN_SPEED
TraCIPosition getPosition(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
SUMOReal entryTime
Entry-time of the vehicle in [s].
char state
The current state of the tls.
TraCIColor getColor(const std::string &vehicleID) const
std::vector< std::string > getIDList() const
SubscribedContextValues getContextSubscriptionResults()
SUMOReal getMaxSpeed(const std::string &typeID) const
int getStartingTeleportNumber() const
TraCIPosition getOffset(const std::string &viewID=DEFAULT_VIEW) const
int getLastStepVehicleNumber(const std::string &loopID) const
void setLength(const std::string &typeID, SUMOReal length) const
#define VAR_EMISSIONCLASS
void setMaxSpeed(const std::string &edgeID, SUMOReal speed) const
SUMOReal getNoiseEmission(const std::string &laneID) const
tcpip::Socket * mySocket
The socket.
std::vector< std::string > getIDList() const
std::vector< std::string > getLoadedIDList() const
void close()
Closes the connection.
void connect(const std::string &host, int port)
Connects to the specified SUMO server.
#define CMD_GET_TL_VARIABLE
std::vector< std::string > getArrivedIDList() const
std::string getRouteID(const std::string &vehicleID) const
std::vector< std::string > getIDList() const
std::string typeID
Type of the vehicle in.
void add(const std::string &vehicleID, const std::string &routeID, const std::string &typeID="DEFAULT_VEHTYPE", std::string depart="-1", const std::string &departLane="first", const std::string &departPos="base", const std::string &departSpeed="0", const std::string &arrivalLane="current", const std::string &arrivalPos="max", const std::string &arrivalSpeed="current", const std::string &fromTaz="", const std::string &toTaz="", const std::string &line="", int personCapacity=0, int personNumber=0) const
#define CMD_GET_VEHICLE_VARIABLE
#define VAR_CURRENT_TRAVELTIME
TraCIColor getColor(const std::string &poiID) const
std::string getTypeID(const std::string &vehicleID) const
void add(const std::string &poiID, SUMOReal x, SUMOReal y, const TraCIColor &c, const std::string &type, int layer) const
SUMOReal getLastStepMeanSpeed(const std::string &edgeID) const
std::vector< std::string > getDisallowed(const std::string &laneID) const
SUMOReal getCOEmission(const std::string &edgeID) const
SUMOReal getAngle(const std::string &vehicleID) const
void setShapeClass(const std::string &typeID, const std::string &clazz) const
void slowDown(const std::string &vehicleID, SUMOReal speed, int duration) const
void setProgram(const std::string &tlsID, const std::string &programID) const
void setPhase(const std::string &tlsID, int index) const
void setVehicleClass(const std::string &typeID, const std::string &clazz) const
bool receiveExact(Storage &)
Receive a complete TraCI message from Socket::socket_.
#define CMD_GET_INDUCTIONLOOP_VARIABLE
std::map< int, TraCIValue > TraCIValues
{object->{variable->value}}
std::string getVehicleClass(const std::string &typeID) const
void setColor(const std::string &polygonID, const TraCIColor &c) const
SUMOReal getDouble(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
#define LAST_STEP_VEHICLE_DATA
void send_commandClose() const
Sends a Close command.
virtual unsigned int position() const
int getLastStepHaltingNumber(const std::string &laneID) const
LaneScope lane
Scope for interaction with lanes.
#define CMD_GET_PERSON_VARIABLE
virtual double readDouble()
void setMaxSpeed(const std::string &typeID, SUMOReal speed) const
void setCompleteRedYellowGreenDefinition(const std::string &tlsID, const TraCIAPI::TraCILogic &logic) const
std::string getEmissionClass(const std::string &typeID) const
void add(const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &c, bool fill, const std::string &type, int layer) const
std::vector< std::string > getIDList() const
SUMOReal getLastStepMeanSpeed(const std::string &detID) const
void processGET(tcpip::Storage &inMsg, int command, int expectedType, bool ignoreCommandId=false) const
StorageType::size_type size() const
SUMOReal getPMxEmission(const std::string &laneID) const
int getLastStepHaltingNumber(const std::string &detID) const
SUMOReal getLastStepOccupancy(const std::string &edgeID) const
SUMOReal getCO2Emission(const std::string &vehicleID) const
#define VAR_LOADED_VEHICLES_IDS
std::vector< std::string > getLastStepVehicleIDs(const std::string &loopID) const
TraCIPosition getPosition(const std::string &junctionID) const
void trackVehicle(const std::string &viewID, const std::string &vehID) const
void moveToXY(const std::string &vehicleID, const std::string &edgeID, const int lane, const SUMOReal x, const SUMOReal y, const SUMOReal angle, const int keepRoute) const
std::vector< std::string > getIDList() const
SUMOReal getElectricityConsumption(const std::string &laneID) const
SUMOTime getCurrentTime() const
SUMOReal getLength(const std::string &laneID) const
SUMOReal getLastStepMeanSpeed(const std::string &laneID) const
std::vector< std::string > getIDList() const
int getRouteIndex(const std::string &vehicleID) const
SUMOReal getMinGap(const std::string &typeID) const
SubscribedContextValues mySubscribedContextValues
#define VAR_TELEPORT_STARTING_VEHICLES_IDS
#define CMD_GET_POLYGON_VARIABLE
void simulationStep(SUMOTime time=0)
Advances by one step (or up to the given time)
void send_commandMoveToXY(const std::string &vehicleID, const std::string &edgeID, const int lane, const SUMOReal x, const SUMOReal y, const SUMOReal angle, const int keepRoute) const
std::vector< std::string > getControlledLanes(const std::string &tlsID) const
SUMOReal getLastStepMeanLength(const std::string &loopID) const
void setAllowed(const std::string &laneID, const std::vector< std::string > &allowedClasses) const
virtual void writeUnsignedByte(int)
#define CMD_SET_EDGE_VARIABLE
#define CMD_SET_GUI_VARIABLE
SUMOReal getWidth(const std::string &typeID) const
TraCIPositionVector getPolygon(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
SUMOReal getLastStepOccupancy(const std::string &laneID) const
void readVariableSubscription(tcpip::Storage &inMsg)
std::string getProgram(const std::string &tlsID) const
std::map< std::string, SubscribedValues > SubscribedContextValues
#define VAR_LOADED_VEHICLES_NUMBER
#define VAR_SPEED_DEVIATION
int getLastStepVehicleNumber(const std::string &laneID) const
#define VAR_NOISEEMISSION
std::vector< std::string > getIDList() const
#define VAR_FUELCONSUMPTION
#define CMD_GET_ROUTE_VARIABLE
TraCIBoundary getBoundingBox(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
std::vector< std::string > getIDList() const
virtual void writeInt(int)
void setDisallowed(const std::string &laneID, const std::vector< std::string > &disallowedClasses) const
void setTau(const std::string &typeID, SUMOReal tau) const
SUMOReal getCO2Emission(const std::string &laneID) const
SUMOReal leaveTime
Leave-time of the vehicle in [s].
std::vector< std::string > getAllowed(const std::string &laneID) const
void setBoundary(const std::string &viewID, SUMOReal xmin, SUMOReal ymin, SUMOReal xmax, SUMOReal ymax) const
void setMaxSpeed(const std::string &laneID, SUMOReal speed) const
virtual int readUnsignedByte()
#define TL_PHASE_DURATION
void connect()
Connects to host_:port_.
#define RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE
#define TL_CURRENT_PROGRAM
#define CMD_SET_TL_VARIABLE
void send_commandSubscribeObjectContext(int domID, const std::string &objID, SUMOTime beginTime, SUMOTime endTime, int domain, SUMOReal range, const std::vector< int > &vars) const
Sends a SubscribeContext request.
void setSpeed(const std::string &vehicleID, SUMOReal speed) const
#define CMD_GET_VEHICLETYPE_VARIABLE
void remove(const std::string &polygonID, int layer=0) const
void send_commandSimulationStep(SUMOTime time) const
Sends a SimulationStep command.
SubscribedValues mySubscribedValues
std::string getRedYellowGreenState(const std::string &tlsID) const
int getLaneIndex(const std::string &vehicleID) const
#define VAR_DEPARTED_VEHICLES_NUMBER
void adaptTraveltime(const std::string &edgeID, SUMOReal time) const
#define LAST_STEP_TIME_SINCE_DETECTION
#define CMD_SET_ROUTE_VARIABLE
SUMOReal getElectricityConsumption(const std::string &vehicleID) const
SUMOReal length
Length of the vehicle.
#define CMD_GET_AREAL_DETECTOR_VARIABLE
#define VAR_MIN_EXPECTED_VEHICLES
#define VAR_VIEW_BOUNDARY
#define VAR_TRACK_VEHICLE
int getPhase(const std::string &tlsID) const
SUMOReal getWaitingTime(const std::string &vehicleID) const
TraCIPosition getPosition(const std::string &vehicleID) const
void setDecel(const std::string &typeID, SUMOReal decel) const
void remove(const std::string &vehicleID, char reason=REMOVE_VAPORIZED) const
std::map< std::string, TraCIValues > SubscribedValues
int getArrivedNumber() const
void setLength(const std::string &laneID, SUMOReal length) const
SUMOTime getDeltaT() const
void setSchema(const std::string &viewID, const std::string &schemeName) const
TraCIColor getColor(const std::string &typeID) const
#define TL_COMPLETE_PROGRAM_RYG
std::string getType(const std::string &polygonID) const
SUMOReal getTraveltime(const std::string &laneID) const
void setType(const std::string &poiID, const std::string &setType) const
SUMOReal getNOxEmission(const std::string &laneID) const
#define VAR_NET_BOUNDING_BOX
void send_commandGetVariable(int domID, int varID, const std::string &objID, tcpip::Storage *add=0) const
Sends a GetVariable request.
TraCIColor getColor(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
#define CMD_GET_POI_VARIABLE
std::vector< std::string > getIDList() const
void screenshot(const std::string &viewID, const std::string &filename) const
std::vector< std::string > getDepartedIDList() const
std::vector< std::string > getEdges(const std::string &vehicleID) const
#define TL_COMPLETE_DEFINITION_RYG
#define VAR_TELEPORT_STARTING_VEHICLES_NUMBER
SUMOReal getNoiseEmission(const std::string &vehicleID) const
#define CMD_SET_VEHICLETYPE_VARIABLE
std::vector< TraCIAPI::TraCILink > getControlledLinks(const std::string &tlsID) const
virtual void writeByte(int)
TraCIPosition getPosition(const std::string &typeID) const
SUMOReal getHCEmission(const std::string &laneID) const
void setWidth(const std::string &typeID, SUMOReal width) const
static std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
void setEmissionClass(const std::string &typeID, const std::string &clazz) const
TraCIPositionVector getShape(const std::string &polygonID) const
void setSpeedFactor(const std::string &typeID, SUMOReal factor) const
virtual void writeStringList(const std::vector< std::string > &s)
int getEndingTeleportNumber() const
#define VAR_TELEPORT_ENDING_VEHICLES_IDS
std::vector< NextTLSData > getNextTLS(const std::string &vehID) const
#define CMD_GET_LANE_VARIABLE
std::vector< TraCIPhase > phases
int getInt(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
#define CMD_SET_VEHICLE_VARIABLE
std::string getRoadID(const std::string &vehicleID) const
SUMOReal getSpeedFactor(const std::string &typeID) const
SUMOReal getPMxEmission(const std::string &vehicleID) const
std::vector< std::string > getIDList() const
SUMOReal getLastStepLength(const std::string &edgeID) const
void setRedYellowGreenState(const std::string &tlsID, const std::string &state) const
#define CMD_GET_SIM_VARIABLE
virtual std::string readString()
std::string getShapeClass(const std::string &typeID) const
#define CMD_GET_EDGE_VARIABLE
int getByte(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
#define CMD_GET_GUI_VARIABLE
std::string getSchema(const std::string &viewID=DEFAULT_VIEW) const
SUMOReal getLastStepOccupancy(const std::string &loopID) const
#define VAR_DEPARTED_VEHICLES_IDS
#define CMD_SET_POI_VARIABLE
int getUnsignedByte(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
void setMinGap(const std::string &typeID, SUMOReal minGap) const
TraCIColor getColor(const std::string &polygonID) const
SUMOReal getDecel(const std::string &typeID) const
SUMOReal getSlope(const std::string &vehicleID) const
std::vector< std::string > getEndingTeleportIDList() const
SUMOReal getPosition(const std::string &loopID) const
#define CMD_GET_JUNCTION_VARIABLE
TraCIBoundary getBoundary(const std::string &viewID=DEFAULT_VIEW) const
SUMOReal getTimeSinceDetection(const std::string &loopID) const
void setOffset(const std::string &viewID, SUMOReal x, SUMOReal y) const
std::string getEdgeID(const std::string &laneID) const
virtual void writeStorage(tcpip::Storage &store)
#define TL_CONTROLLED_LINKS
SUMOReal getMaxSpeed(const std::string &laneID) const
std::string getTypeID(const std::string &typeID) const
void readContextSubscription(tcpip::Storage &inMsg)
int check_commandGetResult(tcpip::Storage &inMsg, int command, int expectedType=-1, bool ignoreCommandId=false) const
Validates the result state of a command.
void readVariables(tcpip::Storage &inMsg, const std::string &objectID, int variableCount, SubscribedValues &into)
SUMOReal getLastStepMeanSpeed(const std::string &loopID) const
void setAccel(const std::string &typeID, SUMOReal accel) const
void setImperfection(const std::string &typeID, SUMOReal imperfection) const
std::vector< std::string > getStringVector(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
SUMOReal getCOEmission(const std::string &vehicleID) const
SUMOReal getCOEmission(const std::string &laneID) const
SUMOReal getHCEmission(const std::string &vehicleID) const
TraCIPosition getPosition(const std::string &poiID) const
#define TL_RED_YELLOW_GREEN_STATE
SUMOReal getFuelConsumption(const std::string &edgeID) const
#define LAST_STEP_VEHICLE_NUMBER
#define VAR_EDGE_TRAVELTIME
#define VAR_ARRIVED_VEHICLES_NUMBER
SUMOReal getZoom(const std::string &viewID=DEFAULT_VIEW) const
SUMOReal dist
The distance to the tls.
SUMOReal getSpeed(const std::string &typeID) const
void send_commandSubscribeObjectVariable(int domID, const std::string &objID, SUMOTime beginTime, SUMOTime endTime, const std::vector< int > &vars) const
Sends a SubscribeVariable request.
SUMOReal getWidth(const std::string &laneID) const
int getLastStepVehicleNumber(const std::string &edgeID) const
#define CMD_SET_POLYGON_VARIABLE
std::vector< TraCIAPI::TraCILogic > getCompleteRedYellowGreenDefinition(const std::string &tlsID) const
virtual void writeString(const std::string &s)
int getMinExpectedNumber() const
#define RTYPE_NOTIMPLEMENTED
void setType(const std::string &polygonID, const std::string &setType) const
SubscribedValues getSubscriptionResults()
TraCIPositionVector getShape(const std::string &laneID) const
int getNextSwitch(const std::string &tlsID) const
#define LAST_STEP_VEHICLE_ID_LIST
#define CMD_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE
void setEffort(const std::string &edgeID, SUMOReal effort) const
SUMOReal getEffort(const std::string &edgeID, SUMOTime time) const
SUMOTime getSUMOTime(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
SUMOReal getLanePosition(const std::string &vehicleID) const
SUMOReal getWaitingTime(const std::string &typeID) const
SUMOReal getHCEmission(const std::string &edgeID) const
void subscribeContext(int domID, const std::string &objID, SUMOTime beginTime, SUMOTime endTime, int domain, SUMOReal range, const std::vector< int > &vars) const
std::vector< std::string > getLastStepVehicleIDs(const std::string &detID) const
void sendExact(const Storage &)
virtual float readFloat()
SUMOReal getElectricityConsumption(const std::string &edgeID) const
std::string getType(const std::string &poiID) const
#define CMD_SET_LANE_VARIABLE
#define VAR_ELECTRICITYCONSUMPTION
std::string getLaneID(const std::string &loopID) const
std::string id
The id of the next tls.
std::string getRoadID(const std::string &typeID) const
void subscribe(int domID, const std::string &objID, SUMOTime beginTime, SUMOTime endTime, const std::vector< int > &vars) const
std::vector< std::string > getIDList() const
void check_resultState(tcpip::Storage &inMsg, int command, bool ignoreCommandId=false, std::string *acknowledgement=0) const
Validates the result state of a command.
SUMOReal getNoiseEmission(const std::string &edgeID) const
SUMOReal getAccel(const std::string &typeID) const
SUMOReal getTraveltime(const std::string &edgeID) const
void setZoom(const std::string &viewID, SUMOReal zoom) const
int getSpeedMode(const std::string &vehicleID) const
std::string getNextEdge(const std::string &typeID) const
SUMOReal getSpeed(const std::string &vehicleID) const
void moveTo(const std::string &vehicleID, const std::string &laneID, SUMOReal position) const
std::vector< std::string > getLastStepVehicleIDs(const std::string &laneID) const
int getDepartedNumber() const
virtual void writeDouble(double)
#define VAR_TELEPORT_ENDING_VEHICLES_NUMBER
SUMOReal getLastStepLength(const std::string &laneID) const
void setShape(const std::string &polygonID, const TraCIPositionVector &shape) const
SUMOReal getFuelConsumption(const std::string &vehicleID) const
void setColor(const std::string &typeID, const TraCIColor &c) const
void send_commandSetValue(int domID, int varID, const std::string &objID, tcpip::Storage &content) const
Sends a SetVariable request.
std::vector< std::string > getIDList() const
SUMOReal getPMxEmission(const std::string &edgeID) const
void setPosition(const std::string &poiID, SUMOReal x, SUMOReal y) const
int getLinkNumber(const std::string &laneID) const
SUMOReal getSpeedDeviation(const std::string &typeID) const
int getLastStepVehicleNumber(const std::string &detID) const
SUMOReal getCO2Emission(const std::string &edgeID) const
#define LAST_STEP_OCCUPANCY
#define TL_CONTROLLED_LANES
std::string getString(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
void setSpeedDeviation(const std::string &typeID, SUMOReal deviation) const
std::string getLaneID(const std::string &vehicleID) const
SUMOReal getNOxEmission(const std::string &edgeID) const
std::vector< VehicleData > getVehicleData(const std::string &loopID) const
#define RESPONSE_SUBSCRIBE_PERSON_VARIABLE
TraCIBoundary getNetBoundary() const
std::vector< TraCIPosition > TraCIPositionVector
SUMOReal getAdaptedTraveltime(const std::string &edgeID, SUMOTime time) const
std::vector< std::string > getEdges(const std::string &routeID) const
void remove(const std::string &poiID, int layer=0) const
int tlIndex
The tls index of the controlled link.
SUMOReal getFloat(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
std::string id
The id of the vehicle.
SUMOReal getLength(const std::string &typeID) const
SUMOReal getTau(const std::string &typeID) const
#define VAR_ARRIVED_VEHICLES_IDS
std::vector< std::string > getLastStepVehicleIDs(const std::string &edgeID) const
int getLoadedNumber() const
#define LAST_STEP_VEHICLE_HALTING_NUMBER
SUMOReal getFuelConsumption(const std::string &laneID) const
void setColor(const std::string &poiID, const TraCIColor &c) const
void add(const std::string &routeID, const std::vector< std::string > &edges) const
std::vector< std::string > getIDList() const
void setPhaseDuration(const std::string &tlsID, int phaseDuration) const
SUMOReal getLastStepHaltingNumber(const std::string &edgeID) const
std::vector< std::string > getStartingTeleportIDList() const
SUMOReal getNOxEmission(const std::string &vehicleID) const