#include <MSPerson.h>

Definition at line 116 of file MSPerson.h.
Public Member Functions | |
| const MSEdge & | getDestination () const |
| returns the destination edge | |
| virtual bool | isWaitingFor (const std::string &line) const |
| Whether the person waits for a vehicle of the line specified. | |
| MSPersonStage_Walking (MSEdgeVector route, SUMOTime walkingTime, SUMOReal speed) | |
| constructor | |
| virtual void | proceed (MSNet *net, MSPerson *person, SUMOTime now, const MSEdge &previousEdge) |
| proceeds to the next step | |
| void | setArrived (SUMOTime now) |
| logs end of the step | |
| void | setDeparted (SUMOTime now) |
| logs end of the step | |
| virtual void | tripInfoOutput (OutputDevice &os) const throw (IOError) |
| Called on writing tripinfo output. | |
| ~MSPersonStage_Walking () | |
| destructor | |
Protected Attributes | |
| SUMOTime | myArrived |
| the time at which this stage ended | |
| SUMOTime | myDeparted |
| the time at which this stage started | |
| const MSEdge & | myDestination |
| the next edge to reach (either by walking or driving) | |
Private Member Functions | |
| MSPersonStage_Walking (const MSPersonStage_Walking &) | |
| Invalidated copy constructor. | |
| MSPersonStage_Walking & | operator= (const MSPersonStage_Walking &) |
| Invalidated assignment operator. | |
Private Attributes | |
| SUMOTime | myWalkingTime |
| the time the person is walking | |
| MSPerson::MSPersonStage_Walking::MSPersonStage_Walking | ( | MSEdgeVector | route, | |
| SUMOTime | walkingTime, | |||
| SUMOReal | speed | |||
| ) |
constructor
Definition at line 87 of file MSPerson.cpp.
References MAX2(), myWalkingTime, and SUMOReal.
00088 : MSPersonStage(*route.back()), myWalkingTime(walkingTime) { 00089 if (speed > 0) { 00090 SUMOReal time = 0; 00091 for (MSEdgeVector::const_iterator it = route.begin(); it != route.end(); ++it) { 00092 time += ((*it)->getLanes())[0]->getLength() * speed; 00093 } 00094 myWalkingTime = MAX2(walkingTime, (SUMOTime)(time * 1000.)); 00095 } 00096 }
| MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking | ( | ) |
| MSPerson::MSPersonStage_Walking::MSPersonStage_Walking | ( | const MSPersonStage_Walking & | ) | [private] |
Invalidated copy constructor.
| const MSEdge & MSPerson::MSPersonStage::getDestination | ( | ) | const [inherited] |
returns the destination edge
Definition at line 60 of file MSPerson.cpp.
References MSPerson::MSPersonStage::myDestination.
00060 { 00061 return myDestination; 00062 }
| bool MSPerson::MSPersonStage::isWaitingFor | ( | const std::string & | line | ) | const [virtual, inherited] |
Whether the person waits for a vehicle of the line specified.
Reimplemented in MSPerson::MSPersonStage_Driving.
Definition at line 80 of file MSPerson.cpp.
| MSPersonStage_Walking& MSPerson::MSPersonStage_Walking::operator= | ( | const MSPersonStage_Walking & | ) | [private] |
Invalidated assignment operator.
| void MSPerson::MSPersonStage_Walking::proceed | ( | MSNet * | net, | |
| MSPerson * | person, | |||
| SUMOTime | now, | |||
| const MSEdge & | previousEdge | |||
| ) | [virtual] |
proceeds to the next step
Implements MSPerson::MSPersonStage.
Definition at line 103 of file MSPerson.cpp.
References MSNet::getPersonControl(), MAX2(), myWalkingTime, and MSPersonControl::setArrival().
00105 { 00106 net->getPersonControl().setArrival(MAX2(now, now + myWalkingTime), person); 00107 }
| void MSPerson::MSPersonStage::setArrived | ( | SUMOTime | now | ) | [inherited] |
logs end of the step
Definition at line 74 of file MSPerson.cpp.
References MSPerson::MSPersonStage::myArrived.
00074 { 00075 myArrived = now; 00076 }
| void MSPerson::MSPersonStage::setDeparted | ( | SUMOTime | now | ) | [inherited] |
logs end of the step
Definition at line 66 of file MSPerson.cpp.
References MSPerson::MSPersonStage::myDeparted.
00066 { 00067 if (myDeparted < 0) { 00068 myDeparted = now; 00069 } 00070 }
| void MSPerson::MSPersonStage_Walking::tripInfoOutput | ( | OutputDevice & | os | ) | const throw (IOError) [virtual] |
Called on writing tripinfo output.
| [in] | os | The stream to write the information into |
| IOError | not yet implemented |
Implements MSPerson::MSPersonStage.
Definition at line 111 of file MSPerson.cpp.
References MSPerson::MSPersonStage::myArrived, and time2string().
00111 { 00112 (os.openTag("walk") << 00113 " arrival=\"" << time2string(myArrived) << 00114 "\"").closeTag(true); 00115 }
SUMOTime MSPerson::MSPersonStage::myArrived [protected, inherited] |
the time at which this stage ended
Definition at line 100 of file MSPerson.h.
Referenced by MSPerson::MSPersonStage::setArrived(), MSPerson::MSPersonStage_Waiting::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), and tripInfoOutput().
SUMOTime MSPerson::MSPersonStage::myDeparted [protected, inherited] |
the time at which this stage started
Definition at line 97 of file MSPerson.h.
Referenced by MSPerson::MSPersonStage::setDeparted(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
const MSEdge& MSPerson::MSPersonStage::myDestination [protected, inherited] |
the next edge to reach (either by walking or driving)
Definition at line 94 of file MSPerson.h.
Referenced by MSPerson::MSPersonStage::getDestination().
the time the person is walking
Definition at line 136 of file MSPerson.h.
Referenced by MSPersonStage_Walking(), and proceed().
1.5.6