31 #include "../../config.h" 36 #ifdef CHECK_MEMORY_LEAKS 38 #endif // CHECK_MEMORY_LEAKS 51 #pragma warning(disable: 4355) 54 : edge(*this), gui(*this), inductionloop(*this),
55 junction(*this), lane(*this), multientryexit(*this), poi(*this),
56 polygon(*this), route(*this), simulation(*this), trafficlights(*this),
57 vehicletype(*this), vehicle(*this), person(*this),
60 #pragma warning(default: 4355) 86 std::string acknowledgement;
134 int length = 1 + 1 + 1 + 4 + (int) objID.length();
136 length += (int)add->
size();
177 const std::vector<int>& vars)
const {
183 int varNo = (int) vars.
size();
185 outMsg.
writeInt(5 + 1 + 4 + 4 + 4 + (
int) objID.length() + 1 + varNo);
195 for (
int i = 0; i < varNo; ++i) {
205 int domain,
SUMOReal range,
const std::vector<int>& vars)
const {
211 int varNo = (int) vars.
size();
213 outMsg.
writeInt(5 + 1 + 4 + 4 + 4 + (
int) objID.length() + 1 + 8 + 1 + varNo);
226 for (
int i = 0; i < varNo; ++i) {
265 if (command != cmdId && !ignoreCommandId) {
270 }
catch (std::invalid_argument&) {
273 switch (resultType) {
279 if (acknowledgement != 0) {
280 (*acknowledgement) =
".. Command acknowledged (" +
toString(command) +
"), [description: " + msg +
"]";
286 if ((cmdStart + cmdLength) != (
int) inMsg.
position()) {
300 if (!ignoreCommandId && cmdId != (command + 0x10)) {
303 if (expectedType >= 0) {
308 if (valueDataType != expectedType) {
402 for (
int i = 0; i < size; ++i) {
435 std::vector<std::string>
441 std::vector<std::string> r;
442 for (
int i = 0; i < size; ++i) {
464 while (variableCount > 0) {
507 into[objectID][variableID] = v;
518 const std::string objectID = inMsg.
readString();
525 const std::string contextID = inMsg.
readString();
528 int numObjects = inMsg.
readInt();
530 while (numObjects > 0) {
546 while (numSubs > 0) {
561 std::vector<std::string>
658 std::vector<std::string>
712 std::vector<std::string>
807 std::vector<std::string>
832 std::vector<std::string>
852 std::vector<TraCIAPI::InductionLoopScope::VehicleData>
857 std::vector<VehicleData> result;
862 for (
int i = 0; i < n; ++i) {
880 result.push_back(vd);
891 std::vector<std::string>
907 std::vector<std::string>
927 std::vector<std::string>
932 std::vector<std::string>
1022 std::vector<std::string>
1032 content.
writeInt((
int)allowedClasses.size());
1033 for (
int i = 0; i < (int)allowedClasses.size(); ++i) {
1045 content.
writeInt((
int)disallowedClasses.size());
1046 for (
int i = 0; i < (int)disallowedClasses.size(); ++i) {
1078 std::vector<std::string>
1089 std::vector<std::string>
1104 std::vector<std::string>
1119 std::vector<std::string>
1211 std::vector<std::string>
1246 content.
writeInt((
int)shape.size());
1247 for (
int i = 0; i < (int)shape.size(); ++i) {
1282 int f = fill ? 1 : 0;
1288 for (
int i = 0; i < (int)shape.size(); ++i) {
1312 std::vector<std::string>
1317 std::vector<std::string>
1350 std::vector<std::string>
1360 std::vector<std::string>
1370 std::vector<std::string>
1380 std::vector<std::string>
1390 std::vector<std::string>
1412 myParent.send_commandSubscribeObjectVariable(domID, objID, beginTime, endTime, vars);
1414 myParent.check_resultState(inMsg, domID);
1415 myParent.check_commandGetResult(inMsg, domID);
1416 myParent.readVariableSubscription(inMsg);
1422 myParent.send_commandSubscribeObjectContext(domID, objID, beginTime, endTime, domain, range, vars);
1424 myParent.check_resultState(inMsg, domID);
1425 myParent.check_commandGetResult(inMsg, domID);
1426 myParent.readContextSubscription(inMsg);
1431 return myParent.mySubscribedValues;
1437 if (myParent.mySubscribedValues.find(objID) != myParent.mySubscribedValues.end()) {
1438 return myParent.mySubscribedValues[objID];
1447 return myParent.mySubscribedContextValues;
1453 if (myParent.mySubscribedContextValues.find(objID) != myParent.mySubscribedContextValues.end()) {
1454 return myParent.mySubscribedContextValues[objID];
1464 std::vector<std::string>
1474 std::vector<TraCIAPI::TraCILogic>
1479 std::vector<TraCIAPI::TraCILogic> ret;
1484 int logicNo = inMsg.
readInt();
1485 for (
int i = 0; i < logicNo; ++i) {
1493 int phaseIndex = inMsg.
readInt();
1495 int phaseNumber = inMsg.
readInt();
1496 std::vector<TraCIAPI::TraCIPhase> phases;
1497 for (
int j = 0; j < phaseNumber; ++j) {
1499 int duration = inMsg.
readInt();
1501 int duration1 = inMsg.
readInt();
1503 int duration2 = inMsg.
readInt();
1508 ret.push_back(
TraCIAPI::TraCILogic(subID, type, std::map<std::string, SUMOReal>(), phaseIndex, phases));
1513 std::vector<std::string>
1518 std::vector<TraCIAPI::TraCILink>
1523 std::vector<TraCIAPI::TraCILink> ret;
1529 for (
int i = 0; i < linkNo; ++i) {
1533 for (
int i1 = 0; i1 < no; ++i1) {
1596 content.
writeInt(
int(1000 * phaseDuration));
1617 for (
int i = 0; i < (int) logic.
phases.size(); ++i) {
1639 std::vector<std::string>
1882 std::vector<std::string>
1937 std::vector<std::string>
2015 std::vector<std::string>
2030 std::vector<TraCIAPI::VehicleScope::NextTLSData>
2035 std::vector<NextTLSData> result;
2039 const int n = inMsg.
readInt();
2040 for (
int i = 0; i < n; ++i) {
2054 result.push_back(d);
2062 const std::string& routeID,
2063 const std::string& typeID,
2065 const std::string& departLane,
2066 const std::string& departPos,
2067 const std::string& departSpeed,
2068 const std::string& arrivalLane,
2069 const std::string& arrivalPos,
2070 const std::string& arrivalSpeed,
2071 const std::string& fromTaz,
2072 const std::string& toTaz,
2073 const std::string& line,
2075 int personNumber)
const {
2077 if (depart ==
"-1") {
2078 depart =
toString(myParent.simulation.getCurrentTime() / 1000.0);
2149 myParent.send_commandMoveToXY(vehicleID, edgeID, lane, x, y, angle, keepRoute);
2207 for (
int i = 0; i < (int)via.size(); ++i) {
2242 std::vector<std::string>
2301 std::vector<std::string>
2312 while (getRemainingStages(personID) > 1) {
2313 removeStage(personID, 1);
2315 removeStage(personID, 0);
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
void setLength(const std::string &personID, SUMOReal length) 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
void appendDrivingStage(const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="")
tcpip::Socket * mySocket
The socket.
std::vector< std::string > getIDList() const
std::vector< std::string > getLoadedIDList() const
void close()
ends the simulation and 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
void setLine(const std::string &vehicleID, const std::string &line) const
std::string getRouteID(const std::string &vehicleID) const
std::vector< std::string > getIDList() const
std::string typeID
Type of the vehicle in.
std::string getEmissionClass(const std::string &vehicleID) const
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 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 setColor(const std::string &vehicleID, const TraCIColor &c) 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.
SUMOReal getHeight(const std::string &typeID) const
void setVia(const std::string &vehicleID, const std::vector< std::string > &via) const
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
void setHeight(const std::string &personID, SUMOReal height) 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
SUMOReal getSpeed(const std::string &personID) const
void setColor(const std::string &personID, const TraCIColor &c) 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
void closeSocket()
Closes the connection.
#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
std::string getShapeClass(const std::string &vehicleID) const
#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 setEffort(const std::string &edgeID, SUMOReal effort, SUMOTime begin=0, SUMOTime end=SUMOTime_MAX) const
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
#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)
void add(const std::string &personID, const std::string &edgeID, SUMOReal pos, SUMOReal depart=DEPART_NOW, const std::string typeID="DEFAULT_PEDTYPE")
SUMOReal getHCEmission(const std::string &laneID) const
void setWidth(const std::string &typeID, SUMOReal width) const
void setSpeed(const std::string &personID, SUMOReal speed) const
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
std::vector< std::string > getEdges(const std::string &personID, int nextStageIndex=0) 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)
static std::string toString(const T &t, std::streamsize accuracy=PRECISION)
#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
void setShapeClass(const std::string &typeID, const std::string &shapeClass) const
#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
std::string getRoadID(const std::string &personID) const
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
void removeStage(const std::string &personID, int nextStageIndex) const
std::string getEdgeID(const std::string &laneID) const
int getStage(const std::string &personID, int nextStageIndex=0) const
virtual void writeStorage(tcpip::Storage &store)
#define TL_CONTROLLED_LINKS
SUMOReal getMaxSpeed(const std::string &laneID) 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.
int getRemainingStages(const std::string &personID) const
std::string getTypeID(const std::string &personID) const
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
void setShapeClass(const std::string &vehicleID, const std::string &clazz) const
#define LAST_STEP_VEHICLE_NUMBER
void setType(const std::string &personID, const std::string &typeID) const
#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.
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
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 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
static const SUMOReal DEPART_NOW
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.
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.
void appendWaitingStage(const std::string &personID, SUMOReal duration, const std::string &description="waiting", const std::string &stopID="")
SUMOReal getNoiseEmission(const std::string &edgeID) const
SUMOReal getAccel(const std::string &typeID) const
void setMinGap(const std::string &personID, SUMOReal minGap) const
SUMOReal getTraveltime(const std::string &edgeID) const
void setZoom(const std::string &viewID, SUMOReal zoom) const
void appendWalkingStage(const std::string &personID, const std::vector< std::string > &edges, SUMOReal arrivalPos, SUMOReal duration=-1, SUMOReal speed=-1, const std::string &stopID="")
int getSpeedMode(const std::string &vehicleID) 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)
void setWidth(const std::string &personID, SUMOReal width) const
void adaptTraveltime(const std::string &edgeID, SUMOReal time, SUMOReal begin=0, SUMOReal end=SUMOTime_MAX/1000.0) const
SUMOReal getWaitingTime(const std::string &personID) const
#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
SUMOReal getAdaptedTraveltime(const std::string &edgeID, SUMOReal time) 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
void setEmissionClass(const std::string &vehicleID, const std::string &clazz) const
SUMOReal getPMxEmission(const std::string &edgeID) const
void setPosition(const std::string &poiID, SUMOReal x, SUMOReal y) const
std::string getLine(const std::string &vehicleID) 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
#define CMD_SET_PERSON_VARIABLE
std::vector< VehicleData > getVehicleData(const std::string &loopID) const
#define RESPONSE_SUBSCRIBE_PERSON_VARIABLE
void removeStages(const std::string &personID) const
TraCIBoundary getNetBoundary() const
std::vector< TraCIPosition > TraCIPositionVector
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)
TraCIPosition getPosition(const std::string &personID) const
std::string id
The id of the vehicle.
std::vector< std::string > getVia(const std::string &vehicleID) const
SUMOReal getLength(const std::string &typeID) const
SUMOReal getTau(const std::string &typeID) const
#define VAR_STAGES_REMAINING
#define VAR_ARRIVED_VEHICLES_IDS
std::vector< std::string > getLastStepVehicleIDs(const std::string &edgeID) const
int getLoadedNumber() const
std::string getVehicle(const std::string &personID) const
void setHeight(const std::string &typeID, SUMOReal height) const
#define LAST_STEP_VEHICLE_HALTING_NUMBER
SUMOReal getFuelConsumption(const std::string &laneID) const
std::string getNextEdge(const std::string &personID) 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