49 for (std::vector<MSPushButton*>::const_iterator it = pushButtons.begin(); it != pushButtons.end(); ++it) {
50 if (it.operator * ()->isActivated()) {
69 const std::set<MSTransportable*, ComparatorNumericalIdLess> persons = walkingEdge->
getPersons();
70 if (persons.size() > 0) {
71 for (std::set<MSTransportable*>::const_iterator pIt = persons.begin(); pIt != persons.end(); ++pIt) {
78 std::ostringstream oss;
79 oss <<
"MSPedestrianPushButton::isActiveForEdge Pushbutton active for edge " << walkingEdge->
getID() <<
" crossing " << crossing->
getID()
88 for (std::vector<MSLane*>::const_iterator laneIt = walkingEdge->
getLanes().begin();
89 laneIt != walkingEdge->
getLanes().end(); ++laneIt) {
92 for (MSLane::VehCont::const_iterator vehicleIt = vehicles.begin(); vehicleIt != vehicles.end(); ++vehicleIt) {
105 std::ostringstream oss;
106 oss <<
"MSPedestrianPushButton::isActiveForEdge Pushbutton active for edge " << walkingEdge->
getID() <<
" crossing " << crossing->
getID()
121 std::ostringstream oss;
122 oss <<
"MSPedestrianPushButton::isActiveForEdge Pushbutton not active for edge " << walkingEdge->
getID() <<
" crossing " << crossing->
getID()
123 <<
" num Persons " << persons.size();
131void getWalking(
const std::vector<MSEdge*>& edges, std::vector< MSEdge*>& walkingEdges) {
132 for (std::vector<MSEdge*>::const_iterator it = edges.begin(); it != edges.end(); ++it) {
135 walkingEdges.push_back(edge);
142 std::vector<MSEdge*> walkingEdges;
151 for (std::vector<MSEdge*>::const_iterator wIt = walkingList.begin(); wIt != walkingList.end(); ++wIt) {
155 WRITE_MESSAGE(
"MSPedestrianPushButton::isActiveOnAnySideOfTheRoad crossing edge " + crossing->
getID() +
" walking edge" + walking->
getID());
165 std::vector<MSPushButton*> pushButtons;
168 std::set<std::string> controlledEdges;
169 for (std::vector<std::string>::const_iterator lIt = lanes.begin(); lIt != lanes.end(); ++lIt) {
173 if (controlledEdges.count(laneEdge->
getID()) != 0) {
176 controlledEdges.insert(laneEdge->
getID());
183 for (std::vector<MSEdge*>::const_iterator wIt = walkingList.begin(); wIt != walkingList.end(); ++wIt) {
186 WRITE_MESSAGE(
"MSPedestrianPushButton::loadPushButtons Added pushButton for walking edge " + walking->
getID() +
" crossing edge "
187 + crossing->
getID() +
" crossed edge " + laneEdge->
getID() +
". Phase state " + phase->
getState());
202 const MSEdge* edge = *eIt;
204 for (std::vector<std::string>::const_iterator cIt = edge->
getCrossingEdges().begin();
#define WRITE_MESSAGE(msg)
@ SVC_PEDESTRIAN
pedestrian
const MSEdge * succEdge(int nSuccs) const
Returns the nSuccs'th successor of edge the vehicle is currently at.
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
SUMOVehicleClass getVClass() const
Returns the vehicle's access class.
A road/street connecting two junctions.
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
bool isCrossing() const
return whether this edge is a pedestrian crossing
SVCPermissions getPermissions() const
Returns the combined permissions of all lanes of this edge.
const std::set< MSTransportable *, ComparatorNumericalIdLess > & getPersons() const
Returns this edge's persons set.
bool isWalkingArea() const
return whether this edge is walking area
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
const std::vector< std::string > & getCrossingEdges() const
Gets the crossed edge ids.
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary....
const MSEdgeVector & getPredecessors() const
const MSEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
Representation of a lane in the micro simulation.
std::vector< MSVehicle * > VehCont
Container for vehicles.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
MSEdge & getEdge() const
Returns the lane's edge.
const MSEdge * getNextEdgePtr() const
returns the next edge ptr if this person is walking and the pedestrian model allows it
The definition of a single phase of a tls logic.
const std::string & getState() const
Returns the state within this phase.
const std::vector< std::string > & getTargetLaneSet() const
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
Representation of a vehicle in the micro simulation.
const std::string & getID() const
Returns the id.