35 edge(*this), gui(*this), inductionloop(*this),
36 junction(*this), lane(*this), lanearea(*this), multientryexit(*this),
37 person(*this), poi(*this), polygon(*this),
38 rerouter(*this), route(*this), routeprobe(*this),
39 simulation(*this), trafficlights(*this),
40 vehicle(*this), vehicletype(*this),
42 std::cerr <<
"TraCIAPI is deprecated. Please use libtraci instead, see https://sumo.dlr.de/docs/Libtraci.html.\n";
99 std::string acknowledgement;
157 int length = 1 + 1 + 1 + 4 + (int) objID.length();
158 if (add !=
nullptr) {
159 length += (int)add->
size();
171 if (add !=
nullptr) {
181 int length = 1 + 1 + 1;
182 if (add !=
nullptr) {
183 length += (int)add->
size();
194 if (add !=
nullptr) {
202 const std::vector<int>& vars)
const {
208 int varNo = (int) vars.
size();
210 outMsg.
writeInt(5 + 1 + 8 + 8 + 4 + (
int) objID.length() + 1 + varNo);
220 for (
int i = 0; i < varNo; ++i) {
230 int domain,
double range,
const std::vector<int>& vars)
const {
236 int varNo = (int) vars.
size();
238 outMsg.
writeInt(5 + 1 + 8 + 8 + 4 + (
int) objID.length() + 1 + 8 + 1 + varNo);
251 for (
int i = 0; i < varNo; ++i) {
271 if (command != cmdId && !ignoreCommandId) {
276 }
catch (std::invalid_argument&) {
279 switch (resultType) {
285 if (acknowledgement !=
nullptr) {
286 (*acknowledgement) =
".. Command acknowledged (" +
toString(command) +
"), [description: " + msg +
"]";
292 if ((cmdStart + cmdLength) != (
int) inMsg.
position()) {
306 if (!ignoreCommandId && cmdId != (command + 0x10)) {
309 if (expectedType >= 0) {
314 if (valueDataType != expectedType) {
349 while (variableCount > 0) {
358 into[objectID][variableID] = std::make_shared<libsumo::TraCIDouble>(inMsg.
readDouble());
361 into[objectID][variableID] = std::make_shared<libsumo::TraCIString>(inMsg.
readString());
364 auto p = std::make_shared<libsumo::TraCIPosition>();
368 into[objectID][variableID] = p;
372 auto p = std::make_shared<libsumo::TraCIPosition>();
376 into[objectID][variableID] = p;
380 auto c = std::make_shared<libsumo::TraCIColor>();
385 into[objectID][variableID] = c;
389 into[objectID][variableID] = std::make_shared<libsumo::TraCIInt>(inMsg.
readInt());
392 auto sl = std::make_shared<libsumo::TraCIStringList>();
394 for (
int i = 0; i < n; ++i) {
397 into[objectID][variableID] = sl;
417 const std::string objectID = inMsg.
readString();
425 const std::string contextID = inMsg.
readString();
428 int numObjects = inMsg.
readInt();
430 while (numObjects > 0) {
432 readVariables(inMsg, objectID, variableCount,
myDomains[cmdId]->getModifiableContextSubscriptionResults(contextID));
445 it.second->clearSubscriptionResults();
448 while (numSubs > 0) {
463 for (
int i = 0; i < (int)args.size(); ++i) {
464 numChars += (int)args[i].size();
468 content.
writeInt(1 + 4 + 1 + 1 + 4 + numChars + 4 * (
int)args.size());
478std::pair<int, std::string>
488 const int traciVersion = inMsg.
readInt();
489 return std::make_pair(traciVersion, inMsg.
readString());
583std::vector<std::string>
605 if (endSeconds != std::numeric_limits<double>::max()) {
625 if (endSeconds != std::numeric_limits<double>::max()) {
752std::vector<std::string>
773std::vector<libsumo::TraCIVehicleData>
775 std::vector<libsumo::TraCIVehicleData> result;
778 myParent.myInput.readInt();
780 myParent.myInput.readUnsignedByte();
781 const int n = myParent.myInput.readInt();
782 for (
int i = 0; i < n; ++i) {
785 myParent.myInput.readUnsignedByte();
786 vd.
id = myParent.myInput.readString();
788 myParent.myInput.readUnsignedByte();
789 vd.
length = myParent.myInput.readDouble();
791 myParent.myInput.readUnsignedByte();
792 vd.
entryTime = myParent.myInput.readDouble();
794 myParent.myInput.readUnsignedByte();
795 vd.
leaveTime = myParent.myInput.readDouble();
797 myParent.myInput.readUnsignedByte();
798 vd.
typeID = myParent.myInput.readString();
800 result.push_back(vd);
839std::vector<std::string>
844std::vector<std::string>
854std::vector<libsumo::TraCIConnection>
856 std::vector<libsumo::TraCIConnection> ret;
859 myParent.myInput.readUnsignedByte();
860 myParent.myInput.readInt();
862 int linkNo = myParent.myInput.readInt();
863 for (
int i = 0; i < linkNo; ++i) {
865 myParent.myInput.readUnsignedByte();
866 std::string approachedLane = myParent.myInput.readString();
868 myParent.myInput.readUnsignedByte();
869 std::string approachedLaneInternal = myParent.myInput.readString();
871 myParent.myInput.readUnsignedByte();
872 bool hasPrio = myParent.myInput.readUnsignedByte() != 0;
874 myParent.myInput.readUnsignedByte();
875 bool isOpen = myParent.myInput.readUnsignedByte() != 0;
877 myParent.myInput.readUnsignedByte();
878 bool hasFoe = myParent.myInput.readUnsignedByte() != 0;
880 myParent.myInput.readUnsignedByte();
881 std::string state = myParent.myInput.readString();
883 myParent.myInput.readUnsignedByte();
884 std::string direction = myParent.myInput.readString();
886 myParent.myInput.readUnsignedByte();
887 double length = myParent.myInput.readDouble();
893 approachedLaneInternal,
984std::vector<std::string>
990std::vector<std::string>
992 std::vector<std::string> r;
998 const int size = myParent.myInput.readInt();
999 for (
int i = 0; i < size; ++i) {
1000 r.push_back(myParent.myInput.readString());
1006std::vector<std::string>
1008 return getFoes(laneID,
"");
1051std::vector<std::string>
1061std::vector<std::string>
1066std::vector<std::string>
1264 if (shape.
value.size() < 256) {
1304 int f = fill ? 1 : 0;
1310 for (
int i = 0; i < (int)shape.
value.size(); ++i) {
1331std::vector<std::string>
1365std::vector<std::string>
1375std::vector<std::string>
1385std::vector<std::string>
1395std::vector<std::string>
1405std::vector<std::string>
1415std::vector<std::string>
1425std::vector<std::string>
1456std::vector<std::string>
1477 result.
x = myParent.myInput.readDouble();
1478 result.
y = myParent.myInput.readDouble();
1499 result.
x = myParent.myInput.readDouble();
1500 result.
y = myParent.myInput.readDouble();
1501 result.
z = myParent.myInput.readDouble();
1522 result.
edgeID = myParent.myInput.readString();
1523 result.
pos = myParent.myInput.readDouble();
1524 result.
laneIndex = myParent.myInput.readUnsignedByte();
1544 result.
x = myParent.myInput.readDouble();
1545 result.
y = myParent.myInput.readDouble();
1565 return myParent.myInput.readDouble();
1587 return myParent.myInput.readDouble();
1647std::vector<libsumo::TraCILogic>
1649 std::vector<libsumo::TraCILogic> ret;
1652 const int logicNo = myParent.myInput.readInt();
1653 for (
int i = 0; i < logicNo; ++i) {
1654 myParent.myInput.readUnsignedByte();
1655 myParent.myInput.readInt();
1656 myParent.myInput.readUnsignedByte();
1657 const std::string programID = myParent.myInput.readString();
1658 myParent.myInput.readUnsignedByte();
1659 const int type = myParent.myInput.readInt();
1660 myParent.myInput.readUnsignedByte();
1661 const int phaseIndex = myParent.myInput.readInt();
1662 myParent.myInput.readUnsignedByte();
1663 const int phaseNumber = myParent.myInput.readInt();
1665 for (
int j = 0; j < phaseNumber; j++) {
1666 myParent.myInput.readUnsignedByte();
1667 myParent.myInput.readInt();
1668 myParent.myInput.readUnsignedByte();
1669 const double duration = myParent.myInput.readDouble();
1670 myParent.myInput.readUnsignedByte();
1671 const std::string state = myParent.myInput.readString();
1672 myParent.myInput.readUnsignedByte();
1673 const double minDur = myParent.myInput.readDouble();
1674 myParent.myInput.readUnsignedByte();
1675 const double maxDur = myParent.myInput.readDouble();
1676 myParent.myInput.readUnsignedByte();
1677 const int numNext = myParent.myInput.readInt();
1678 std::vector<int> next;
1679 for (
int k = 0; k < numNext; k++) {
1680 myParent.myInput.readUnsignedByte();
1681 next.push_back(myParent.myInput.readInt());
1683 myParent.myInput.readUnsignedByte();
1684 const std::string name = myParent.myInput.readString();
1687 myParent.myInput.readUnsignedByte();
1688 const int paramNumber = myParent.myInput.readInt();
1689 for (
int j = 0; j < paramNumber; j++) {
1690 myParent.myInput.readUnsignedByte();
1691 const std::vector<std::string> par = myParent.myInput.readStringList();
1694 ret.emplace_back(logic);
1700std::vector<std::string>
1705std::vector<std::vector<libsumo::TraCILink> >
1707 std::vector<std::vector<libsumo::TraCILink> > result;
1711 myParent.myInput.readUnsignedByte();
1712 myParent.myInput.readInt();
1714 int linkNo = myParent.myInput.readInt();
1715 for (
int i = 0; i < linkNo; ++i) {
1716 myParent.myInput.readUnsignedByte();
1717 int no = myParent.myInput.readInt();
1718 std::vector<libsumo::TraCILink> ret;
1719 for (
int i1 = 0; i1 < no; ++i1) {
1720 myParent.myInput.readUnsignedByte();
1721 myParent.myInput.readInt();
1722 std::string from = myParent.myInput.readString();
1723 std::string to = myParent.myInput.readString();
1724 std::string via = myParent.myInput.readString();
1727 result.emplace_back(ret);
1826 for (
const std::shared_ptr<libsumo::TraCIPhase>& p : logic.
phases) {
1838 content.
writeInt((
int)p->next.size());
1839 for (
int n : p->next) {
2281std::vector<std::string>
2379std::vector<std::string>
2394std::vector<libsumo::TraCINextTLSData>
2396 std::vector<libsumo::TraCINextTLSData> result;
2399 myParent.myInput.readInt();
2401 myParent.myInput.readUnsignedByte();
2402 const int n = myParent.myInput.readInt();
2403 for (
int i = 0; i < n; ++i) {
2405 myParent.myInput.readUnsignedByte();
2406 d.
id = myParent.myInput.readString();
2408 myParent.myInput.readUnsignedByte();
2409 d.
tlIndex = myParent.myInput.readInt();
2411 myParent.myInput.readUnsignedByte();
2412 d.
dist = myParent.myInput.readDouble();
2414 myParent.myInput.readUnsignedByte();
2415 d.
state = (char)myParent.myInput.readByte();
2417 result.push_back(d);
2423std::vector<libsumo::TraCIBestLanesData>
2425 std::vector<libsumo::TraCIBestLanesData> result;
2428 myParent.myInput.readInt();
2429 myParent.myInput.readUnsignedByte();
2431 const int n = myParent.myInput.readInt();
2432 for (
int i = 0; i < n; ++i) {
2434 myParent.myInput.readUnsignedByte();
2435 info.
laneID = myParent.myInput.readString();
2437 myParent.myInput.readUnsignedByte();
2438 info.
length = myParent.myInput.readDouble();
2440 myParent.myInput.readUnsignedByte();
2441 info.
occupation = myParent.myInput.readDouble();
2443 myParent.myInput.readUnsignedByte();
2446 myParent.myInput.readUnsignedByte();
2449 myParent.myInput.readUnsignedByte();
2450 const int m = myParent.myInput.readInt();
2451 for (
int j = 0; j < m; ++j) {
2455 result.push_back(info);
2462std::pair<std::string, double>
2469 myParent.myInput.readInt();
2470 myParent.myInput.readUnsignedByte();
2471 const std::string leaderID = myParent.myInput.readString();
2472 myParent.myInput.readUnsignedByte();
2473 const double gap = myParent.myInput.readDouble();
2474 return std::make_pair(leaderID, gap);
2480std::pair<std::string, double>
2487 myParent.myInput.readInt();
2488 myParent.myInput.readUnsignedByte();
2489 const std::string leaderID = myParent.myInput.readString();
2490 myParent.myInput.readUnsignedByte();
2491 const double gap = myParent.myInput.readDouble();
2492 return std::make_pair(leaderID, gap);
2505 myParent.myInput.readInt();
2506 myParent.myInput.readUnsignedByte();
2507 const int stateWithoutTraCI = myParent.myInput.readInt();
2508 myParent.myInput.readUnsignedByte();
2509 const int state = myParent.myInput.readInt();
2510 return std::make_pair(stateWithoutTraCI, state);
2612std::vector<std::string>
2644 const std::string& routeID,
2645 const std::string& typeID,
2647 const std::string& departLane,
2648 const std::string& departPos,
2649 const std::string& departSpeed,
2650 const std::string& arrivalLane,
2651 const std::string& arrivalPos,
2652 const std::string& arrivalSpeed,
2653 const std::string& fromTaz,
2654 const std::string& toTaz,
2655 const std::string& line,
2657 int personNumber)
const {
2659 if (depart ==
"-1") {
2660 depart =
toString(myParent.simulation.getCurrentTime() / 1000.0);
2777 content.
writeInt((
int)edges.size());
2778 for (
int i = 0; i < (int)edges.size(); ++i) {
2788 if (currentTravelTimes) {
2790 std::vector<std::string> edges = myParent.edge.getIDList();
2791 for (std::vector<std::string>::iterator it = edges.begin(); it != edges.end(); ++it) {
2792 myParent.edge.adaptTraveltime(*it, myParent.edge.getTraveltime(*it));
2931 const double duration,
const int flags,
const double startPos,
const double until)
const {
3015 for (
int i = 0; i < (int)via.size(); ++i) {
3061 bool noOpposite,
double downstreamDist,
double upstreamDist)
const {
3064 addSubscriptionFilterNoOpposite();
3066 if (downstreamDist >= 0) {
3067 addSubscriptionFilterDownstreamDistance(downstreamDist);
3069 if (upstreamDist >= 0) {
3070 addSubscriptionFilterUpstreamDistance(upstreamDist);
3093 addSubscriptionFilterLeadFollow(std::vector<int>({0}));
3094 if (downstreamDist >= 0) {
3095 addSubscriptionFilterDownstreamDistance(downstreamDist);
3097 if (upstreamDist >= 0) {
3098 addSubscriptionFilterUpstreamDistance(upstreamDist);
3104 if (abs(direction) != 1) {
3105 std::cerr <<
"Ignoring lane change subscription filter with non-neighboring lane offset direction " << direction <<
"\n";
3108 addSubscriptionFilterLeadFollow(std::vector<int>({0, direction}));
3110 addSubscriptionFilterNoOpposite();
3112 if (downstreamDist >= 0) {
3113 addSubscriptionFilterDownstreamDistance(downstreamDist);
3115 if (upstreamDist >= 0) {
3116 addSubscriptionFilterUpstreamDistance(upstreamDist);
3129 if (downstreamDist >= 0) {
3130 addSubscriptionFilterDownstreamDistance(downstreamDist);
3155 if (downstreamDist >= 0) {
3156 addSubscriptionFilterDownstreamDistance(downstreamDist);
3158 if (upstreamDist >= 0) {
3159 addSubscriptionFilterUpstreamDistance(upstreamDist);
3193 for (
int i : vals) {
3293std::vector<std::string>
3304 while (getRemainingStages(personID) > 1) {
3305 removeStage(personID, 1);
3307 removeStage(personID, 0);
3555 myParent.createCommand(myCmdGetID, var,
id, add);
3557 return myParent.myInput.readUnsignedByte();
3565 myParent.createCommand(myCmdGetID, var,
id, add);
3567 return myParent.myInput.readByte();
3576 myParent.createCommand(myCmdGetID, var,
id, add);
3578 return myParent.myInput.readInt();
3586 myParent.createCommand(myCmdGetID, var,
id, add);
3588 return myParent.myInput.readDouble();
3597 myParent.createCommand(myCmdGetID, var,
id, add);
3599 int size = myParent.myInput.readUnsignedByte();
3601 size = myParent.myInput.readInt();
3603 for (
int i = 0; i < size; ++i) {
3605 p.
x = myParent.myInput.readDouble();
3606 p.
y = myParent.myInput.readDouble();
3608 ret.
value.push_back(p);
3618 myParent.createCommand(myCmdGetID, var,
id, add);
3620 p.
x = myParent.myInput.readDouble();
3621 p.
y = myParent.myInput.readDouble();
3631 myParent.createCommand(myCmdGetID, var,
id, add);
3633 p.
x = myParent.myInput.readDouble();
3634 p.
y = myParent.myInput.readDouble();
3635 p.
z = myParent.myInput.readDouble();
3643 myParent.createCommand(myCmdGetID, var,
id, add);
3645 return myParent.myInput.readString();
3651std::vector<std::string>
3653 std::vector<std::string> r;
3654 myParent.createCommand(myCmdGetID, var,
id, add);
3656 const int size = myParent.myInput.readInt();
3657 for (
int i = 0; i < size; ++i) {
3658 r.push_back(myParent.myInput.readString());
3667 std::vector<double> r;
3668 myParent.createCommand(myCmdGetID, var,
id, add);
3670 const int size = myParent.myInput.readInt();
3671 for (
int i = 0; i < size; ++i) {
3672 r.push_back(myParent.myInput.readDouble());
3682 myParent.createCommand(myCmdGetID, var,
id, add);
3684 c.
r = (
unsigned char)myParent.myInput.readUnsignedByte();
3685 c.
g = (
unsigned char)myParent.myInput.readUnsignedByte();
3686 c.
b = (
unsigned char)myParent.myInput.readUnsignedByte();
3687 c.
a = (
unsigned char)myParent.myInput.readUnsignedByte();
3696 myParent.createCommand(myCmdGetID, var,
id, add);
3698 myParent.myInput.readInt();
3699 myParent.myInput.readUnsignedByte();
3700 s.
type = myParent.myInput.readInt();
3702 myParent.myInput.readUnsignedByte();
3703 s.
vType = myParent.myInput.readString();
3705 myParent.myInput.readUnsignedByte();
3706 s.
line = myParent.myInput.readString();
3708 myParent.myInput.readUnsignedByte();
3709 s.
destStop = myParent.myInput.readString();
3711 myParent.myInput.readUnsignedByte();
3712 s.
edges = myParent.myInput.readStringList();
3714 myParent.myInput.readUnsignedByte();
3715 s.
travelTime = myParent.myInput.readDouble();
3717 myParent.myInput.readUnsignedByte();
3718 s.
cost = myParent.myInput.readDouble();
3720 myParent.myInput.readUnsignedByte();
3721 s.
length = myParent.myInput.readDouble();
3723 myParent.myInput.readUnsignedByte();
3724 s.
intended = myParent.myInput.readString();
3726 myParent.myInput.readUnsignedByte();
3727 s.
depart = myParent.myInput.readDouble();
3729 myParent.myInput.readUnsignedByte();
3730 s.
departPos = myParent.myInput.readDouble();
3732 myParent.myInput.readUnsignedByte();
3733 s.
arrivalPos = myParent.myInput.readDouble();
3735 myParent.myInput.readUnsignedByte();
3742std::vector<std::string>
3763std::pair<std::string, std::string>
3771 myParent.myInput.readInt();
3772 myParent.myInput.readUnsignedByte();
3773 const std::string returnedKey = myParent.myInput.readString();
3774 myParent.myInput.readUnsignedByte();
3775 const std::string value = myParent.myInput.readString();
3776 return std::make_pair(returnedKey, value);
3778 return std::make_pair(key,
"");
3792 myParent.processSet(myCmdSetID);
3801 myParent.createCommand(myCmdSetID, var,
id, &content);
3802 myParent.processSet(myCmdSetID);
3811 myParent.createCommand(myCmdSetID, var,
id, &content);
3812 myParent.processSet(myCmdSetID);
3821 myParent.createCommand(myCmdSetID, var,
id, &content);
3822 myParent.processSet(myCmdSetID);
3830 content.
writeInt((
int)value.size());
3831 for (
const std::string& s : value) {
3834 myParent.createCommand(myCmdSetID, var,
id, &content);
3835 myParent.processSet(myCmdSetID);
3841 myParent.send_commandSubscribeObjectVariable(mySubscribeID, objID, beginTime, endTime, vars);
3843 myParent.check_resultState(inMsg, mySubscribeID);
3844 if (vars.size() > 0) {
3845 myParent.check_commandGetResult(inMsg, mySubscribeID);
3846 myParent.readVariableSubscription(mySubscribeID + 0x10, inMsg);
3853 myParent.send_commandSubscribeObjectContext(myContextSubscribeID, objID, beginTime, endTime, domain, range, vars);
3855 myParent.check_resultState(inMsg, myContextSubscribeID);
3856 myParent.check_commandGetResult(inMsg, myContextSubscribeID);
3857 myParent.readContextSubscription(myContextSubscribeID + 0x60, inMsg);
3863 return mySubscriptionResults;
3869 if (mySubscriptionResults.find(objID) != mySubscriptionResults.end()) {
3870 return mySubscriptionResults.find(objID)->second;
3879 return myContextSubscriptionResults;
3885 if (myContextSubscriptionResults.find(objID) != myContextSubscriptionResults.end()) {
3886 return myContextSubscriptionResults.find(objID)->second;
3895 mySubscriptionResults.clear();
3896 myContextSubscriptionResults.clear();
3902 return mySubscriptionResults;
3908 return myContextSubscriptionResults[objID];
double getElectricityConsumption(const std::string &edgeID) const
double getLastStepHaltingNumber(const std::string &edgeID) const
double getHCEmission(const std::string &edgeID) const
void adaptTraveltime(const std::string &edgeID, double time, double beginSeconds=0., double endSeconds=std::numeric_limits< double >::max()) const
double getLastStepOccupancy(const std::string &edgeID) const
double getLastStepLength(const std::string &edgeID) const
std::vector< std::string > getLastStepVehicleIDs(const std::string &edgeID) const
double getNOxEmission(const std::string &edgeID) const
void setMaxSpeed(const std::string &edgeID, double speed) const
double getCO2Emission(const std::string &edgeID) const
double getCOEmission(const std::string &edgeID) const
int getLaneNumber(const std::string &edgeID) const
void setEffort(const std::string &edgeID, double effort, double beginSeconds=0., double endSeconds=std::numeric_limits< double >::max()) const
double getNoiseEmission(const std::string &edgeID) const
double getFuelConsumption(const std::string &edgeID) const
double getTraveltime(const std::string &edgeID) const
int getLastStepVehicleNumber(const std::string &edgeID) const
std::string getStreetName(const std::string &id) const
double getLastStepMeanSpeed(const std::string &edgeID) const
double getPMxEmission(const std::string &edgeID) const
double getAdaptedTraveltime(const std::string &edgeID, double time) const
double getEffort(const std::string &edgeID, double time) const
void setOffset(const std::string &viewID, double x, double y) const
libsumo::TraCIPositionVector getBoundary(const std::string &viewID=DEFAULT_VIEW) const
std::string getSchema(const std::string &viewID=DEFAULT_VIEW) const
void setBoundary(const std::string &viewID, double xmin, double ymin, double xmax, double ymax) const
void setZoom(const std::string &viewID, double zoom) const
void trackVehicle(const std::string &viewID, const std::string &vehID) const
void setSchema(const std::string &viewID, const std::string &schemeName) const
libsumo::TraCIPosition getOffset(const std::string &viewID=DEFAULT_VIEW) const
double getZoom(const std::string &viewID=DEFAULT_VIEW) const
void screenshot(const std::string &viewID, const std::string &filename, const int width=-1, const int height=-1) const
std::vector< libsumo::TraCIVehicleData > getVehicleData(const std::string &loopID) const
int getIntervalVehicleNumber(const std::string &loopID) const
double getPosition(const std::string &loopID) const
double getLastStepMeanSpeed(const std::string &loopID) const
double getTimeSinceDetection(const std::string &loopID) const
double getLastStepMeanLength(const std::string &loopID) const
std::vector< std::string > getLastStepVehicleIDs(const std::string &loopID) const
double getLastStepOccupancy(const std::string &loopID) const
int getLastStepVehicleNumber(const std::string &loopID) const
std::string getLaneID(const std::string &loopID) const
libsumo::TraCIPosition getPosition(const std::string &junctionID) const
libsumo::TraCIPositionVector getShape(const std::string &junctionID) const
int getLastStepVehicleNumber(const std::string &laneID) const
double getPMxEmission(const std::string &laneID) const
int getLastStepHaltingNumber(const std::string &laneID) const
std::string getEdgeID(const std::string &laneID) const
void setDisallowed(const std::string &laneID, const std::vector< std::string > &disallowedClasses) const
libsumo::TraCIPositionVector getShape(const std::string &laneID) const
double getLastStepLength(const std::string &laneID) const
void setLength(const std::string &laneID, double length) const
double getLength(const std::string &laneID) const
int getLinkNumber(const std::string &laneID) const
double getTraveltime(const std::string &laneID) const
double getCOEmission(const std::string &laneID) const
void setMaxSpeed(const std::string &laneID, double speed) const
std::vector< std::string > getInternalFoes(const std::string &laneID) const
void setAllowed(const std::string &laneID, const std::vector< std::string > &allowedClasses) const
std::vector< std::string > getDisallowed(const std::string &laneID) const
double getNoiseEmission(const std::string &laneID) const
std::vector< std::string > getAllowed(const std::string &laneID) const
double getFuelConsumption(const std::string &laneID) const
double getWidth(const std::string &laneID) const
double getCO2Emission(const std::string &laneID) const
double getHCEmission(const std::string &laneID) const
std::vector< libsumo::TraCIConnection > getLinks(const std::string &laneID) const
double getMaxSpeed(const std::string &laneID) const
std::vector< std::string > getLastStepVehicleIDs(const std::string &laneID) const
double getElectricityConsumption(const std::string &laneID) const
std::vector< std::string > getFoes(const std::string &laneID, const std::string &toLaneID) const
double getLastStepMeanSpeed(const std::string &laneID) const
double getNOxEmission(const std::string &laneID) const
double getLastStepOccupancy(const std::string &laneID) const
std::vector< std::string > getLastStepVehicleIDs(const std::string &detID) const
int getLastStepVehicleNumber(const std::string &detID) const
std::vector< std::string > getExitLanes(const std::string &detID) const
std::vector< double > getExitPositions(const std::string &detID) const
double getLastStepMeanSpeed(const std::string &detID) const
int getLastStepHaltingNumber(const std::string &detID) const
std::vector< std::string > getEntryLanes(const std::string &detID) const
std::vector< double > getEntryPositions(const std::string &detID) const
libsumo::TraCIColor getColor(const std::string &poiID) const
void add(const std::string &poiID, double x, double y, const libsumo::TraCIColor &c, const std::string &type, int layer, const std::string &imgFile, double width, double height, double angle) const
std::string getImageFile(const std::string &poiID) const
void setWidth(const std::string &poiID, double width) const
libsumo::TraCIPosition getPosition(const std::string &poiID) const
void setImageFile(const std::string &poiID, const std::string &imageFile) const
void setHeight(const std::string &poiID, double height) const
void setAngle(const std::string &poiID, double angle) const
double getHeight(const std::string &poiID) const
double getAngle(const std::string &poiID) const
void remove(const std::string &poiID, int layer=0) const
void setColor(const std::string &poiID, const libsumo::TraCIColor &c) const
void setPosition(const std::string &poiID, double x, double y) const
double getWidth(const std::string &poiID) const
void setType(const std::string &poiID, const std::string &setType) const
std::string getType(const std::string &poiID) const
std::string getNextEdge(const std::string &personID) const
void setLength(const std::string &personID, double length) const
libsumo::TraCIColor getColor(const std::string &personID) const
double getSlope(const std::string &personID) const
int getRemainingStages(const std::string &personID) const
double getWaitingTime(const std::string &personID) const
void setSpeedFactor(const std::string &personID, double factor) const
libsumo::TraCIStage getStage(const std::string &personID, int nextStageIndex=0) const
void removeStage(const std::string &personID, int nextStageIndex) const
void add(const std::string &personID, const std::string &edgeID, double pos, double depart=libsumo::DEPARTFLAG_NOW, const std::string typeID="DEFAULT_PEDTYPE")
void appendWalkingStage(const std::string &personID, const std::vector< std::string > &edges, double arrivalPos, double duration=-1, double speed=-1, const std::string &stopID="")
void setSpeed(const std::string &personID, double speed) const
double getLength(const std::string &personID) const
void moveToXY(const std::string &personID, const std::string &edgeID, const double x, const double y, double angle, const int keepRoute) const
void setHeight(const std::string &personID, double height) const
void setType(const std::string &personID, const std::string &typeID) const
void setMinGap(const std::string &personID, double minGap) const
void moveTo(const std::string &personID, const std::string &edgeID, double position) const
libsumo::TraCIPosition getPosition(const std::string &personID) const
double getSpeedFactor(const std::string &personID) const
void removeStages(const std::string &personID) const
void setColor(const std::string &personID, const libsumo::TraCIColor &c) const
std::string getRoadID(const std::string &personID) const
double getSpeed(const std::string &personID) const
std::string getVehicle(const std::string &personID) const
void appendDrivingStage(const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="")
std::string getTypeID(const std::string &personID) const
void appendStage(const std::string &personID, const libsumo::TraCIStage &stage)
double getAngle(const std::string &personID) const
std::string getLaneID(const std::string &personID) const
libsumo::TraCIPosition getPosition3D(const std::string &personID) const
std::vector< std::string > getEdges(const std::string &personID, int nextStageIndex=0) const
void appendWaitingStage(const std::string &personID, double duration, const std::string &description="waiting", const std::string &stopID="")
double getLanePosition(const std::string &personID) const
void setWidth(const std::string &personID, double width) const
void rerouteTraveltime(const std::string &personID) const
libsumo::TraCIColor getColor(const std::string &polygonID) const
void setType(const std::string &polygonID, const std::string &setType) const
bool getFilled(const std::string &polygonID) const
void add(const std::string &polygonID, const libsumo::TraCIPositionVector &shape, const libsumo::TraCIColor &c, bool fill, const std::string &type, int layer) const
libsumo::TraCIPositionVector getShape(const std::string &polygonID) const
std::string getType(const std::string &polygonID) const
void remove(const std::string &polygonID, int layer=0) const
double getLineWidth(const std::string &polygonID) const
void setColor(const std::string &polygonID, const libsumo::TraCIColor &c) const
void setLineWidth(const std::string &polygonID, const double lineWidth) const
void setShape(const std::string &polygonID, const libsumo::TraCIPositionVector &shape) const
std::vector< std::string > getEdges(const std::string &routeID) const
void add(const std::string &routeID, const std::vector< std::string > &edges) const
int getDepartedNumber() const
double getDistance2D(double x1, double y1, double x2, double y2, bool isGeo=false, bool isDriving=false)
libsumo::TraCIPosition convert2D(const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false) const
std::vector< std::string > getStartingTeleportIDList() const
int getStartingTeleportNumber() const
int getEndingTeleportNumber() const
int getBusStopWaiting(const std::string &stopID) const
libsumo::TraCIStage findRoute(const std::string &fromEdge, const std::string &toEdge, const std::string &vType="", double pos=-1., int routingMode=0) const
libsumo::TraCIRoadPosition convertRoad(double x, double y, bool isGeo=false, const std::string &vClass="ignoring") const
void loadState(const std::string &path) const
int getCurrentTime() const
std::vector< std::string > getBusStopWaitingIDList(const std::string &stopID) const
int getDepartedPersonNumber() const
double getDistanceRoad(const std::string &edgeID1, double pos1, const std::string &edgeID2, double pos2, bool isDriving=false)
std::vector< std::string > getArrivedPersonIDList() const
void saveState(const std::string &destination) const
std::vector< std::string > getEndingTeleportIDList() const
int getMinExpectedNumber() const
std::vector< std::string > getDepartedPersonIDList() const
std::vector< std::string > getDepartedIDList() const
int getArrivedPersonNumber() const
std::vector< std::string > getLoadedIDList() const
int getLoadedNumber() const
std::vector< std::string > getArrivedIDList() const
int getArrivedNumber() const
std::string getOption(const std::string &option) const
libsumo::TraCIPositionVector getNetBoundary() const
void writeMessage(const std::string msg)
libsumo::TraCIPosition convertGeo(double x, double y, bool fromGeo=false) const
libsumo::TraCIPosition convert3D(const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false) const
int getUnsignedByte(int var, const std::string &id, tcpip::Storage *add=0) const
const libsumo::SubscriptionResults getContextSubscriptionResults(const std::string &objID) const
int getInt(int var, const std::string &id, tcpip::Storage *add=0) const
std::vector< std::string > getStringVector(int var, const std::string &id, tcpip::Storage *add=0) const
double getDouble(int var, const std::string &id, tcpip::Storage *add=0) const
libsumo::TraCIPosition getPos3D(int var, const std::string &id, tcpip::Storage *add=0) const
std::pair< std::string, std::string > getParameterWithKey(const std::string &objectID, const std::string &key) const
retrieve generic parameter and return (key, value) tuple
libsumo::TraCIColor getCol(int var, const std::string &id, tcpip::Storage *add=0) const
void clearSubscriptionResults()
const libsumo::SubscriptionResults getAllSubscriptionResults() const
void setStringVector(int var, const std::string &id, const std::vector< std::string > &value) const
std::vector< std::string > getIDList() const
libsumo::TraCIPositionVector getPolygon(int var, const std::string &id, tcpip::Storage *add=0) const
libsumo::SubscriptionResults & getModifiableSubscriptionResults()
const libsumo::TraCIResults getSubscriptionResults(const std::string &objID) const
void setString(int var, const std::string &id, const std::string &value) const
void subscribeContext(const std::string &objID, int domain, double range, const std::vector< int > &vars, double beginTime, double endTime) const
void setParameter(const std::string &objectID, const std::string &key, const std::string &value) const
set generic paramter
std::string getParameter(const std::string &objectID, const std::string &key) const
retrieve generic parameter
std::vector< double > getDoubleVector(int var, const std::string &id, tcpip::Storage *add=0) const
void setInt(int var, const std::string &id, int value) const
int getByte(int var, const std::string &id, tcpip::Storage *add=0) const
libsumo::TraCIStage getTraCIStage(int var, const std::string &id, tcpip::Storage *add=0) const
void subscribe(const std::string &objID, const std::vector< int > &vars, double beginTime, double endTime) const
std::string getString(int var, const std::string &id, tcpip::Storage *add=0) const
libsumo::TraCIPosition getPos(int var, const std::string &id, tcpip::Storage *add=0) const
const libsumo::ContextSubscriptionResults getAllContextSubscriptionResults() const
libsumo::SubscriptionResults & getModifiableContextSubscriptionResults(const std::string &objID)
void setDouble(int var, const std::string &id, double value) const
int getServedPersonCount(const std::string &tlsID, int index) const
std::string getRedYellowGreenState(const std::string &tlsID) const
int getPhase(const std::string &tlsID) const
std::string getPhaseName(const std::string &tlsID) const
void setRedYellowGreenState(const std::string &tlsID, const std::string &state) const
std::string getProgram(const std::string &tlsID) const
void setPhase(const std::string &tlsID, int index) const
void setPhaseName(const std::string &tlsID, const std::string &name) const
double getNextSwitch(const std::string &tlsID) const
std::vector< std::vector< libsumo::TraCILink > > getControlledLinks(const std::string &tlsID) const
double getPhaseDuration(const std::string &tlsID) const
std::vector< std::string > getControlledLanes(const std::string &tlsID) const
std::vector< libsumo::TraCILogic > getAllProgramLogics(const std::string &tlsID) const
void setPhaseDuration(const std::string &tlsID, double phaseDuration) const
void setProgramLogic(const std::string &tlsID, const libsumo::TraCILogic &logic) const
void setProgram(const std::string &tlsID, const std::string &programID) const
std::vector< libsumo::TraCINextTLSData > getNextTLS(const std::string &vehID) const
void changeLane(const std::string &vehicleID, int laneIndex, double duration) const
void setMinGap(const std::string &vehicleID, double minGap) const
double getLateralSpeed(const std::string &vehicleID) const
void setMaxSpeed(const std::string &vehicleID, double speed) const
void setPreviousSpeed(const std::string &vehicleID, double prevSpeed, double prevAcceleration=std::numeric_limits< int >::min()) const
double getSpeed(const std::string &vehicleID) const
int getStopState(const std::string &vehicleID) const
double getWaitingTime(const std::string &vehicleID) const
void addSubscriptionFilterCFManeuver(double downstreamDist=-1, double upstreamDist=-1) const
double getCOEmission(const std::string &vehicleID) const
void addSubscriptionFilterStringList(int filterType, const std::vector< std::string > &vals) const
void changeTarget(const std::string &vehicleID, const std::string &edgeID) const
libsumo::TraCIPosition getPosition(const std::string &vehicleID) const
bool isRouteValid(const std::string &vehicleID) const
void addSubscriptionFilterByteList(int filterType, const std::vector< int > &vals) const
double getSecureGap(const std::string &vehicleID, double speed, double leaderSpeed, double leaderMaxDecel, const std::string &leaderID="") const
void setSpeedFactor(const std::string &vehicleID, double factor) const
void setShapeClass(const std::string &vehicleID, const std::string &clazz) const
void addSubscriptionFilterLateralDistance(double lateralDist, double downstreamDist=-1, double foeDistToJunction=-1) const
void setVia(const std::string &vehicleID, const std::vector< std::string > &via) const
void setEmissionClass(const std::string &vehicleID, const std::string &clazz) const
double getTau(const std::string &vehicleID) const
double getDistance(const std::string &vehicleID) const
void remove(const std::string &vehicleID, char reason=libsumo::REMOVE_VAPORIZED) const
void openGap(const std::string &vehicleID, double newTau, double duration, double changeRate, double maxDecel) const
void moveTo(const std::string &vehicleID, const std::string &laneID, double position, int reason=libsumo::MOVE_TELEPORT) const
void setSpeed(const std::string &vehicleID, double speed) const
std::string getEmissionClass(const std::string &vehicleID) const
void setStop(const std::string vehicleID, const std::string edgeID, const double endPos=1., const int laneIndex=0, const double duration=std::numeric_limits< double >::max(), const int flags=0, const double startPos=std::numeric_limits< int >::min(), const double until=-1) const
void setRouteID(const std::string &vehicleID, const std::string &routeID) const
std::pair< int, int > getLaneChangeState(const std::string &vehicleID, int direction) const
double getNoiseEmission(const std::string &vehicleID) const
std::string getShapeClass(const std::string &vehicleID) const
void addSubscriptionFilterLeadFollow(const std::vector< int > &lanes) const
std::string getLine(const std::string &vehicleID) const
double getElectricityConsumption(const std::string &vehicleID) const
double getSpeedFactor(const std::string &vehicleID) const
double getNOxEmission(const std::string &vehicleID) const
void setRoute(const std::string &vehicleID, const std::vector< std::string > &edge) const
int getSignals(const std::string &vehicleID) const
libsumo::TraCIColor getColor(const std::string &vehicleID) const
int getPersonCapacity(const std::string &vehicleID) const
void setSignals(const std::string &vehicleID, int signals) const
std::string getRoadID(const std::string &vehicleID) const
void addSubscriptionFilterVType(const std::vector< std::string > &vTypes) const
void addSubscriptionFilterUpstreamDistance(double dist) const
void addSubscriptionFilterFloat(int filterType, double val) const
double getAllowedSpeed(const std::string &vehicleID) const
void addSubscriptionFilterLanes(const std::vector< int > &lanes, bool noOpposite=false, double downstreamDist=-1, double upstreamDist=-1) const
double getCO2Emission(const std::string &vehicleID) const
double getFuelConsumption(const std::string &vehicleID) const
double getHCEmission(const std::string &vehicleID) const
void addSubscriptionFilterNoOpposite() const
void addSubscriptionFilterLCManeuver(int direction, bool noOpposite=false, double downstreamDist=-1, double upstreamDist=-1) const
std::pair< std::string, double > getLeader(const std::string &vehicleID, double dist) const
double getAcceleration(const std::string &vehicleID) const
std::vector< std::string > getVia(const std::string &vehicleID) const
void addSubscriptionFilterVClass(const std::vector< std::string > &vClasses) const
double getImperfection(const std::string &vehicleID) const
std::string getLaneID(const std::string &vehicleID) const
double getAngle(const std::string &vehicleID) const
void addSubscriptionFilterDownstreamDistance(double dist) const
double getMinGap(const std::string &vehicleID) const
void addSubscriptionFilterEmpty(int filterType) const
double getStopArrivalDelay(const std::string &vehicleID) const
void setAcceleration(const std::string &vehicleID, double accel, double duration) const
std::vector< std::string > getPersonIDList(const std::string &vehicleID) const
double getStopDelay(const std::string &vehicleID) const
double getMinGapLat(const std::string &vehicleID) const
void setLine(const std::string &vehicleID, const std::string &line) const
double getSlope(const std::string &vehicleID) const
void setColor(const std::string &vehicleID, const libsumo::TraCIColor &c) 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
libsumo::TraCIPosition getPosition3D(const std::string &vehicleID) const
void setLaneChangeMode(const std::string &vehicleID, int mode) const
void setRoutingMode(const std::string &vehicleID, int routingMode) const
void addSubscriptionFilterTurn(double downstreamDist=-1, double upstreamDist=-1) const
double getDecel(const std::string &vehicleID) const
void moveToXY(const std::string &vehicleID, const std::string &edgeID, const int lane, const double x, const double y, const double angle, const int keepRoute) const
double getHeight(const std::string &veihcleID) const
int getRouteIndex(const std::string &vehicleID) const
double getMaxSpeedLat(const std::string &vehicleID) const
void changeSublane(const std::string &vehicleID, double latDist) const
std::string getLateralAlignment(const std::string &vehicleID) const
std::string getRouteID(const std::string &vehicleID) const
double getLanePosition(const std::string &vehicleID) const
int getLaneChangeMode(const std::string &vehicleID) const
int getSpeedMode(const std::string &vehicleID) const
std::vector< std::string > getRoute(const std::string &vehicleID) const
double getLateralLanePosition(const std::string &vehicleID) const
std::pair< std::string, double > getFollower(const std::string &vehicleID, double dist) const
double getPMxEmission(const std::string &vehicleID) const
double getLength(const std::string &vehicleID) const
double getMaxSpeed(const std::string &vehicleID) const
std::string getVehicleClass(const std::string &vehicleID) const
double getSpeedWithoutTraCI(const std::string &vehicleID) const
int getRoutingMode(const std::string &vehicleID) const
double getWidth(const std::string &vehicleID) const
double getSpeedDeviation(const std::string &vehicleID) const
int getPersonNumber(const std::string &vehicleID) const
double getFollowSpeed(const std::string &vehicleID, double speed, double gap, double leaderSpeed, double leaderMaxDecel, const std::string &leaderID="") const
void setType(const std::string &vehicleID, const std::string &typeID) const
void addSubscriptionFilterFieldOfVision(double angle) const
std::vector< libsumo::TraCIBestLanesData > getBestLanes(const std::string &vehicleID) const
double getAccel(const std::string &vehicleID) const
void setSpeedMode(const std::string &vehicleID, int mode) const
void slowDown(const std::string &vehicleID, double speed, double duration) const
std::string getTypeID(const std::string &vehicleID) const
double getAccumulatedWaitingTime(const std::string &vehicleID) const
void changeLaneRelative(const std::string &vehicleID, int laneChange, double duration) const
void rerouteTraveltime(const std::string &vehicleID, bool currentTravelTimes=true) const
double getStopSpeed(const std::string &vehicleID, double speed, double gap) const
int getLaneIndex(const std::string &vehicleID) const
double getSpeedDeviation(const std::string &typeID) const
double getSpeedFactor(const std::string &typeID) const
void setImperfection(const std::string &typeID, double imperfection) const
void setApparentDecel(const std::string &typeID, double decel) const
void setHeight(const std::string &typeID, double height) const
std::string getShapeClass(const std::string &typeID) const
double getMinGapLat(const std::string &typeID) const
void copy(const std::string &origTypeID, const std::string &newTypeID) const
int getPersonCapacity(const std::string &typeID) const
void setVehicleClass(const std::string &typeID, const std::string &clazz) const
void setColor(const std::string &typeID, const libsumo::TraCIColor &c) const
void setDecel(const std::string &typeID, double decel) const
void setWidth(const std::string &typeID, double width) const
double getApparentDecel(const std::string &typeID) const
double getDecel(const std::string &typeID) const
void setLateralAlignment(const std::string &typeID, const std::string &latAlignment) const
void setMaxSpeed(const std::string &typeID, double speed) const
double getMinGap(const std::string &typeID) const
std::string getVehicleClass(const std::string &typeID) const
void setShapeClass(const std::string &typeID, const std::string &shapeClass) const
double getMaxSpeedLat(const std::string &typeID) const
double getEmergencyDecel(const std::string &typeID) const
double getWidth(const std::string &typeID) const
libsumo::TraCIColor getColor(const std::string &typeID) const
double getTau(const std::string &typeID) const
double getMaxSpeed(const std::string &typeID) const
double getLength(const std::string &typeID) const
std::string getEmissionClass(const std::string &typeID) const
double getImperfection(const std::string &typeID) const
void setEmissionClass(const std::string &typeID, const std::string &clazz) const
void setAccel(const std::string &typeID, double accel) const
void setMinGap(const std::string &typeID, double minGap) const
double getAccel(const std::string &typeID) const
void setSpeedFactor(const std::string &typeID, double factor) const
double getHeight(const std::string &typeID) const
void setEmergencyDecel(const std::string &typeID, double decel) const
void setSpeedDeviation(const std::string &typeID, double deviation) const
void setMaxSpeedLat(const std::string &typeID, double speed) const
std::string getLateralAlignment(const std::string &typeID) const
void setMinGapLat(const std::string &typeID, double minGapLat) const
void setLength(const std::string &typeID, double length) const
void setTau(const std::string &typeID, double tau) const
RouteScope route
Scope for interaction with routes.
std::pair< int, std::string > getVersion()
return TraCI API and SUMO version
void setOrder(int order)
set priority (execution order) for the client
void readVariableSubscription(int cmdId, tcpip::Storage &inMsg)
tcpip::Storage myInput
The reusable input storage.
MeMeScope multientryexit
Scope for interaction with multi-entry/-exit detectors.
VehicleTypeScope vehicletype
Scope for interaction with vehicle types.
void send_commandSubscribeObjectVariable(int domID, const std::string &objID, double beginTime, double endTime, const std::vector< int > &vars) const
Sends a SubscribeVariable request.
void send_commandSimulationStep(double time) const
Sends a SimulationStep command.
GUIScope gui
Scope for interaction with the gui.
void check_resultState(tcpip::Storage &inMsg, int command, bool ignoreCommandId=false, std::string *acknowledgement=0) const
Validates the result state of a command.
PolygonScope polygon
Scope for interaction with polygons.
static std::string toString(const T &t, std::streamsize accuracy=PRECISION)
void connect(const std::string &host, int port)
Connects to the specified SUMO server.
tcpip::Socket * mySocket
The socket.
void load(const std::vector< std::string > &args)
Let sumo load a simulation using the given command line like options.
LaneAreaScope lanearea
Scope for interaction with lanes.
void simulationStep(double time=0)
Advances by one step (or up to the given time)
void createFilterCommand(int cmdID, int varID, tcpip::Storage *add=nullptr) const
void createCommand(int cmdID, int varID, const std::string &objID, tcpip::Storage *add=nullptr) const
Sends a GetVariable / SetVariable request if mySocket is connected. Otherwise writes to myOutput only...
void close()
ends the simulation and closes the connection
LaneScope lane
Scope for interaction with lanes.
std::map< int, TraCIScopeWrapper * > myDomains
void send_commandSubscribeObjectContext(int domID, const std::string &objID, double beginTime, double endTime, int domain, double range, const std::vector< int > &vars) const
Sends a SubscribeContext request.
bool processSet(int command)
TrafficLightScope trafficlights
Scope for interaction with traffic lights.
tcpip::Storage myOutput
The reusable output storage.
POIScope poi
Scope for interaction with POIs.
void closeSocket()
Closes the connection.
int check_commandGetResult(tcpip::Storage &inMsg, int command, int expectedType=-1, bool ignoreCommandId=false) const
Validates the result state of a command.
VehicleScope vehicle
Scope for interaction with vehicles.
JunctionScope junction
Scope for interaction with junctions.
void send_commandClose() const
Sends a Close command.
void send_commandSetOrder(int order) const
Sends a SetOrder command.
RouteProbeScope routeprobe
Scope for interaction with route probes.
EdgeScope edge
Scope for interaction with edges.
bool processGet(int command, int expectedType, bool ignoreCommandId=false)
SimulationScope simulation
Scope for interaction with the simulation.
void readContextSubscription(int cmdId, tcpip::Storage &inMsg)
void readVariables(tcpip::Storage &inMsg, const std::string &objectID, int variableCount, libsumo::SubscriptionResults &into)
PersonScope person
Scope for interaction with persons.
RerouterScope rerouter
Scope for interaction with rerouters.
An error which allows to continue.
std::map< std::string, std::string > subParameter
std::vector< std::shared_ptr< libsumo::TraCIPhase > > phases
std::string intended
id of the intended vehicle for public transport ride
int type
The type of stage (walking, driving, ...)
std::string destStop
The id of the destination stop.
double travelTime
duration of the stage in seconds
double departPos
position on the lane when starting the stage
std::string description
arbitrary description string
std::string line
The line or the id of the vehicle type.
double depart
intended depart time for public transport ride or INVALID_DOUBLE_VALUE
std::vector< std::string > edges
The sequence of edges to travel.
double arrivalPos
position on the lane when ending the stage
std::string vType
The vehicle type when using a private car or bike.
bool receiveExact(Storage &)
Receive a complete TraCI message from Socket::socket_.
void sendExact(const Storage &)
void connect()
Connects to host_:port_.
virtual std::string readString()
virtual void writeString(const std::string &s)
virtual unsigned int position() const
virtual void writeInt(int)
virtual void writeDouble(double)
virtual int readUnsignedByte()
virtual void writeStringList(const std::vector< std::string > &s)
virtual void writeUnsignedByte(int)
StorageType::size_type size() const
virtual void writeByte(int)
virtual void writeStorage(tcpip::Storage &store)
virtual double readDouble()
TRACI_CONST double INVALID_DOUBLE_VALUE
TRACI_CONST int RESPONSE_SUBSCRIBE_GUI_VARIABLE
TRACI_CONST int LAST_STEP_VEHICLE_ID_LIST
TRACI_CONST int VAR_EXIT_POSITIONS
TRACI_CONST int TYPE_COLOR
TRACI_CONST int VAR_MIN_EXPECTED_VEHICLES
TRACI_CONST int CMD_SAVE_SIMSTATE
TRACI_CONST int FILTER_TYPE_DOWNSTREAM_DIST
TRACI_CONST int VAR_IMAGEFILE
TRACI_CONST int VAR_EDGES
TRACI_CONST int LAST_STEP_VEHICLE_NUMBER
TRACI_CONST int POSITION_3D
TRACI_CONST int POSITION_ROADMAP
TRACI_CONST int VAR_NOXEMISSION
TRACI_CONST int VAR_LANECHANGE_MODE
TRACI_CONST int VAR_ARRIVED_VEHICLES_NUMBER
TRACI_CONST int LAST_STEP_PERSON_ID_LIST
TRACI_CONST int RTYPE_NOTIMPLEMENTED
TRACI_CONST int RESPONSE_SUBSCRIBE_ROUTE_VARIABLE
TRACI_CONST int FILTER_TYPE_NOOPPOSITE
TRACI_CONST int VAR_VEHICLECLASS
TRACI_CONST int LANE_LINKS
TRACI_CONST int TRACI_ID_LIST
TRACI_CONST int VAR_LATALIGNMENT
TRACI_CONST int VAR_DEPARTED_VEHICLES_NUMBER
TRACI_CONST int CMD_GET_TL_VARIABLE
TRACI_CONST int VAR_VIEW_BOUNDARY
TRACI_CONST int LAST_STEP_VEHICLE_DATA
TRACI_CONST int CMD_CHANGESUBLANE
TRACI_CONST int CMD_LOAD_SIMSTATE
TRACI_CONST int CMD_SET_EDGE_VARIABLE
TRACI_CONST int RESPONSE_SUBSCRIBE_LANE_VARIABLE
TRACI_CONST int VAR_LAST_INTERVAL_NUMBER
TRACI_CONST int VAR_ROUTING_MODE
TRACI_CONST int VAR_MINGAP
TRACI_CONST int VAR_VEHICLE
TRACI_CONST int VAR_SECURE_GAP
TRACI_CONST int VAR_LANES
TRACI_CONST int VAR_SHAPECLASS
TRACI_CONST int VAR_WAITING_TIME
std::map< std::string, libsumo::SubscriptionResults > ContextSubscriptionResults
TRACI_CONST int LANE_LINK_NUMBER
TRACI_CONST int VAR_EDGE_TRAVELTIME
TRACI_CONST int VAR_ROAD_ID
TRACI_CONST int CMD_GET_VEHICLE_VARIABLE
TRACI_CONST int VAR_SCREENSHOT
TRACI_CONST int VAR_SPEED_FACTOR
TRACI_CONST int MOVE_TO_XY
TRACI_CONST int VAR_FOLLOW_SPEED
TRACI_CONST int VAR_STOP_ARRIVALDELAY
TRACI_CONST int VAR_SPEED_LAT
TRACI_CONST int LAST_STEP_LENGTH
TRACI_CONST int FILTER_TYPE_FIELD_OF_VISION
TRACI_CONST int TL_CONTROLLED_LANES
TRACI_CONST int VAR_ANGLE
TRACI_CONST int TYPE_COMPOUND
TRACI_CONST int LANE_EDGE_ID
TRACI_CONST int VAR_NEXT_TLS
TRACI_CONST int RESPONSE_SUBSCRIBE_PERSON_VARIABLE
TRACI_CONST int VAR_EDGE_EFFORT
TRACI_CONST int RESPONSE_SUBSCRIBE_TL_VARIABLE
TRACI_CONST int VAR_VIEW_OFFSET
TRACI_CONST int RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE
TRACI_CONST int VAR_ROUTE
TRACI_CONST int VAR_BEST_LANES
TRACI_CONST int VAR_ALLOWED_SPEED
TRACI_CONST int VAR_LANE_INDEX
TRACI_CONST int VAR_PMXEMISSION
TRACI_CONST int VAR_SPEED_WITHOUT_TRACI
TRACI_CONST int VAR_DEPARTED_PERSONS_NUMBER
TRACI_CONST int TL_COMPLETE_DEFINITION_RYG
TRACI_CONST int TYPE_UBYTE
TRACI_CONST int VAR_STAGE
TRACI_CONST int CMD_SET_POI_VARIABLE
TRACI_CONST int VAR_MOVE_TO
TRACI_CONST int RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE
TRACI_CONST int VAR_PERSON_NUMBER
TRACI_CONST int RESPONSE_SUBSCRIBE_REROUTER_VARIABLE
TRACI_CONST int CMD_SET_POLYGON_VARIABLE
TRACI_CONST int VAR_COEMISSION
TRACI_CONST int RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE
TRACI_CONST int VAR_COLOR
TRACI_CONST int VAR_POSITION
TRACI_CONST int VAR_WIDTH
TRACI_CONST int VAR_PERSON_CAPACITY
TRACI_CONST int VAR_VIEW_SCHEMA
TRACI_CONST int POSITION_2D
TRACI_CONST int VAR_MAXSPEED
TRACI_CONST int VAR_ARRIVED_PERSONS_IDS
TRACI_CONST int VAR_LEADER
TRACI_CONST int CMD_CHANGETARGET
TRACI_CONST int CMD_CLOSE
TRACI_CONST int TYPE_POLYGON
TRACI_CONST int LAST_STEP_MEAN_SPEED
TRACI_CONST int STAGE_WAITING
TRACI_CONST int CMD_SET_ROUTE_VARIABLE
TRACI_CONST int CMD_SETORDER
TRACI_CONST int VAR_CO2EMISSION
TRACI_CONST int RESPONSE_SUBSCRIBE_JUNCTION_VARIABLE
TRACI_CONST int FILTER_TYPE_VTYPE
TRACI_CONST int CMD_REROUTE_TRAVELTIME
TRACI_CONST int VAR_NET_BOUNDING_BOX
TRACI_CONST int TYPE_STRINGLIST
TRACI_CONST int APPEND_STAGE
TRACI_CONST int VAR_VIEW_ZOOM
TRACI_CONST int CMD_SET_SIM_VARIABLE
TRACI_CONST int TL_CONTROLLED_LINKS
TRACI_CONST int TYPE_INTEGER
TRACI_CONST int VAR_PREV_SPEED
TRACI_CONST int VAR_ROUTE_VALID
TRACI_CONST int VAR_SPEEDSETMODE
TRACI_CONST int POSITION_LON_LAT
TRACI_CONST int CMD_ADD_SUBSCRIPTION_FILTER
TRACI_CONST int CMD_SET_VEHICLE_VARIABLE
TRACI_CONST int VAR_FUELCONSUMPTION
TRACI_CONST int CMD_SET_GUI_VARIABLE
std::map< std::string, libsumo::TraCIResults > SubscriptionResults
{object->{variable->value}}
TRACI_CONST int VAR_SLOPE
TRACI_CONST int VAR_SHAPE
TRACI_CONST int LAST_STEP_VEHICLE_HALTING_NUMBER
TRACI_CONST int VAR_LENGTH
TRACI_CONST int VAR_MAXSPEED_LAT
TRACI_CONST int VAR_HCEMISSION
TRACI_CONST int VAR_BUS_STOP_WAITING_IDS
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int VAR_LANEPOSITION
TRACI_CONST int CMD_SET_VEHICLETYPE_VARIABLE
TRACI_CONST int CMD_SET_PERSON_VARIABLE
TRACI_CONST int VAR_DEPARTED_VEHICLES_IDS
TRACI_CONST int VAR_TELEPORT_ENDING_VEHICLES_NUMBER
TRACI_CONST int CMD_GET_SIM_VARIABLE
TRACI_CONST int CMD_MESSAGE
TRACI_CONST int VAR_LANE_ID
TRACI_CONST int VAR_STOP_SPEED
TRACI_CONST int VAR_IMPERFECTION
TRACI_CONST int RESPONSE_SUBSCRIBE_ROUTEPROBE_VARIABLE
TRACI_CONST int LAST_STEP_OCCUPANCY
TRACI_CONST int VAR_HEIGHT
TRACI_CONST int RESPONSE_SUBSCRIBE_LANEAREA_VARIABLE
TRACI_CONST int VAR_APPARENT_DECEL
TRACI_CONST int TL_NEXT_SWITCH
TRACI_CONST int VAR_NOISEEMISSION
TRACI_CONST int VAR_LOADED_VEHICLES_IDS
TRACI_CONST int VAR_EXIT_LANES
TRACI_CONST int FILTER_TYPE_LEAD_FOLLOW
TRACI_CONST int RESPONSE_SUBSCRIBE_VEHICLETYPE_VARIABLE
TRACI_CONST int VAR_DELTA_T
TRACI_CONST int REQUEST_DRIVINGDIST
TRACI_CONST int CMD_GET_LANE_VARIABLE
TRACI_CONST int STAGE_WALKING
TRACI_CONST int VAR_POSITION3D
TRACI_CONST int LANE_DISALLOWED
TRACI_CONST int REMOVE_STAGE
TRACI_CONST int VAR_SPEED
TRACI_CONST int VAR_DECEL
TRACI_CONST int VAR_SIGNALS
TRACI_CONST int VAR_PARAMETER_WITH_KEY
TRACI_CONST int FILTER_TYPE_UPSTREAM_DIST
TRACI_CONST int TYPE_DOUBLELIST
TRACI_CONST int VAR_ACCUMULATED_WAITING_TIME
TRACI_CONST int VAR_MINGAP_LAT
TRACI_CONST int VAR_DEPARTED_PERSONS_IDS
TRACI_CONST int INVALID_INT_VALUE
TRACI_CONST int VAR_ARRIVED_PERSONS_NUMBER
TRACI_CONST int TL_PROGRAM
TRACI_CONST int VAR_ROUTE_INDEX
TRACI_CONST int TL_PHASE_DURATION
TRACI_CONST int CMD_SLOWDOWN
TRACI_CONST int VAR_NEXT_EDGE
TRACI_CONST int FILTER_TYPE_TURN
TRACI_CONST int VAR_ACCELERATION
TRACI_CONST int FIND_ROUTE
TRACI_CONST int VAR_ROUTE_ID
TRACI_CONST int TL_PHASE_INDEX
TRACI_CONST int POSITION_CONVERSION
TRACI_CONST int TYPE_DOUBLE
TRACI_CONST int DISTANCE_REQUEST
TRACI_CONST int TYPE_BYTE
TRACI_CONST int TL_CURRENT_PHASE
TRACI_CONST int CMD_OPENGAP
TRACI_CONST int TL_COMPLETE_PROGRAM_RYG
TRACI_CONST int VAR_LOADED_VEHICLES_NUMBER
TRACI_CONST int VAR_TELEPORT_ENDING_VEHICLES_IDS
TRACI_CONST int CMD_SET_TL_VARIABLE
TRACI_CONST int VAR_LANEPOSITION_LAT
TRACI_CONST int FILTER_TYPE_VCLASS
TRACI_CONST int CMD_CHANGELANE
TRACI_CONST int VAR_CURRENT_TRAVELTIME
TRACI_CONST int VAR_TELEPORT_STARTING_VEHICLES_NUMBER
TRACI_CONST int TL_RED_YELLOW_GREEN_STATE
TRACI_CONST int RESPONSE_SUBSCRIBE_POI_VARIABLE
TRACI_CONST int VAR_STOP_DELAY
TRACI_CONST int VAR_TELEPORT_STARTING_VEHICLES_IDS
TRACI_CONST int CMD_GETVERSION
TRACI_CONST int REQUEST_AIRDIST
TRACI_CONST int VAR_BUS_STOP_WAITING
TRACI_CONST int RTYPE_ERR
TRACI_CONST int CMD_SIMSTEP
TRACI_CONST int VAR_TIME_STEP
TRACI_CONST int VAR_EMERGENCY_DECEL
TRACI_CONST int VAR_ARRIVED_VEHICLES_IDS
TRACI_CONST int RESPONSE_SUBSCRIBE_SIM_VARIABLE
TRACI_CONST int STAGE_DRIVING
TRACI_CONST int CMD_GET_INDUCTIONLOOP_VARIABLE
TRACI_CONST int LAST_STEP_TIME_SINCE_DETECTION
TRACI_CONST int VAR_STOPSTATE
TRACI_CONST int VAR_FOLLOWER
TRACI_CONST int POSITION_LON_LAT_ALT
TRACI_CONST int VAR_EMISSIONCLASS
TRACI_CONST int FILTER_TYPE_LANES
TRACI_CONST int VAR_ACCEL
TRACI_CONST int RESPONSE_SUBSCRIBE_POLYGON_VARIABLE
std::map< int, std::shared_ptr< libsumo::TraCIResult > > TraCIResults
{variable->value}
TRACI_CONST int VAR_STAGES_REMAINING
TRACI_CONST int VAR_DISTANCE
TRACI_CONST int LANE_ALLOWED
TRACI_CONST int VAR_OPTION
TRACI_CONST int RESPONSE_SUBSCRIBE_EDGE_VARIABLE
TRACI_CONST int TL_CURRENT_PROGRAM
TRACI_CONST int FILTER_TYPE_LATERAL_DIST
TRACI_CONST int VAR_ELECTRICITYCONSUMPTION
TRACI_CONST int VAR_SPEED_DEVIATION
TRACI_CONST int TYPE_STRING
double length
The length than can be driven from that lane without lane change.
double occupation
The traffic density along length.
bool allowsContinuation
Whether this lane allows continuing the route.
int bestLaneOffset
The offset of this lane from the best lane.
std::vector< std::string > continuationLanes
The sequence of lanes that best allows continuing the route without lane change.
std::string laneID
The id of the lane.
double dist
The distance to the tls.
int tlIndex
The tls index of the controlled link.
std::string id
The id of the next tls.
char state
The current state of the tls.
A 2D or 3D-position, for 2D positions z == INVALID_DOUBLE_VALUE.
std::vector< TraCIPosition > value
An edgeId, position and laneIndex.
mirrors MSInductLoop::VehicleData
std::string id
The id of the vehicle.
double entryTime
Entry-time of the vehicle in [s].
std::string typeID
Type of the vehicle in.
double length
Length of the vehicle.
double leaveTime
Leave-time of the vehicle in [s].