Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
libtraci/Vehicle.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2017-2026 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20// C++ TraCI client API implementation
21/****************************************************************************/
22#include <config.h>
23#include <sstream>
24
25#define LIBTRACI 1
27#include <libsumo/Vehicle.h>
28#include "Domain.h"
29
30namespace libtraci {
31
32typedef Domain<libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::CMD_SET_VEHICLE_VARIABLE> Dom;
33
34
35// ===========================================================================
36// static member definitions
37// ===========================================================================
38std::vector<std::string>
39Vehicle::getIDList() {
41}
42
43
44int
45Vehicle::getIDCount() {
47}
48
49
52
53double
54Vehicle::getSpeed(const std::string& vehID) {
56}
57
58double
59Vehicle::getLateralSpeed(const std::string& vehID) {
61}
62
63double
64Vehicle::getAcceleration(const std::string& vehID) {
66}
67
68
69double
70Vehicle::getSpeedWithoutTraCI(const std::string& vehID) {
72}
73
74
76Vehicle::getPosition(const std::string& vehID, const bool includeZ) {
77 return includeZ ? getPosition3D(vehID) : Dom::getPos(libsumo::VAR_POSITION, vehID);
78}
79
80
82Vehicle::getPosition3D(const std::string& vehID) {
84}
85
86
87double
88Vehicle::getAngle(const std::string& vehID) {
90}
91
92
93double
94Vehicle::getSlope(const std::string& vehID) {
96}
97
98
99std::string
100Vehicle::getRoadID(const std::string& vehID) {
102}
103
104
105double
106Vehicle::getDeparture(const std::string& vehID) {
108}
109
110
111double
112Vehicle::getDepartDelay(const std::string& vehID) {
114}
115
116
117std::string
118Vehicle::getLaneID(const std::string& vehID) {
120}
121
122
123std::string
124Vehicle::getShadowLaneID(const std::string& vehID) {
126}
127
128
129int
130Vehicle::getLaneIndex(const std::string& vehID) {
132}
133
134
135std::string
136Vehicle::getSegmentID(const std::string& vehID) {
138}
139
140
141int
142Vehicle::getSegmentIndex(const std::string& vehID) {
144}
145
146
147std::string
148Vehicle::getTypeID(const std::string& vehID) {
149 return Dom::getString(libsumo::VAR_TYPE, vehID);
150}
151
152
153std::string
154Vehicle::getRouteID(const std::string& vehID) {
156}
157
158
159int
160Vehicle::getRouteIndex(const std::string& vehID) {
162}
163
164
166Vehicle::getColor(const std::string& vehID) {
167 return Dom::getCol(libsumo::VAR_COLOR, vehID);
168}
169
170double
171Vehicle::getLanePosition(const std::string& vehID) {
173}
174
175
176double
177Vehicle::getArrivalPos(const std::string& vehID) {
179}
180
181double
182Vehicle::getLateralLanePosition(const std::string& vehID) {
184}
185
186double
187Vehicle::getCO2Emission(const std::string& vehID) {
189}
190
191double
192Vehicle::getCOEmission(const std::string& vehID) {
194}
195
196double
197Vehicle::getHCEmission(const std::string& vehID) {
199}
200
201double
202Vehicle::getPMxEmission(const std::string& vehID) {
204}
205
206double
207Vehicle::getNOxEmission(const std::string& vehID) {
209}
210
211double
212Vehicle::getFuelConsumption(const std::string& vehID) {
214}
215
216double
217Vehicle::getNoiseEmission(const std::string& vehID) {
219}
220
221double
222Vehicle::getElectricityConsumption(const std::string& vehID) {
224}
225
226int
227Vehicle::getPersonNumber(const std::string& vehID) {
229}
230
231int
232Vehicle::getPersonCapacity(const std::string& vehID) {
234}
235
236
237double
238Vehicle::getBoardingDuration(const std::string& vehID) {
240}
241
242
243double
244Vehicle::getImpatience(const std::string& vehID) {
246}
247
248
249std::vector<std::string>
250Vehicle::getPersonIDList(const std::string& vehID) {
252}
253
254std::pair<std::string, double>
255Vehicle::getLeader(const std::string& vehID, double dist) {
256 tcpip::Storage content;
257 StoHelp::writeTypedDouble(content, dist);
258 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
259 tcpip::Storage& ret = Dom::get(libsumo::VAR_LEADER, vehID, &content);
260 ret.readInt(); // components
261 ret.readUnsignedByte();
262 const std::string leaderID = ret.readString();
263 ret.readUnsignedByte();
264 const double gap = ret.readDouble();
265 return std::make_pair(leaderID, gap);
266}
267
268
269std::pair<std::string, double>
270Vehicle::getFollower(const std::string& vehID, double dist) {
271 tcpip::Storage content;
272 StoHelp::writeTypedDouble(content, dist);
273 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
274 tcpip::Storage& ret = Dom::get(libsumo::VAR_FOLLOWER, vehID, &content);
275 ret.readInt(); // components
276 const std::string leaderID = StoHelp::readTypedString(ret);
277 return std::make_pair(leaderID, StoHelp::readTypedDouble(ret));
278}
279
280
281std::vector<libsumo::TraCIJunctionFoe>
282Vehicle::getJunctionFoes(const std::string& vehID, double dist) {
283 std::vector<libsumo::TraCIJunctionFoe> result;
284 tcpip::Storage content;
285 StoHelp::writeTypedDouble(content, dist);
286 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
287 tcpip::Storage& ret = Dom::get(libsumo::VAR_FOES, vehID, &content);
288 ret.readInt(); // compound size
290 return result;
291}
292
293
294double
295Vehicle::getWaitingTime(const std::string& vehID) {
297}
298
299
300double
301Vehicle::getAccumulatedWaitingTime(const std::string& vehID) {
303}
304
305
306double
307Vehicle::getAdaptedTraveltime(const std::string& vehID, double time, const std::string& edgeID) {
308 tcpip::Storage content;
309 StoHelp::writeCompound(content, 2);
310 StoHelp::writeTypedDouble(content, time);
311 StoHelp::writeTypedString(content, edgeID);
312 return Dom::getDouble(libsumo::VAR_EDGE_TRAVELTIME, vehID, &content);
313}
314
315
316double
317Vehicle::getEffort(const std::string& vehID, double time, const std::string& edgeID) {
318 tcpip::Storage content;
319 StoHelp::writeCompound(content, 2);
320 StoHelp::writeTypedDouble(content, time);
321 StoHelp::writeTypedString(content, edgeID);
322 return Dom::getDouble(libsumo::VAR_EDGE_EFFORT, vehID, &content);
323}
324
325
326bool
327Vehicle::isRouteValid(const std::string& vehID) {
328 return Dom::getInt(libsumo::VAR_ROUTE_VALID, vehID) != 0;
329}
330
331
332std::vector<std::string>
333Vehicle::getRoute(const std::string& vehID) {
335}
336
337
338int
339Vehicle::getSignals(const std::string& vehID) {
340 return Dom::getInt(libsumo::VAR_SIGNALS, vehID);
341}
342
343
344std::vector<libsumo::TraCIBestLanesData>
345Vehicle::getBestLanes(const std::string& vehID) {
346 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
347 std::vector<libsumo::TraCIBestLanesData> result;
349 ret.readInt();
350 StoHelp::readBestLanesVector(ret, result);
351 return result;
352}
353
354
355std::vector<libsumo::TraCINextTLSData>
356Vehicle::getNextTLS(const std::string& vehID) {
357 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
358 std::vector<libsumo::TraCINextTLSData> result;
360 ret.readInt(); // components
361 StoHelp::readTLSDataVector(ret, result);
362 return result;
363}
364
365std::vector<libsumo::TraCINextStopData>
366Vehicle::getNextStops(const std::string& vehID) {
367 return getStops(vehID, 0);
368}
369
370std::vector<libsumo::TraCIConnection>
371Vehicle::getNextLinks(const std::string& vehID) {
372 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
373 std::vector<libsumo::TraCIConnection> result;
375 ret.readInt(); // components
376 // number of items
377 const int linkNo = StoHelp::readTypedInt(ret);
378 for (int i = 0; i < linkNo; ++i) {
380 StoHelp::readConnection(ret, con);
381 result.emplace_back(con);
382 }
383 return result;
384}
385
386std::vector<libsumo::TraCINextStopData>
387Vehicle::getStops(const std::string& vehID, int limit) {
388 std::vector<libsumo::TraCINextStopData> result;
389 tcpip::Storage content;
390 StoHelp::writeTypedInt(content, limit);
391 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
392 tcpip::Storage& ret = Dom::get(libsumo::VAR_NEXT_STOPS2, vehID, &content);
393 ret.readInt(); // components
394 StoHelp::readStopVector(ret, result);
395 return result;
396}
397
398std::string
399Vehicle::getStopParameter(const std::string& vehID, int nextStopIndex, const std::string& param, bool customParam) {
400 tcpip::Storage content;
401 StoHelp::writeCompound(content, 3);
402 StoHelp::writeTypedInt(content, nextStopIndex);
403 StoHelp::writeTypedString(content, param);
404 StoHelp::writeTypedByte(content, customParam);
405 return Dom::getString(libsumo::VAR_STOP_PARAMETER, vehID, &content);
406}
407
408int
409Vehicle::getStopState(const std::string& vehID) {
410 return Dom::getInt(libsumo::VAR_STOPSTATE, vehID);
411}
412
413
414double
415Vehicle::getDistance(const std::string& vehID) {
417}
418
419
420double
421Vehicle::getDrivingDistance(const std::string& vehID, const std::string& edgeID, double pos, int laneIndex) {
422 tcpip::Storage content;
423 StoHelp::writeCompound(content, 2);
425 content.writeString(edgeID);
426 content.writeDouble(pos);
427 content.writeUnsignedByte(laneIndex);
429 return Dom::getDouble(libsumo::DISTANCE_REQUEST, vehID, &content);
430}
431
432
433double
434Vehicle::getDrivingDistance2D(const std::string& vehID, double x, double y) {
435 tcpip::Storage content;
436 StoHelp::writeCompound(content, 2);
438 content.writeDouble(x);
439 content.writeDouble(y);
441 return Dom::getDouble(libsumo::DISTANCE_REQUEST, vehID, &content);
442}
443
444
445double
446Vehicle::getReferenceDistance(const std::string& vehID) {
448}
449
450
451double
452Vehicle::getAllowedSpeed(const std::string& vehID) {
454}
455
456
457double
458Vehicle::getSpeedFactor(const std::string& vehID) {
460}
461
462
463int
464Vehicle::getSpeedMode(const std::string& vehID) {
466}
467
468
469int
470Vehicle::getLaneChangeMode(const std::string& vehID) {
472}
473
474
475int
476Vehicle::getRoutingMode(const std::string& vehID) {
478}
479
480
481std::string
482Vehicle::getLine(const std::string& vehID) {
483 return Dom::getString(libsumo::VAR_LINE, vehID);
484}
485
486
487
488std::vector<std::string>
489Vehicle::getVia(const std::string& vehID) {
491}
492
493
494std::pair<int, int>
495Vehicle::getLaneChangeState(const std::string& vehID, int direction) {
496 tcpip::Storage content;
497 StoHelp::writeTypedInt(content, direction);
498 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
499 tcpip::Storage& ret = Dom::get(libsumo::CMD_CHANGELANE, vehID, &content);
500 ret.readInt(); // components
501 const int stateWithoutTraCI = StoHelp::readTypedInt(ret);
502 const int state = StoHelp::readTypedInt(ret);
503 return std::make_pair(stateWithoutTraCI, state);
504}
505
506
507std::vector<std::pair<std::string, double> >
508Vehicle::getNeighbors(const std::string& vehID, const int mode) {
509 std::vector<std::pair<std::string, double> > neighs;
510 tcpip::Storage content;
512 content.writeUnsignedByte(mode);
513 std::unique_lock<std::mutex> lock{ libtraci::Connection::getActive().getMutex() };
514 tcpip::Storage& ret = Dom::get(libsumo::VAR_NEIGHBORS, vehID, &content);
515 const int items = ret.readInt(); // components
516 for (int i = 0; i < items; i++) {
517 const std::string neighID = ret.readString();
518 neighs.emplace_back(neighID, ret.readDouble());
519 }
520 return neighs;
521}
522
523
524double
525Vehicle::getFollowSpeed(const std::string& vehID, double speed, double gap, double leaderSpeed, double leaderMaxDecel, const std::string& leaderID) {
526 tcpip::Storage content;
527 StoHelp::writeCompound(content, 5);
528 StoHelp::writeTypedDouble(content, speed);
529 StoHelp::writeTypedDouble(content, gap);
530 StoHelp::writeTypedDouble(content, leaderSpeed);
531 StoHelp::writeTypedDouble(content, leaderMaxDecel);
532 StoHelp::writeTypedString(content, leaderID);
533 return Dom::getDouble(libsumo::VAR_FOLLOW_SPEED, vehID, &content);
534}
535
536
537double
538Vehicle::getSecureGap(const std::string& vehID, double speed, double leaderSpeed, double leaderMaxDecel, const std::string& leaderID) {
539 tcpip::Storage content;
540 StoHelp::writeCompound(content, 4);
541 StoHelp::writeTypedDouble(content, speed);
542 StoHelp::writeTypedDouble(content, leaderSpeed);
543 StoHelp::writeTypedDouble(content, leaderMaxDecel);
544 StoHelp::writeTypedString(content, leaderID);
545 return Dom::getDouble(libsumo::VAR_SECURE_GAP, vehID, &content);
546}
547
548
549double
550Vehicle::getStopSpeed(const std::string& vehID, const double speed, double gap) {
551 tcpip::Storage content;
552 StoHelp::writeCompound(content, 2);
553 StoHelp::writeTypedDouble(content, speed);
554 StoHelp::writeTypedDouble(content, gap);
555 return Dom::getDouble(libsumo::VAR_STOP_SPEED, vehID, &content);
556}
557
558double
559Vehicle::getStopDelay(const std::string& vehID) {
561}
562
563double
564Vehicle::getStopArrivalDelay(const std::string& vehID) {
566}
567
568double
569Vehicle::getTimeLoss(const std::string& vehID) {
571}
572
573std::vector<std::string>
574Vehicle::getTaxiFleet(int taxiState) {
575 tcpip::Storage content;
576 StoHelp::writeTypedInt(content, taxiState);
577 return Dom::getStringVector(libsumo::VAR_TAXI_FLEET, "", &content);
578}
579
580std::vector<std::string>
581Vehicle::getLoadedIDList() {
583}
584
585std::vector<std::string>
586Vehicle::getTeleportingIDList() {
588}
589
590std::string
591Vehicle::getEmissionClass(const std::string& vehID) {
593}
594
595std::string
596Vehicle::getShapeClass(const std::string& vehID) {
598}
599
600
601double
602Vehicle::getLength(const std::string& vehID) {
603 return Dom::getDouble(libsumo::VAR_LENGTH, vehID);
604}
605
606
607double
608Vehicle::getAccel(const std::string& vehID) {
609 return Dom::getDouble(libsumo::VAR_ACCEL, vehID);
610}
611
612
613double
614Vehicle::getDecel(const std::string& vehID) {
615 return Dom::getDouble(libsumo::VAR_DECEL, vehID);
616}
617
618
619double Vehicle::getEmergencyDecel(const std::string& vehID) {
621}
622
623
624double Vehicle::getApparentDecel(const std::string& vehID) {
626}
627
628
629double Vehicle::getActionStepLength(const std::string& vehID) {
631}
632
633
634double Vehicle::getLastActionTime(const std::string& vehID) {
636}
637
638
639double
640Vehicle::getTau(const std::string& vehID) {
641 return Dom::getDouble(libsumo::VAR_TAU, vehID);
642}
643
644
645double
646Vehicle::getImperfection(const std::string& vehID) {
648}
649
650
651double
652Vehicle::getSpeedDeviation(const std::string& vehID) {
654}
655
656
657std::string
658Vehicle::getVehicleClass(const std::string& vehID) {
660}
661
662
663double
664Vehicle::getMinGap(const std::string& vehID) {
665 return Dom::getDouble(libsumo::VAR_MINGAP, vehID);
666}
667
668
669double
670Vehicle::getMinGapLat(const std::string& vehID) {
672}
673
674
675double
676Vehicle::getMaxSpeed(const std::string& vehID) {
678}
679
680
681double
682Vehicle::getMaxSpeedLat(const std::string& vehID) {
684}
685
686
687std::string
688Vehicle::getLateralAlignment(const std::string& vehID) {
690}
691
692
693double
694Vehicle::getWidth(const std::string& vehID) {
695 return Dom::getDouble(libsumo::VAR_WIDTH, vehID);
696}
697
698
699double
700Vehicle::getHeight(const std::string& vehID) {
701 return Dom::getDouble(libsumo::VAR_HEIGHT, vehID);
702}
703
704
705double
706Vehicle::getMass(const std::string& vehID) {
707 return Dom::getDouble(libsumo::VAR_MASS, vehID);
708}
709
710
711void
712Vehicle::setStop(const std::string& vehID,
713 const std::string& edgeID,
714 double pos,
715 int laneIndex,
716 double duration,
717 int flags,
718 double startPos,
719 double until) {
720 tcpip::Storage content;
721 StoHelp::writeCompound(content, 7);
722 StoHelp::writeTypedString(content, edgeID);
723 StoHelp::writeTypedDouble(content, pos);
724 StoHelp::writeTypedByte(content, laneIndex);
725 StoHelp::writeTypedDouble(content, duration);
726 StoHelp::writeTypedByte(content, flags);
727 StoHelp::writeTypedDouble(content, startPos);
728 StoHelp::writeTypedDouble(content, until);
729 Dom::set(libsumo::CMD_STOP, vehID, &content);
730}
731
732
733void
734Vehicle::replaceStop(const std::string& vehID,
735 int nextStopIndex,
736 const std::string& edgeID,
737 double pos,
738 int laneIndex,
739 double duration,
740 int flags,
741 double startPos,
742 double until,
743 int teleport) {
744 tcpip::Storage content;
745 StoHelp::writeCompound(content, 9);
746 StoHelp::writeTypedString(content, edgeID);
747 StoHelp::writeTypedDouble(content, pos);
748 StoHelp::writeTypedByte(content, laneIndex);
749 StoHelp::writeTypedDouble(content, duration);
750 StoHelp::writeTypedInt(content, flags);
751 StoHelp::writeTypedDouble(content, startPos);
752 StoHelp::writeTypedDouble(content, until);
753 StoHelp::writeTypedInt(content, nextStopIndex);
754 StoHelp::writeTypedByte(content, teleport);
755 Dom::set(libsumo::CMD_REPLACE_STOP, vehID, &content);
756}
757
758
759void
760Vehicle::insertStop(const std::string& vehID,
761 int nextStopIndex,
762 const std::string& edgeID,
763 double pos,
764 int laneIndex,
765 double duration,
766 int flags,
767 double startPos,
768 double until,
769 int teleport) {
770 tcpip::Storage content;
771 StoHelp::writeCompound(content, 9);
772 StoHelp::writeTypedString(content, edgeID);
773 StoHelp::writeTypedDouble(content, pos);
774 StoHelp::writeTypedByte(content, laneIndex);
775 StoHelp::writeTypedDouble(content, duration);
776 StoHelp::writeTypedInt(content, flags);
777 StoHelp::writeTypedDouble(content, startPos);
778 StoHelp::writeTypedDouble(content, until);
779 StoHelp::writeTypedInt(content, nextStopIndex);
780 StoHelp::writeTypedByte(content, teleport);
781 Dom::set(libsumo::CMD_INSERT_STOP, vehID, &content);
782}
783
784
785void
786Vehicle::setStopParameter(const std::string& vehID, int nextStopIndex,
787 const std::string& param, const std::string& value,
788 bool customParam) {
789 tcpip::Storage content;
790 StoHelp::writeCompound(content, 4);
791 StoHelp::writeTypedInt(content, nextStopIndex);
792 StoHelp::writeTypedString(content, param);
793 StoHelp::writeTypedString(content, value);
794 StoHelp::writeTypedByte(content, customParam);
795 Dom::set(libsumo::VAR_STOP_PARAMETER, vehID, &content);
796}
797
798
799void
800Vehicle::rerouteParkingArea(const std::string& vehID, const std::string& parkingAreaID) {
801 tcpip::Storage content;
802 StoHelp::writeCompound(content, 1);
803 StoHelp::writeTypedString(content, parkingAreaID);
805}
806
807
808void
809Vehicle::resume(const std::string& vehID) {
810 tcpip::Storage content;
811 StoHelp::writeCompound(content, 0);
812 Dom::set(libsumo::CMD_RESUME, vehID, &content);
813}
814
815
816void
817Vehicle::changeTarget(const std::string& vehID, const std::string& edgeID) {
819}
820
821
822void
823Vehicle::changeLane(const std::string& vehID, int laneIndex, double duration) {
824 tcpip::Storage content;
825 StoHelp::writeCompound(content, 2);
826 StoHelp::writeTypedByte(content, laneIndex);
827 StoHelp::writeTypedDouble(content, duration);
828 Dom::set(libsumo::CMD_CHANGELANE, vehID, &content);
829}
830
831void
832Vehicle::changeLaneRelative(const std::string& vehID, int indexOffset, double duration) {
833 tcpip::Storage content;
834 StoHelp::writeCompound(content, 3);
835 StoHelp::writeTypedByte(content, indexOffset);
836 StoHelp::writeTypedDouble(content, duration);
837 StoHelp::writeTypedByte(content, 1);
838 Dom::set(libsumo::CMD_CHANGELANE, vehID, &content);
839}
840
841
842void
843Vehicle::changeSublane(const std::string& vehID, double latDist) {
845}
846
847
848void
849Vehicle::add(const std::string& vehID,
850 const std::string& routeID,
851 const std::string& typeID,
852 const std::string& depart,
853 const std::string& departLane,
854 const std::string& departPos,
855 const std::string& departSpeed,
856 const std::string& arrivalLane,
857 const std::string& arrivalPos,
858 const std::string& arrivalSpeed,
859 const std::string& fromTaz,
860 const std::string& toTaz,
861 const std::string& line,
862 int personCapacity,
863 int personNumber,
864 const std::string& departPosLat,
865 const std::string& arrivalPosLat,
866 double speedFactor,
867 const std::string& insertionChecks) {
868 tcpip::Storage content;
869 const bool withOptional = !departPosLat.empty() || !arrivalPosLat.empty()
870 || speedFactor != -1. || !insertionChecks.empty();
871 StoHelp::writeCompound(content, withOptional ? 18 : 14);
872 StoHelp::writeTypedString(content, routeID);
873 StoHelp::writeTypedString(content, typeID);
874 StoHelp::writeTypedString(content, depart);
875 StoHelp::writeTypedString(content, departLane);
876 StoHelp::writeTypedString(content, departPos);
877 StoHelp::writeTypedString(content, departSpeed);
878
879 StoHelp::writeTypedString(content, arrivalLane);
880 StoHelp::writeTypedString(content, arrivalPos);
881 StoHelp::writeTypedString(content, arrivalSpeed);
882
883 StoHelp::writeTypedString(content, fromTaz);
884 StoHelp::writeTypedString(content, toTaz);
885 StoHelp::writeTypedString(content, line);
886
887 StoHelp::writeTypedInt(content, personCapacity);
888 StoHelp::writeTypedInt(content, personNumber);
889
890 if (withOptional) {
891 StoHelp::writeTypedString(content, departPosLat);
892 StoHelp::writeTypedString(content, arrivalPosLat);
893 StoHelp::writeTypedDouble(content, speedFactor);
894 StoHelp::writeTypedString(content, insertionChecks);
895 }
896
897 Dom::set(libsumo::ADD_FULL, vehID, &content);
898}
899
900
901void
902Vehicle::moveToXY(const std::string& vehID, const std::string& edgeID, const int laneIndex,
903 const double x, const double y, double angle, const int keepRoute, double matchThreshold) {
904 tcpip::Storage content;
905 StoHelp::writeCompound(content, 7);
906 StoHelp::writeTypedString(content, edgeID);
907 StoHelp::writeTypedInt(content, laneIndex);
908 StoHelp::writeTypedDouble(content, x);
909 StoHelp::writeTypedDouble(content, y);
910 StoHelp::writeTypedDouble(content, angle);
911 StoHelp::writeTypedByte(content, keepRoute);
912 StoHelp::writeTypedDouble(content, matchThreshold);
913 Dom::set(libsumo::MOVE_TO_XY, vehID, &content);
914}
915
916void
917Vehicle::slowDown(const std::string& vehID, double speed, double duration) {
918 tcpip::Storage content;
919 StoHelp::writeCompound(content, 2);
920 StoHelp::writeTypedDouble(content, speed);
921 StoHelp::writeTypedDouble(content, duration);
922 Dom::set(libsumo::CMD_SLOWDOWN, vehID, &content);
923}
924
925void
926Vehicle::openGap(const std::string& vehID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel, const std::string& referenceVehID) {
927 tcpip::Storage content;
928 StoHelp::writeCompound(content, referenceVehID != "" ? 6 : 5);
929 StoHelp::writeTypedDouble(content, newTimeHeadway);
930 StoHelp::writeTypedDouble(content, newSpaceHeadway);
931 StoHelp::writeTypedDouble(content, duration);
932 StoHelp::writeTypedDouble(content, changeRate);
933 StoHelp::writeTypedDouble(content, maxDecel);
934 if (referenceVehID != "") {
935 StoHelp::writeTypedString(content, referenceVehID);
936 }
937 Dom::set(libsumo::CMD_OPENGAP, vehID, &content);
938}
939
940void
941Vehicle::deactivateGapControl(const std::string& vehID) {
942 openGap(vehID, -1, -1, -1, -1);
943}
944
945void
946Vehicle::requestToC(const std::string& vehID, double leadTime) {
947 std::ostringstream oss;
948 oss.setf(std::ios::fixed, std::ios::floatfield);
949 oss << std::setprecision(2);
950 oss << leadTime;
951 setParameter(vehID, "device.toc.requestToC", oss.str());
952}
953
954void
955Vehicle::setSpeed(const std::string& vehID, double speed) {
956 Dom::setDouble(libsumo::VAR_SPEED, vehID, speed);
957}
958
959void
960Vehicle::setAcceleration(const std::string& vehID, double acceleration, double duration) {
961 tcpip::Storage content;
962 StoHelp::writeCompound(content, 2);
963 StoHelp::writeTypedDouble(content, acceleration);
964 StoHelp::writeTypedDouble(content, duration);
965 Dom::set(libsumo::VAR_ACCELERATION, vehID, &content);
966}
967
968void
969Vehicle::setPreviousSpeed(const std::string& vehID, double prevSpeed, double prevAcceleration) {
970 tcpip::Storage content;
971 StoHelp::writeCompound(content, 2);
972 StoHelp::writeTypedDouble(content, prevSpeed);
973 StoHelp::writeTypedDouble(content, prevAcceleration);
974 Dom::set(libsumo::VAR_PREV_SPEED, vehID, &content);
975}
976
977void
978Vehicle::setSpeedMode(const std::string& vehID, int speedMode) {
979 Dom::setInt(libsumo::VAR_SPEEDSETMODE, vehID, speedMode);
980}
981
982void
983Vehicle::setLaneChangeMode(const std::string& vehID, int laneChangeMode) {
984 Dom::setInt(libsumo::VAR_LANECHANGE_MODE, vehID, laneChangeMode);
985}
986
987void
988Vehicle::setRoutingMode(const std::string& vehID, int routingMode) {
989 Dom::setInt(libsumo::VAR_ROUTING_MODE, vehID, routingMode);
990}
991
992void
993Vehicle::setType(const std::string& vehID, const std::string& typeID) {
994 Dom::setString(libsumo::VAR_TYPE, vehID, typeID);
995}
996
997void
998Vehicle::setRouteID(const std::string& vehID, const std::string& routeID) {
999 Dom::setString(libsumo::VAR_ROUTE_ID, vehID, routeID);
1000}
1001
1002void
1003Vehicle::setRoute(const std::string& vehID, const std::string& edgeID) {
1004 setRoute(vehID, std::vector<std::string>({edgeID}));
1005}
1006
1007void
1008Vehicle::setRoute(const std::string& vehID, const std::vector<std::string>& edgeIDs) {
1010}
1011
1012void
1013Vehicle::setLateralLanePosition(const std::string& vehID, double posLat) {
1015}
1016
1017void
1018Vehicle::updateBestLanes(const std::string& vehID) {
1019 tcpip::Storage content;
1020 Dom::set(libsumo::VAR_UPDATE_BESTLANES, vehID, &content);
1021}
1022
1023
1024void
1025Vehicle::setAdaptedTraveltime(const std::string& vehID, const std::string& edgeID,
1026 double time, double begSeconds, double endSeconds) {
1027 tcpip::Storage content;
1028 if (time == libsumo::INVALID_DOUBLE_VALUE) {
1029 // reset
1030 StoHelp::writeCompound(content, 1);
1031 StoHelp::writeTypedString(content, edgeID);
1032 } else if (begSeconds == libsumo::INVALID_DOUBLE_VALUE) {
1033 // set value for the whole simulation
1034 StoHelp::writeCompound(content, 2);
1035 StoHelp::writeTypedString(content, edgeID);
1036 StoHelp::writeTypedDouble(content, time);
1037 } else {
1038 StoHelp::writeCompound(content, 4);
1039 StoHelp::writeTypedDouble(content, begSeconds);
1040 StoHelp::writeTypedDouble(content, endSeconds);
1041 StoHelp::writeTypedString(content, edgeID);
1042 StoHelp::writeTypedDouble(content, time);
1043 }
1044 Dom::set(libsumo::VAR_EDGE_TRAVELTIME, vehID, &content);
1045}
1046
1047
1048void
1049Vehicle::setEffort(const std::string& vehID, const std::string& edgeID,
1050 double effort, double begSeconds, double endSeconds) {
1051 tcpip::Storage content;
1052 if (effort == libsumo::INVALID_DOUBLE_VALUE) {
1053 // reset
1054 StoHelp::writeCompound(content, 1);
1055 StoHelp::writeTypedString(content, edgeID);
1056 } else if (begSeconds == libsumo::INVALID_DOUBLE_VALUE) {
1057 // set value for the whole simulation
1058 StoHelp::writeCompound(content, 2);
1059 StoHelp::writeTypedString(content, edgeID);
1060 StoHelp::writeTypedDouble(content, effort);
1061 } else {
1062 StoHelp::writeCompound(content, 4);
1063 StoHelp::writeTypedDouble(content, begSeconds);
1064 StoHelp::writeTypedDouble(content, endSeconds);
1065 StoHelp::writeTypedString(content, edgeID);
1066 StoHelp::writeTypedDouble(content, effort);
1067 }
1068 Dom::set(libsumo::VAR_EDGE_EFFORT, vehID, &content);
1069}
1070
1071
1072void
1073Vehicle::rerouteTraveltime(const std::string& vehID, const bool /* currentTravelTimes */) {
1074 tcpip::Storage content;
1075 StoHelp::writeCompound(content, 0);
1076 Dom::set(libsumo::CMD_REROUTE_TRAVELTIME, vehID, &content);
1077}
1078
1079
1080void
1081Vehicle::rerouteEffort(const std::string& vehID) {
1082 tcpip::Storage content;
1083 StoHelp::writeCompound(content, 0);
1084 Dom::set(libsumo::CMD_REROUTE_EFFORT, vehID, &content);
1085}
1086
1087
1088void
1089Vehicle::setSignals(const std::string& vehID, int signals) {
1090 Dom::setInt(libsumo::VAR_SIGNALS, vehID, signals);
1091}
1092
1093
1094void
1095Vehicle::moveTo(const std::string& vehID, const std::string& laneID, double pos, int reason) {
1096 tcpip::Storage content;
1097 StoHelp::writeCompound(content, 3);
1098 StoHelp::writeTypedString(content, laneID);
1099 StoHelp::writeTypedDouble(content, pos);
1100 StoHelp::writeTypedInt(content, reason);
1101 Dom::set(libsumo::VAR_MOVE_TO, vehID, &content);
1102}
1103
1104
1105void
1106Vehicle::setActionStepLength(const std::string& vehID, double actionStepLength, bool resetActionOffset) {
1107 //if (actionStepLength < 0) {
1108 // raise TraCIException("Invalid value for actionStepLength. Given value must be non-negative.")
1109 //{
1110 // Use negative value to indicate resetActionOffset == False
1111 if (!resetActionOffset) {
1112 actionStepLength *= -1;
1113 }
1114 Dom::setDouble(libsumo::VAR_ACTIONSTEPLENGTH, vehID, actionStepLength);
1115}
1116
1117
1118void
1119Vehicle::remove(const std::string& vehID, char reason) {
1120 tcpip::Storage content;
1122 content.writeUnsignedByte(reason);
1123 Dom::set(libsumo::REMOVE, vehID, &content);
1124}
1125
1126
1127void
1128Vehicle::setColor(const std::string& vehID, const libsumo::TraCIColor& color) {
1129 Dom::setCol(libsumo::VAR_COLOR, vehID, color);
1130}
1131
1132
1133void
1134Vehicle::setSpeedFactor(const std::string& vehID, double factor) {
1136}
1137
1138
1139void
1140Vehicle::setLine(const std::string& vehID, const std::string& line) {
1141 Dom::setString(libsumo::VAR_LINE, vehID, line);
1142}
1143
1144
1145void
1146Vehicle::setVia(const std::string& vehID, const std::vector<std::string>& edgeList) {
1147 Dom::setStringVector(libsumo::VAR_VIA, vehID, edgeList);
1148}
1149
1150
1151void
1152Vehicle::setLength(const std::string& vehID, double length) {
1153 Dom::setDouble(libsumo::VAR_LENGTH, vehID, length);
1154}
1155
1156
1157void
1158Vehicle::setMaxSpeed(const std::string& vehID, double speed) {
1160}
1161
1162
1163void
1164Vehicle::setVehicleClass(const std::string& vehID, const std::string& clazz) {
1166}
1167
1168
1169void
1170Vehicle::setShapeClass(const std::string& vehID, const std::string& clazz) {
1172}
1173
1174
1175void
1176Vehicle::setEmissionClass(const std::string& vehID, const std::string& clazz) {
1178}
1179
1180
1181void
1182Vehicle::setWidth(const std::string& vehID, double width) {
1183 Dom::setDouble(libsumo::VAR_WIDTH, vehID, width);
1184}
1185
1186
1187void
1188Vehicle::setHeight(const std::string& vehID, double height) {
1189 Dom::setDouble(libsumo::VAR_HEIGHT, vehID, height);
1190}
1191
1192
1193void
1194Vehicle::setMass(const std::string& vehID, double mass) {
1195 Dom::setDouble(libsumo::VAR_MASS, vehID, mass);
1196}
1197
1198
1199void
1200Vehicle::setMinGap(const std::string& vehID, double minGap) {
1201 Dom::setDouble(libsumo::VAR_MINGAP, vehID, minGap);
1202}
1203
1204
1205void
1206Vehicle::setAccel(const std::string& vehID, double accel) {
1207 Dom::setDouble(libsumo::VAR_ACCEL, vehID, accel);
1208}
1209
1210
1211void
1212Vehicle::setDecel(const std::string& vehID, double decel) {
1213 Dom::setDouble(libsumo::VAR_DECEL, vehID, decel);
1214}
1215
1216
1217void
1218Vehicle::setEmergencyDecel(const std::string& vehID, double decel) {
1220}
1221
1222
1223void
1224Vehicle::setApparentDecel(const std::string& vehID, double decel) {
1226}
1227
1228
1229void
1230Vehicle::setImperfection(const std::string& vehID, double imperfection) {
1231 Dom::setDouble(libsumo::VAR_IMPERFECTION, vehID, imperfection);
1232}
1233
1234
1235void
1236Vehicle::setTau(const std::string& vehID, double tau) {
1237 Dom::setDouble(libsumo::VAR_TAU, vehID, tau);
1238}
1239
1240
1241void
1242Vehicle::setMinGapLat(const std::string& vehID, double minGapLat) {
1243 Dom::setDouble(libsumo::VAR_MINGAP_LAT, vehID, minGapLat);
1244}
1245
1246
1247void
1248Vehicle::setMaxSpeedLat(const std::string& vehID, double speed) {
1250}
1251
1252
1253void
1254Vehicle::setLateralAlignment(const std::string& vehID, const std::string& latAlignment) {
1255 Dom::setString(libsumo::VAR_LATALIGNMENT, vehID, latAlignment);
1256}
1257
1258
1259void
1260Vehicle::setImpatience(const std::string& vehID, double impatience) {
1261 Dom::setDouble(libsumo::VAR_IMPATIENCE, vehID, impatience);
1262}
1263
1264void
1265Vehicle::setBoardingDuration(const std::string& vehID, double boardingDuration) {
1266 Dom::setDouble(libsumo::VAR_BOARDING_DURATION, vehID, boardingDuration);
1267}
1268
1269
1270void
1271Vehicle::highlight(const std::string& vehID, const libsumo::TraCIColor& col, double size, const int alphaMax, const double duration, const int type) {
1272 tcpip::Storage content;
1273 StoHelp::writeCompound(content, alphaMax > 0 ? 5 : 2);
1275 content.writeUnsignedByte(col.r);
1276 content.writeUnsignedByte(col.g);
1277 content.writeUnsignedByte(col.b);
1278 content.writeUnsignedByte(col.a);
1279 StoHelp::writeTypedDouble(content, size);
1280 if (alphaMax > 0) {
1282 content.writeUnsignedByte(alphaMax);
1283 StoHelp::writeTypedDouble(content, duration);
1285 content.writeUnsignedByte(type);
1286 }
1287 Dom::set(libsumo::VAR_HIGHLIGHT, vehID, &content);
1288}
1289
1290void
1291Vehicle::dispatchTaxi(const std::string& vehID, const std::vector<std::string>& reservations) {
1293}
1294
1295
1296void
1297Vehicle::subscribeLeader(const std::string& vehID, double dist, double begin, double end) {
1298 subscribe(vehID, std::vector<int>({ libsumo::VAR_LEADER }), begin, end,
1299 libsumo::TraCIResults({ {libsumo::VAR_LEADER, std::make_shared<libsumo::TraCIDouble>(dist)} }));
1300}
1301
1302
1303void
1304Vehicle::addSubscriptionFilterLanes(const std::vector<int>& lanes, bool noOpposite, double downstreamDist, double upstreamDist) {
1305 tcpip::Storage content;
1306 content.writeUnsignedByte((int)lanes.size());
1307 for (int lane : lanes) {
1308 content.writeUnsignedByte(lane < 0 ? lane + 256 : lane);
1309 }
1311 if (noOpposite) {
1312 addSubscriptionFilterNoOpposite();
1313 }
1314 if (downstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1315 addSubscriptionFilterDownstreamDistance(downstreamDist);
1316 }
1317 if (upstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1318 addSubscriptionFilterUpstreamDistance(upstreamDist);
1319 }
1320}
1321
1322
1323void
1324Vehicle::addSubscriptionFilterNoOpposite() {
1326}
1327
1328
1329void
1330Vehicle::addSubscriptionFilterDownstreamDistance(double dist) {
1331 tcpip::Storage content;
1332 StoHelp::writeTypedDouble(content, dist);
1334}
1335
1336
1337void
1338Vehicle::addSubscriptionFilterUpstreamDistance(double dist) {
1339 tcpip::Storage content;
1340 StoHelp::writeTypedDouble(content, dist);
1342}
1343
1344
1345void
1346Vehicle::addSubscriptionFilterCFManeuver(double downstreamDist, double upstreamDist) {
1347 addSubscriptionFilterLeadFollow(std::vector<int>(1));
1348 if (downstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1349 addSubscriptionFilterDownstreamDistance(downstreamDist);
1350 }
1351 if (upstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1352 addSubscriptionFilterUpstreamDistance(upstreamDist);
1353 }
1354}
1355
1356
1357void
1358Vehicle::addSubscriptionFilterLCManeuver(int direction, bool noOpposite, double downstreamDist, double upstreamDist) {
1359 if (direction == libsumo::INVALID_INT_VALUE) {
1360 addSubscriptionFilterLeadFollow({ -1, 0, 1 });
1361 } else if (direction != -1 && direction != 1) {
1362 // warnings.warn("Ignoring lane change subscription filter with non-neighboring lane offset direction=%s." % direction)
1363 return;
1364 } else {
1365 addSubscriptionFilterLeadFollow({ 0, direction });
1366 }
1367 if (noOpposite) {
1368 addSubscriptionFilterNoOpposite();
1369 }
1370 if (downstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1371 addSubscriptionFilterDownstreamDistance(downstreamDist);
1372 }
1373 if (upstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1374 addSubscriptionFilterUpstreamDistance(upstreamDist);
1375 }
1376}
1377
1378
1379void
1380Vehicle::addSubscriptionFilterLeadFollow(const std::vector<int>& lanes) {
1382 addSubscriptionFilterLanes(lanes);
1383}
1384
1385
1386void
1387Vehicle::addSubscriptionFilterTurn(double downstreamDist, double foeDistToJunction) {
1388 tcpip::Storage content;
1389 StoHelp::writeTypedDouble(content, foeDistToJunction);
1391 if (downstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1392 addSubscriptionFilterDownstreamDistance(downstreamDist);
1393 }
1394}
1395
1396
1397void
1398Vehicle::addSubscriptionFilterVClass(const std::vector<std::string>& vClasses) {
1399 tcpip::Storage content;
1400 StoHelp::writeTypedStringList(content, vClasses);
1402}
1403
1404
1405void
1406Vehicle::addSubscriptionFilterVType(const std::vector<std::string>& vTypes) {
1407 tcpip::Storage content;
1408 StoHelp::writeTypedStringList(content, vTypes);
1410}
1411
1412
1413void
1414Vehicle::addSubscriptionFilterFieldOfVision(double openingAngle) {
1415 tcpip::Storage content;
1416 StoHelp::writeTypedDouble(content, openingAngle);
1418}
1419
1420
1421void
1422Vehicle::addSubscriptionFilterLateralDistance(double lateralDist, double downstreamDist, double upstreamDist) {
1423 tcpip::Storage content;
1424 StoHelp::writeTypedDouble(content, lateralDist);
1426 if (downstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1427 addSubscriptionFilterDownstreamDistance(downstreamDist);
1428 }
1429 if (upstreamDist != libsumo::INVALID_DOUBLE_VALUE) {
1430 addSubscriptionFilterUpstreamDistance(upstreamDist);
1431 }
1432}
1433
1434
1435}
1436
1437
1438/****************************************************************************/
#define LIBTRACI_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOMAIN)
Definition Domain.h:38
#define LIBTRACI_PARAMETER_IMPLEMENTATION(CLASS, DOMAIN)
Definition Domain.h:77
C++ TraCI client API implementation.
static void readJunctionFoeVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCIJunctionFoe > &result, const std::string &error="")
static void writeTypedDouble(tcpip::Storage &content, double value)
static void readConnection(tcpip::Storage &inputStorage, libsumo::TraCIConnection &connection, const std::string &error="")
static void readStopVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCINextStopData > &result, const std::string &error="")
static int readTypedInt(tcpip::Storage &ret, const std::string &error="")
static void writeCompound(tcpip::Storage &content, int size)
static void readBestLanesVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCIBestLanesData > &result, const std::string &error="")
static std::string readTypedString(tcpip::Storage &ret, const std::string &error="")
static void writeTypedInt(tcpip::Storage &content, int value)
static void writeTypedStringList(tcpip::Storage &content, const std::vector< std::string > &value)
static void writeTypedByte(tcpip::Storage &content, int value)
static void writeTypedString(tcpip::Storage &content, const std::string &value)
static void readTLSDataVector(tcpip::Storage &inputStorage, std::vector< libsumo::TraCINextTLSData > &result, const std::string &error="")
static double readTypedDouble(tcpip::Storage &ret, const std::string &error="")
static Connection & getActive()
Definition Connection.h:57
void addFilter(int var, tcpip::Storage *add=nullptr)
std::mutex & getMutex() const
Definition Connection.h:76
static void setDouble(int var, const std::string &id, double value)
Definition Domain.h:221
static libsumo::TraCIPosition getPos(int var, const std::string &id, tcpip::Storage *add=nullptr, const bool isGeo=false)
Definition Domain.h:143
static void setCol(int var, const std::string &id, const libsumo::TraCIColor value)
Definition Domain.h:242
static std::vector< std::string > getStringVector(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition Domain.h:167
static void setStringVector(int var, const std::string &id, const std::vector< std::string > &value)
Definition Domain.h:235
static libsumo::TraCIColor getCol(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition Domain.h:177
static std::string getString(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition Domain.h:162
static int getInt(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition Domain.h:125
static void set(int var, const std::string &id, tcpip::Storage *add)
Definition Domain.h:209
static libsumo::TraCIPosition getPos3D(int var, const std::string &id, tcpip::Storage *add=nullptr, const bool isGeo=false)
Definition Domain.h:152
static double getDouble(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition Domain.h:130
static void setInt(int var, const std::string &id, int value)
Definition Domain.h:214
static void setString(int var, const std::string &id, const std::string &value)
Definition Domain.h:228
static tcpip::Storage & get(int var, const std::string &id, tcpip::Storage *add=nullptr, int expectedType=libsumo::TYPE_COMPOUND)
Definition Domain.h:111
virtual std::string readString()
Definition storage.cpp:180
virtual void writeString(const std::string &s)
Definition storage.cpp:197
virtual void writeDouble(double)
Definition storage.cpp:354
virtual int readUnsignedByte()
Definition storage.cpp:155
virtual void writeUnsignedByte(int)
Definition storage.cpp:165
virtual double readDouble()
Definition storage.cpp:362
virtual int readInt()
Definition storage.cpp:311
TRACI_CONST double INVALID_DOUBLE_VALUE
TRACI_CONST int VAR_LASTACTIONTIME
TRACI_CONST int TYPE_COLOR
TRACI_CONST int FILTER_TYPE_DOWNSTREAM_DIST
TRACI_CONST int VAR_EDGES
TRACI_CONST int POSITION_ROADMAP
TRACI_CONST int VAR_NOXEMISSION
TRACI_CONST int VAR_LANECHANGE_MODE
TRACI_CONST int VAR_REFERENCE_DISTANCE
TRACI_CONST int LAST_STEP_PERSON_ID_LIST
TRACI_CONST int FILTER_TYPE_NOOPPOSITE
TRACI_CONST int VAR_VEHICLECLASS
TRACI_CONST int TRACI_ID_LIST
TRACI_CONST int VAR_IMPATIENCE
TRACI_CONST int VAR_LATALIGNMENT
TRACI_CONST int VAR_SEGMENT_ID
TRACI_CONST int VAR_TYPE
TRACI_CONST int CMD_CHANGESUBLANE
TRACI_CONST int VAR_DEPARTURE
TRACI_CONST int VAR_ROUTING_MODE
TRACI_CONST int VAR_MINGAP
TRACI_CONST int CMD_TAXI_DISPATCH
TRACI_CONST int VAR_SECURE_GAP
TRACI_CONST int VAR_SHAPECLASS
TRACI_CONST int VAR_WAITING_TIME
TRACI_CONST int CMD_STOP
TRACI_CONST int VAR_LINE
TRACI_CONST int VAR_EDGE_TRAVELTIME
TRACI_CONST int VAR_ROAD_ID
TRACI_CONST int VAR_TIMELOSS
TRACI_CONST int CMD_RESUME
TRACI_CONST int VAR_ACTIONSTEPLENGTH
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 FILTER_TYPE_FIELD_OF_VISION
TRACI_CONST int VAR_ANGLE
TRACI_CONST int VAR_TAU
TRACI_CONST int VAR_NEXT_TLS
TRACI_CONST int VAR_EDGE_EFFORT
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_HIGHLIGHT
TRACI_CONST int VAR_BOARDING_DURATION
TRACI_CONST int TYPE_UBYTE
TRACI_CONST int VAR_MOVE_TO
TRACI_CONST int VAR_PERSON_NUMBER
TRACI_CONST int VAR_COEMISSION
TRACI_CONST int VAR_UPDATE_BESTLANES
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_STOP_PARAMETER
TRACI_CONST int POSITION_2D
TRACI_CONST int VAR_MAXSPEED
TRACI_CONST int VAR_LEADER
TRACI_CONST int CMD_CHANGETARGET
TRACI_CONST int ADD_FULL
TRACI_CONST int VAR_CO2EMISSION
TRACI_CONST int CMD_REROUTE_TO_PARKING
TRACI_CONST int FILTER_TYPE_VTYPE
TRACI_CONST int VAR_TELEPORTING_LIST
TRACI_CONST int CMD_REROUTE_TRAVELTIME
TRACI_CONST int VAR_TAXI_FLEET
TRACI_CONST int VAR_PREV_SPEED
TRACI_CONST int VAR_ROUTE_VALID
TRACI_CONST int VAR_SPEEDSETMODE
TRACI_CONST int CMD_REPLACE_STOP
TRACI_CONST int VAR_MASS
TRACI_CONST int VAR_FUELCONSUMPTION
TRACI_CONST int VAR_SLOPE
TRACI_CONST int VAR_LENGTH
TRACI_CONST int VAR_MAXSPEED_LAT
TRACI_CONST int CMD_REROUTE_EFFORT
TRACI_CONST int VAR_HCEMISSION
TRACI_CONST int ID_COUNT
TRACI_CONST int VAR_LANEPOSITION
TRACI_CONST int REMOVE
TRACI_CONST int VAR_LANE_ID
TRACI_CONST int CMD_INSERT_STOP
TRACI_CONST int VAR_STOP_SPEED
TRACI_CONST int VAR_IMPERFECTION
TRACI_CONST int VAR_HEIGHT
TRACI_CONST int VAR_APPARENT_DECEL
TRACI_CONST int VAR_NOISEEMISSION
TRACI_CONST int FILTER_TYPE_LEAD_FOLLOW
TRACI_CONST int VAR_ARRIVALPOS
TRACI_CONST int REQUEST_DRIVINGDIST
TRACI_CONST int VAR_POSITION3D
TRACI_CONST int VAR_SPEED
TRACI_CONST int VAR_DECEL
TRACI_CONST int VAR_SIGNALS
TRACI_CONST int FILTER_TYPE_UPSTREAM_DIST
TRACI_CONST int VAR_ACCUMULATED_WAITING_TIME
TRACI_CONST int VAR_MINGAP_LAT
TRACI_CONST int INVALID_INT_VALUE
TRACI_CONST int VAR_NEXT_LINKS
TRACI_CONST int VAR_ROUTE_INDEX
TRACI_CONST int VAR_NEXT_STOPS2
TRACI_CONST int CMD_SLOWDOWN
TRACI_CONST int FILTER_TYPE_TURN
TRACI_CONST int VAR_ACCELERATION
TRACI_CONST int VAR_ROUTE_ID
TRACI_CONST int DISTANCE_REQUEST
TRACI_CONST int TYPE_BYTE
TRACI_CONST int VAR_SEGMENT_INDEX
TRACI_CONST int CMD_OPENGAP
TRACI_CONST int VAR_LANEPOSITION_LAT
TRACI_CONST int FILTER_TYPE_VCLASS
TRACI_CONST int CMD_CHANGELANE
TRACI_CONST int VAR_STOP_DELAY
TRACI_CONST int VAR_NEIGHBORS
TRACI_CONST int VAR_EMERGENCY_DECEL
TRACI_CONST int VAR_STOPSTATE
TRACI_CONST int VAR_FOLLOWER
TRACI_CONST int VAR_EMISSIONCLASS
TRACI_CONST int VAR_LOADED_LIST
TRACI_CONST int FILTER_TYPE_LANES
TRACI_CONST int VAR_ACCEL
TRACI_CONST int VAR_DEPART_DELAY
TRACI_CONST int VAR_SHADOW_LANE_ID
std::map< int, std::shared_ptr< libsumo::TraCIResult > > TraCIResults
{variable->value}
Definition TraCIDefs.h:381
TRACI_CONST int VAR_FOES
TRACI_CONST int VAR_DISTANCE
TRACI_CONST int FILTER_TYPE_LATERAL_DIST
TRACI_CONST int VAR_ELECTRICITYCONSUMPTION
TRACI_CONST int VAR_SPEED_DEVIATION
TRACI_CONST int VAR_VIA
Domain< libsumo::CMD_GET_BUSSTOP_VARIABLE, libsumo::CMD_SET_BUSSTOP_VARIABLE > Dom
A 2D or 3D-position, for 2D positions z == INVALID_DOUBLE_VALUE.
Definition TraCIDefs.h:184