diff --git a/src/veins/modules/mobility/traci/TraCIScenarioManager.cc b/src/veins/modules/mobility/traci/TraCIScenarioManager.cc index 35885e25b..6ddff4052 100644 --- a/src/veins/modules/mobility/traci/TraCIScenarioManager.cc +++ b/src/veins/modules/mobility/traci/TraCIScenarioManager.cc @@ -257,10 +257,9 @@ void TraCIScenarioManager::initialize(int stage) parseModuleTypes(); penetrationRate = par("penetrationRate").doubleValue(); ignoreGuiCommands = par("ignoreGuiCommands"); - order = par("order"); - ignoreUnknownSubscriptionResults = par("ignoreUnknownSubscriptionResults"); host = par("host").stdstringValue(); port = getPortNumber(); + allowPedestrians = par("allowPedestrians").boolValue(); if (port == -1) { throw cRuntimeError("TraCI Port autoconfiguration failed, set 'port' != -1 in omnetpp.ini or provide VEINS_TRACI_PORT environment variable."); } @@ -276,6 +275,7 @@ void TraCIScenarioManager::initialize(int stage) nextNodeVectorIndex = 0; hosts.clear(); subscribedVehicles.clear(); + subscribedPersons.clear(); trafficLights.clear(); activeVehicleCount = 0; parkingVehicleCount = 0; @@ -302,9 +302,6 @@ void TraCIScenarioManager::init_traci() auto apiVersion = commandInterface->getVersion(); EV_DEBUG << "TraCI server \"" << apiVersion.second << "\" reports API version " << apiVersion.first << endl; commandInterface->setApiVersion(apiVersion.first); - if (order != -1) { - commandInterface->setOrder(order); - } } { @@ -331,6 +328,7 @@ void TraCIScenarioManager::init_traci() variables.push_back(VAR_TELEPORT_ENDING_VEHICLES_IDS); variables.push_back(VAR_PARKING_STARTING_VEHICLES_IDS); variables.push_back(VAR_PARKING_ENDING_VEHICLES_IDS); + uint8_t variableNumber = variables.size(); TraCIBuffer buf1 = TraCIBuffer(); buf1 << beginTime << endTime << objectId << variableNumber; @@ -339,7 +337,7 @@ void TraCIScenarioManager::init_traci() } TraCIBuffer buf = connection->query(CMD_SUBSCRIBE_SIM_VARIABLE, buf1); - processSubcriptionResult(buf); + processSubscriptionResult(buf); ASSERT(buf.eof()); } @@ -351,7 +349,7 @@ void TraCIScenarioManager::init_traci() uint8_t variableNumber = 1; uint8_t variable1 = ID_LIST; TraCIBuffer buf = connection->query(CMD_SUBSCRIBE_VEHICLE_VARIABLE, TraCIBuffer() << beginTime << endTime << objectId << variableNumber << variable1); - processSubcriptionResult(buf); + processSubscriptionResult(buf); ASSERT(buf.eof()); } @@ -406,27 +404,24 @@ void TraCIScenarioManager::init_traci() } } - std::vector obstaclesModules = FindModule::findSubModules(getSimulation()->getSystemModule()); - - for (ObstacleControl* obstacles : obstaclesModules) { - if (obstacles) { - { - // get list of polygons - std::list ids = commandInterface->getPolygonIds(); - for (std::list::iterator i = ids.begin(); i != ids.end(); ++i) { - std::string id = *i; - std::string typeId = commandInterface->polygon(id).getTypeId(); - if (!obstacles->isTypeSupported(typeId)) continue; - std::list coords = commandInterface->polygon(id).getShape(); - std::vector shape; - std::copy(coords.begin(), coords.end(), std::back_inserter(shape)); - for (auto p : shape) { - if ((p.x < 0) || (p.y < 0) || (p.x > world->getPgs()->x) || (p.y > world->getPgs()->y)) { - EV_WARN << "WARNING: Playground (" << world->getPgs()->x << ", " << world->getPgs()->y << ") will not fit radio obstacle at (" << p.x << ", " << p.y << ")" << endl; - } + ObstacleControl* obstacles = ObstacleControlAccess().getIfExists(); + if (obstacles) { + { + // get list of polygons + std::list ids = commandInterface->getPolygonIds(); + for (std::list::iterator i = ids.begin(); i != ids.end(); ++i) { + std::string id = *i; + std::string typeId = commandInterface->polygon(id).getTypeId(); + if (!obstacles->isTypeSupported(typeId)) continue; + std::list coords = commandInterface->polygon(id).getShape(); + std::vector shape; + std::copy(coords.begin(), coords.end(), std::back_inserter(shape)); + for (auto p : shape) { + if ((p.x < 0) || (p.y < 0) || (p.x > world->getPgs()->x) || (p.y > world->getPgs()->y)) { + EV_WARN << "WARNING: Playground (" << world->getPgs()->x << ", " << world->getPgs()->y << ") will not fit radio obstacle at (" << p.x << ", " << p.y << ")" << endl; } - obstacles->addFromTypeAndShape(id, typeId, shape); } + obstacles->addFromTypeAndShape(id, typeId, shape); } } } @@ -582,6 +577,72 @@ void TraCIScenarioManager::addModule(std::string nodeId, std::string type, std:: emit(traciModuleAddedSignal, mod); } + +void TraCIScenarioManager::addPerson(std::string nodeId, std::string type, std::string name, std::string displayString, const Coord& position, std::string road_id, double speed, Heading heading, double length, double width) +{ + if (hosts.find(nodeId) != hosts.end()) throw cRuntimeError("tried adding duplicate module"); + + double option1 = hosts.size() / (hosts.size() + unEquippedHosts.size() + 1.0); + double option2 = (hosts.size() + 1) / (hosts.size() + unEquippedHosts.size() + 1.0); + + if (fabs(option1 - penetrationRate) < fabs(option2 - penetrationRate)) { + unEquippedHosts.insert(nodeId); + return; + } + + int32_t nodeVectorIndex = nextNodeVectorIndex++; + + cModule* parentmod = getParentModule(); + if (!parentmod) throw cRuntimeError("Parent Module not found"); + + cModuleType* nodeType = cModuleType::get(type.c_str()); + if (!nodeType) throw cRuntimeError("Module Type \"%s\" not found", type.c_str()); + +#if OMNETPP_BUILDNUM >= 1525 + parentmod->setSubmoduleVectorSize(name.c_str(), nodeVectorIndex + 1); + cModule* mod = nodeType->create(name.c_str(), parentmod, nodeVectorIndex); +#else + // TODO: this trashes the vectsize member of the cModule, although nobody seems to use it + cModule* mod = nodeType->create(name.c_str(), parentmod, nodeVectorIndex, nodeVectorIndex); +#endif + + mod->finalizeParameters(); + if (displayString.length() > 0) { + mod->getDisplayString().parse(displayString.c_str()); + } + mod->buildInside(); + mod->scheduleStart(simTime() + updateInterval); + + preInitializeModule(mod, nodeId, position, road_id, speed, heading, VehicleSignalSet(14)); + + emit(traciModulePreInitSignal, mod); + + mod->callInitialize(); + hosts[nodeId] = mod; + std::string figura = "i=veins/node/pedestrian;is=vs"; + mod->setDisplayString(figura.c_str()); + + // post-initialize TraCIMobility + auto mobilityModules = getSubmodulesOfType(mod); + for (auto mm : mobilityModules) { + mm->changePosition(); + } + + if (vehicleObstacleControl) { + std::vector initialAntennaPositions; + for (auto& caModule : getSubmodulesOfType(mod, true)) { + initialAntennaPositions.push_back(caModule->getAntennaPosition()); + } + ASSERT(mobilityModules.size() == 1); + auto mm = mobilityModules[0]; + double offset = mm->getHostPositionOffset(); + const MobileHostObstacle* vo = vehicleObstacleControl->add(MobileHostObstacle(initialAntennaPositions, mm, length, offset, width, 1.5)); + vehicleObstacles[mm] = vo; + } + + emit(traciModuleAddedSignal, mod); +} + cModule* TraCIScenarioManager::getManagedModule(std::string nodeId) { if (hosts.find(nodeId) == hosts.end()) return nullptr; @@ -639,7 +700,19 @@ void TraCIScenarioManager::executeOneTimestep() buf >> count; EV_DEBUG << "Getting " << count << " subscription results" << endl; for (uint32_t i = 0; i < count; ++i) { - processSubcriptionResult(buf); + processSubscriptionResult(buf); + } + + if(allowPedestrians){ + simtime_t beginTime = 0; + simtime_t endTime = SimTime::getMaxTime(); + std::string objectId = ""; + uint8_t variableNumber = 1; + uint8_t variable1 = ID_LIST; + TraCIBuffer buf7 = connection->query(CMD_SUBSCRIBE_PERSON_VARIABLE, TraCIBuffer() << beginTime << endTime << objectId << variableNumber << variable1); + processSubscriptionResult(buf7); + ASSERT(buf7.eof()); + allowPedestrians = false; } } @@ -671,7 +744,32 @@ void TraCIScenarioManager::subscribeToVehicleVariables(std::string vehicleId) buf1 << variable; } TraCIBuffer buf = connection->query(CMD_SUBSCRIBE_VEHICLE_VARIABLE, buf1); - processSubcriptionResult(buf); + processSubscriptionResult(buf); + ASSERT(buf.eof()); +} + +void TraCIScenarioManager::subscribeToPersonVariables(std::string personId) +{ + // subscribe to some attributes of the person + simtime_t beginTime = 0; + simtime_t endTime = SimTime::getMaxTime(); + std::string objectId = personId; + std::list variables; + variables.push_back(VAR_POSITION); + variables.push_back(VAR_ROAD_ID); + variables.push_back(VAR_SPEED); + variables.push_back(VAR_ANGLE); + variables.push_back(VAR_LENGTH); + variables.push_back(VAR_WIDTH); + uint8_t variableNumber = variables.size(); + + TraCIBuffer buf1; + buf1 << beginTime << endTime << objectId << variableNumber; + for (auto variable : variables) { + buf1 << variable; + } + TraCIBuffer buf = connection->query(CMD_SUBSCRIBE_PERSON_VARIABLE, buf1); + processSubscriptionResult(buf); ASSERT(buf.eof()); } @@ -686,6 +784,20 @@ void TraCIScenarioManager::unsubscribeFromVehicleVariables(std::string vehicleId TraCIBuffer buf = connection->query(CMD_SUBSCRIBE_VEHICLE_VARIABLE, TraCIBuffer() << beginTime << endTime << objectId << variableNumber); ASSERT(buf.eof()); } + +void TraCIScenarioManager::unsubscribeFromPersonVariables(std::string personId) +{ + // subscribe to some attributes of the person + simtime_t beginTime = 0; + simtime_t endTime = SimTime::getMaxTime(); + std::string objectId = personId; + uint8_t variableNumber = 0; + + TraCIBuffer buf = connection->query(CMD_SUBSCRIBE_PERSON_VARIABLE, TraCIBuffer() << beginTime << endTime << objectId << variableNumber); + ASSERT(buf.eof()); +} + + void TraCIScenarioManager::subscribeToTrafficLightVariables(std::string tlId) { // subscribe to some attributes of the traffic light system @@ -699,7 +811,7 @@ void TraCIScenarioManager::subscribeToTrafficLightVariables(std::string tlId) uint8_t variable4 = TL_RED_YELLOW_GREEN_STATE; TraCIBuffer buf = connection->query(CMD_SUBSCRIBE_TL_VARIABLE, TraCIBuffer() << beginTime << endTime << objectId << variableNumber << variable1 << variable2 << variable3 << variable4); - processSubcriptionResult(buf); + processSubscriptionResult(buf); ASSERT(buf.eof()); } @@ -943,6 +1055,189 @@ void TraCIScenarioManager::processSimSubscription(std::string objectId, TraCIBuf } } } +void TraCIScenarioManager::processPersonSubscription(std::string objectId, TraCIBuffer& buf){ + bool isSubscribed = (subscribedPersons.find(objectId) != subscribedPersons.end()); + double px; + double py; + std::string edge; + double speed; + double angle_traci; + double length; + double width; + int numRead = 0; + + uint8_t variableNumber_resp; + buf >> variableNumber_resp; + for (uint8_t j = 0; j < variableNumber_resp; ++j) { + uint8_t variable1_resp; + buf >> variable1_resp; + uint8_t isokay; + buf >> isokay; + if (isokay != RTYPE_OK) { + uint8_t varType; + buf >> varType; + ASSERT(varType == TYPE_STRING); + std::string errormsg; + buf >> errormsg; + if (isSubscribed) { + if (isokay == RTYPE_NOTIMPLEMENTED) throw cRuntimeError("TraCI server reported subscribing to person variable 0x%2x not implemented (\"%s\"). Might need newer version.", variable1_resp, errormsg.c_str()); + throw cRuntimeError("TraCI server reported error subscribing to person variable 0x%2x (\"%s\").", variable1_resp, errormsg.c_str()); + } + } + else if (variable1_resp == ID_LIST) { + uint8_t varType; + buf >> varType; + ASSERT(varType == TYPE_STRINGLIST); + uint32_t count; + buf >> count; + EV_DEBUG << "TraCI reports " << count << " active persons." << endl; + std::set drivingPersons; + for (uint32_t i = 0; i < count; ++i) { + std::string idstring; + buf >> idstring; + drivingPersons.insert(idstring); + } + + // check for persons that need subscribing to + std::set needSubscribe; + std::set_difference(drivingPersons.begin(), drivingPersons.end(), subscribedPersons.begin(), subscribedPersons.end(), std::inserter(needSubscribe, needSubscribe.begin())); + for (std::set::const_iterator i = needSubscribe.begin(); i != needSubscribe.end(); ++i) { + subscribedPersons.insert(*i); + subscribeToPersonVariables(*i); + } + + // check for persons that need unsubscribing from + std::set needUnsubscribe; + std::set_difference(subscribedPersons.begin(), subscribedPersons.end(), drivingPersons.begin(), drivingPersons.end(), std::inserter(needUnsubscribe, needUnsubscribe.begin())); + for (std::set::const_iterator i = needUnsubscribe.begin(); i != needUnsubscribe.end(); ++i) { + subscribedPersons.erase(*i); + unsubscribeFromPersonVariables(*i); + } + } + else if (variable1_resp == VAR_POSITION) { + uint8_t varType; + buf >> varType; + ASSERT(varType == POSITION_2D); + buf >> px; + buf >> py; + numRead++; + } + else if (variable1_resp == VAR_ROAD_ID) { + uint8_t varType; + buf >> varType; + ASSERT(varType == TYPE_STRING); + buf >> edge; + numRead++; + } + else if (variable1_resp == VAR_SPEED) { + uint8_t varType; + buf >> varType; + ASSERT(varType == TYPE_DOUBLE); + buf >> speed; + numRead++; + } + else if (variable1_resp == VAR_ANGLE) { + uint8_t varType; + buf >> varType; + ASSERT(varType == TYPE_DOUBLE); + buf >> angle_traci; + numRead++; + } + else if (variable1_resp == VAR_LENGTH) { + uint8_t varType; + buf >> varType; + ASSERT(varType == TYPE_DOUBLE); + buf >> length; + numRead++; + } + else if (variable1_resp == VAR_WIDTH) { + uint8_t varType; + buf >> varType; + ASSERT(varType == TYPE_DOUBLE); + buf >> width; + numRead++; + } + else { + throw cRuntimeError("Received unhandled vehicle subscription result"); + } + } + + // bail out if we didn't want to receive these subscription results + if (!isSubscribed) return; + + // make sure we got updates for all attributes + if (numRead != 6) return; + + Coord p = connection->traci2omnet(TraCICoord(px, py)); + if ((p.x < 0) || (p.y < 0)) throw cRuntimeError("received bad node position (%.2f, %.2f), translated to (%.2f, %.2f)", px, py, p.x, p.y); + + + Heading heading = connection->traci2omnetHeading(angle_traci); + + cModule* mod = getManagedModule(objectId); + + // is it in the ROI? + bool inRoi = !roi.hasConstraints() ? true : (roi.onAnyRectangle(TraCICoord(px, py)) || roi.partOfRoads(edge)); + if (!inRoi) { + if (mod) { + deleteManagedModule(objectId); + EV_DEBUG << "Person #" << objectId << " left region of interest" << endl; + } + else if (unEquippedHosts.find(objectId) != unEquippedHosts.end()) { + unEquippedHosts.erase(objectId); + EV_DEBUG << "Person (unequipped) # " << objectId << " left region of interest" << endl; + } + return; + } + + if (isModuleUnequipped(objectId)) { + return; + } + + if (!mod) { + // no such module - need to create + std::string vType = commandIfc->person(objectId).getTypeId(); + std::string mType, mName, mDisplayString; + TypeMapping::iterator iType, iName, iDisplayString; + + + TypeMapping::iterator i; + iType = moduleType.find(vType); + if (iType == moduleType.end()) { + iType = moduleType.find("*"); + if (iType == moduleType.end()) throw cRuntimeError("cannot find a module type for person type \"%s\"", vType.c_str()); + } + mType = iType->second; + // search for module name + iName = moduleName.find(vType); + if (iName == moduleName.end()) { + iName = moduleName.find(std::string("*")); + if (iName == moduleName.end()) throw cRuntimeError("cannot find a module name for person type \"%s\"", vType.c_str()); + } + mName = iName->second; + if (moduleDisplayString.size() != 0) { + iDisplayString = moduleDisplayString.find(vType); + if (iDisplayString == moduleDisplayString.end()) { + iDisplayString = moduleDisplayString.find("*"); + if (iDisplayString == moduleDisplayString.end()) throw cRuntimeError("cannot find a module display string for person type \"%s\"", vType.c_str()); + } + mDisplayString = iDisplayString->second; + } + else { + mDisplayString = ""; + } + + if (mType != "0") { + addPerson(objectId, mType, mName, mDisplayString, p, edge, speed, heading, length, width); + EV_DEBUG << "Added person #" << objectId << endl; + } + } + else { + // module existed - update position + EV_DEBUG << "module " << objectId << " moving to " << p.x << "," << p.y << endl; + updateModulePosition(mod, p, edge, speed, heading, VehicleSignalSet(1)); + } +} void TraCIScenarioManager::processVehicleSubscription(std::string objectId, TraCIBuffer& buf) { @@ -1064,39 +1359,6 @@ void TraCIScenarioManager::processVehicleSubscription(std::string objectId, TraC buf >> width; numRead++; } - else if (ignoreUnknownSubscriptionResults) { - static bool haveWarned = false; - uint8_t varType; - buf >> varType; - if (!haveWarned) { - EV_WARN << "Warning: Got a variable that I don't care about (variable " << variable1_resp << ", type " << varType << "). Trying my best to ignore it. This warning will not be repeated." << std::endl; - haveWarned = true; - } - if (varType == TYPE_STRING) { - std::string foo; - buf >> foo; - } - else if (varType == TYPE_DOUBLE) { - double foo; - buf >> foo; - } - else if (varType == TYPE_COLOR) { - TraCIColor res(0, 0, 0, 0); - buf >> res.red; - buf >> res.green; - buf >> res.blue; - buf >> res.alpha; - } - else if (varType == POSITION_3D) { - double x, y, z; - buf >> x; - buf >> y; - buf >> z; - } - else { - throw cRuntimeError("Received unhandled (and non-ignorable) vehicle subscription result"); - } - } else { throw cRuntimeError("Received unhandled vehicle subscription result"); } @@ -1177,7 +1439,7 @@ void TraCIScenarioManager::processVehicleSubscription(std::string objectId, TraC } } -void TraCIScenarioManager::processSubcriptionResult(TraCIBuffer& buf) +void TraCIScenarioManager::processSubscriptionResult(TraCIBuffer& buf) { uint8_t cmdLength_resp; buf >> cmdLength_resp; @@ -1190,6 +1452,8 @@ void TraCIScenarioManager::processSubcriptionResult(TraCIBuffer& buf) if (commandId_resp == RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE) processVehicleSubscription(objectId_resp, buf); + else if (commandId_resp == RESPONSE_SUBSCRIBE_PERSON_VARIABLE) + processPersonSubscription(objectId_resp, buf); else if (commandId_resp == RESPONSE_SUBSCRIBE_SIM_VARIABLE) processSimSubscription(objectId_resp, buf); else if (commandId_resp == RESPONSE_SUBSCRIBE_TL_VARIABLE) diff --git a/src/veins/modules/mobility/traci/TraCIScenarioManager.h b/src/veins/modules/mobility/traci/TraCIScenarioManager.h index f0c212d1c..486a8785d 100644 --- a/src/veins/modules/mobility/traci/TraCIScenarioManager.h +++ b/src/veins/modules/mobility/traci/TraCIScenarioManager.h @@ -58,7 +58,7 @@ class MobileHostObstacle; * * See the Veins website for a tutorial, documentation, and publications . * - * @author Christoph Sommer, David Eckhoff, Falko Dressler, Zheng Yao, Tobias Mayer, Alvaro Torres Cortes, Luca Bedogni, Ion Turcanu + * @author Christoph Sommer, David Eckhoff, Falko Dressler, Zheng Yao, Tobias Mayer, Alvaro Torres Cortes, Luca Bedogni * * @see TraCIMobility * @see TraCIScenarioManagerLaunchd @@ -133,6 +133,8 @@ class VEINS_API TraCIScenarioManager : public cSimpleModule, public cISimulation std::string host; int port; + bool allowPedestrians; /** Created by Well: Allow pedestrians inside the simulation*/ + std::string trafficLightModuleType; /**< module type to be used in the simulation for each managed traffic light */ std::string trafficLightModuleName; /**< module name to be used in the simulation for each managed traffic light */ std::string trafficLightModuleDisplayString; /**< module displayString to be used in the simulation for each managed vehicle */ @@ -141,8 +143,6 @@ class VEINS_API TraCIScenarioManager : public cSimpleModule, public cISimulation bool autoShutdown; /**< Shutdown module as soon as no more vehicles are in the simulation */ double penetrationRate; bool ignoreGuiCommands; /**< whether to ignore all TraCI commands that only make sense when the server has a graphical user interface */ - int order; // specific position in the multi-client execution order of the TraCI server to request upon connecting (-1: do not request a position) - bool ignoreUnknownSubscriptionResults; // whether to (try and) ignore any subscription result we did not request (but another client might have) TraCIRegionOfInterest roi; /**< Can return whether a given position lies within the simulation's region of interest. Modules are destroyed and re-created as managed vehicles leave and re-enter the ROI */ double areaSum; @@ -154,6 +154,7 @@ class VEINS_API TraCIScenarioManager : public cSimpleModule, public cISimulation std::map hosts; /**< vector of all hosts managed by us */ std::set unEquippedHosts; std::set subscribedVehicles; /**< all vehicles we have already subscribed to */ + std::set subscribedPersons; /**< Created by Well: all persons we have already subscribed to */ std::map trafficLights; /**< vector of all traffic lights managed by us */ uint32_t activeVehicleCount; /**< number of vehicles, be it parking or driving **/ uint32_t parkingVehicleCount; /**< number of parking vehicles, derived from parking start/end events */ @@ -173,16 +174,20 @@ class VEINS_API TraCIScenarioManager : public cSimpleModule, public cISimulation virtual void preInitializeModule(cModule* mod, const std::string& nodeId, const Coord& position, const std::string& road_id, double speed, Heading heading, VehicleSignalSet signals); virtual void updateModulePosition(cModule* mod, const Coord& p, const std::string& edge, double speed, Heading heading, VehicleSignalSet signals); void addModule(std::string nodeId, std::string type, std::string name, std::string displayString, const Coord& position, std::string road_id = "", double speed = -1, Heading heading = Heading::nan, VehicleSignalSet signals = {VehicleSignal::undefined}, double length = 0, double height = 0, double width = 0); + void addPerson(std::string nodeId, std::string type, std::string name, std::string displayString, const Coord& position, std::string road_id = "", double speed = -1, Heading heading = Heading::nan, double length = 0, double width = 0); cModule* getManagedModule(std::string nodeId); /**< returns a pointer to the managed module named moduleName, or 0 if no module can be found */ void deleteManagedModule(std::string nodeId); bool isModuleUnequipped(std::string nodeId); /**< returns true if this vehicle is Unequipped */ void subscribeToVehicleVariables(std::string vehicleId); + void subscribeToPersonVariables(std::string personId); /**< Created by Well */ void unsubscribeFromVehicleVariables(std::string vehicleId); + void unsubscribeFromPersonVariables(std::string personId); /**< Created by Well */ void processSimSubscription(std::string objectId, TraCIBuffer& buf); void processVehicleSubscription(std::string objectId, TraCIBuffer& buf); - void processSubcriptionResult(TraCIBuffer& buf); + void processPersonSubscription(std::string objectId, TraCIBuffer& buf); /**< Created by Well */ + void processSubscriptionResult(TraCIBuffer& buf); void subscribeToTrafficLightVariables(std::string tlId); void unsubscribeFromTrafficLightVariables(std::string tlId); diff --git a/src/veins/modules/mobility/traci/TraCIScenarioManager.ned b/src/veins/modules/mobility/traci/TraCIScenarioManager.ned index d9ea45b05..387230c03 100644 --- a/src/veins/modules/mobility/traci/TraCIScenarioManager.ned +++ b/src/veins/modules/mobility/traci/TraCIScenarioManager.ned @@ -75,7 +75,6 @@ simple TraCIScenarioManager string roiRects = default(""); // which rectangles (e.g. "0,0-10,10 20,20-30,30) are considered to consitute the region of interest, if not empty. Note that these rectangles have to use TraCI (SUMO) coordinates and not OMNeT++. They can be easily read from sumo-gui. double penetrationRate = default(1); //the probability of a vehicle being equipped with Car2X technology bool ignoreGuiCommands = default(false); // whether to ignore all TraCI commands that only make sense when the server has a graphical user interface - int order = default(-1); // specific position in the multi-client execution order of the TraCI server to request upon connecting (-1: do not request a position) - bool ignoreUnknownSubscriptionResults = default(false); // whether to (try and) ignore any subscription result we did not request (but another client might have) + bool allowPedestrians = default(false); // the simulation will consider pedestrians (true or false) }