22 #include "../MSEdge.h" 23 #include "../MSLane.h" 24 #include "../MSVehicle.h" 37 for (std::vector<MSPushButton*>::const_iterator it = pushButtons.begin(); it != pushButtons.end(); ++it) {
38 if (it.operator * ()->isActivated()) {
59 const std::set<MSTransportable*> persons = walkingEdge->
getPersons();
60 if (persons.size() > 0) {
61 for (std::set<MSTransportable*>::const_iterator pIt = persons.begin(); pIt != persons.end(); ++pIt) {
68 std::ostringstream oss;
69 oss <<
"MSPedestrianPushButton::isActiveForEdge Pushbutton active for edge " << walkingEdge->
getID() <<
" crossing " << crossing->
getID()
78 for (std::vector<MSLane*>::const_iterator laneIt = walkingEdge->
getLanes().begin();
79 laneIt != walkingEdge->
getLanes().end(); ++laneIt) {
82 for (MSLane::VehCont::const_iterator vehicleIt = vehicles.begin(); vehicleIt != vehicles.end(); ++vehicleIt) {
95 std::ostringstream oss;
96 oss <<
"MSPedestrianPushButton::isActiveForEdge Pushbutton active for edge " << walkingEdge->
getID() <<
" crossing " << crossing->
getID()
109 std::ostringstream oss;
110 oss <<
"MSPedestrianPushButton::isActiveForEdge Pushbutton not active for edge " << walkingEdge->
getID() <<
" crossing " << crossing->
getID()
111 <<
" num Persons " << persons.size();
119 void getWalking(
const std::vector<MSEdge*>& edges, std::vector< MSEdge*>& walkingEdges) {
120 for (std::vector<MSEdge*>::const_iterator it = edges.begin(); it != edges.end(); ++it) {
123 walkingEdges.push_back(edge);
130 std::vector<MSEdge*> walkingEdges;
139 for (std::vector<MSEdge*>::const_iterator wIt = walkingList.begin(); wIt != walkingList.end(); ++wIt) {
142 DBG(
WRITE_MESSAGE(
"MSPedestrianPushButton::isActiveOnAnySideOfTheRoad crossing edge " + crossing->
getID() +
" walking edge" + walking->
getID()););
151 std::vector<MSPushButton*> pushButtons;
154 std::set<std::string> controlledEdges;
155 for (std::vector<std::string>::const_iterator lIt = lanes.begin(); lIt != lanes.end(); ++lIt) {
159 if (controlledEdges.count(laneEdge->
getID()) != 0) {
162 controlledEdges.insert(laneEdge->
getID());
169 for (std::vector<MSEdge*>::const_iterator wIt = walkingList.begin(); wIt != walkingList.end(); ++wIt) {
171 DBG(
WRITE_MESSAGE(
"MSPedestrianPushButton::loadPushButtons Added pushButton for walking edge " + walking->
getID() +
" crossing edge " 172 + crossing->
getID() +
" crossed edge " + laneEdge->
getID() +
". Phase state " + phase->
getState()););
186 const MSEdge* edge = *eIt;
188 for (std::vector<std::string>::const_iterator cIt = edge->
getCrossingEdges().begin();
const std::string & getState() const
Returns the state within this phase.
MSEdge & getEdge() const
Returns the lane's edge.
Representation of a vehicle in the micro simulation.
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
const MSEdgeVector & getPredecessors() const
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
const std::vector< std::string > & getCrossingEdges() const
Gets the crossed edge ids.
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
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 std::string & getID() const
Returns the id.
A road/street connecting two junctions.
const std::set< MSTransportable * > & getPersons() const
Returns this edge's persons set.
const std::string & getID() const
returns the id of the transportable
bool isCrossing() const
return whether this edge is a pedestrian crossing
std::vector< MSVehicle * > VehCont
Container for vehicles.
const MSEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
SUMOVehicleClass getVClass() const
Returns the vehicle's access class.
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
const MSEdge * succEdge(int nSuccs) const
Returns the nSuccs'th successor of edge the vehicle is currently at.
const MSEdge * getNextEdgePtr() const
returns the next edge ptr if this person is walking and the pedestrian model allows it ...
bool isWalkingArea() const
return whether this edge is walking area
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
const LaneIdVector & getTargetLaneSet() const
SVCPermissions getPermissions() const
#define WRITE_MESSAGE(msg)
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
const std::string & getID() const
Returns the name of the vehicle.
The definition of a single phase of a tls logic.
Representation of a lane in the micro simulation.