46 std::vector<std::string>
48 std::vector<std::string> ids;
84 std::vector<TraCIConnection>
86 std::vector<TraCIConnection> v;
90 for (MSLinkCont::const_iterator i = links.begin(); i != links.end(); ++i) {
102 v.push_back(
TraCIConnection(approachedLane, hasPrio, isOpen, hasFoe, approachedInternal, state, direction, length));
108 std::vector<std::string>
111 if (permissions ==
SVCAll) {
118 std::vector<std::string>
128 for (PositionVector::const_iterator pi = shp.begin(); pi != shp.end(); ++pi) {
209 for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
210 length += (*j)->getVehicleType().getLength();
212 if (vehs.size() > 0) {
213 length = length / (double) vehs.size();
230 if (meanSpeed != 0) {
248 for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
258 std::vector<std::string>
261 std::vector<std::string> vehIDs;
263 for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
264 vehIDs.push_back((*j)->getID());
static double getCO2Emission(std::string laneID)
static int getLastStepHaltingNumber(std::string laneID)
double getNOxEmissions() const
Returns the sum of last step NOx emissions.
MSEdge & getEdge() const
Returns the lane's edge.
static void insertIDs(std::vector< std::string > &into)
Adds the ids of all stored lanes into the given vector.
LinkDirection getDirection() const
Returns the direction the vehicle passing this link take.
static double getHCEmission(std::string laneID)
MSLane * getLane() const
Returns the connected lane.
static double getLength(std::string laneID)
static std::vector< std::string > getLastStepVehicleIDs(std::string laneID)
bool opened(SUMOTime arrivalTime, double arrivalSpeed, double leaveSpeed, double vehicleLength, double impatience, double decel, SUMOTime waitingTime, double posLat=0, std::vector< const SUMOVehicle *> *collectFoes=0) const
Returns the information whether the link may be passed.
double getFuelConsumption() const
Returns the sum of last step fuel consumption.
static double getWaitingTime(std::string laneID)
void setMaxSpeed(double val)
Sets a new maximum speed for the lane (used by TraCI and MSCalibrator)
static void setAllowed(std::string laneID, std::vector< std::string > allowedClasses)
const std::string & getString(const T key) const
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
std::vector< std::string > getVehicleClassNamesList(SVCPermissions permissions)
Returns the ids of the given classes, divided using a ' '.
static double getElectricityConsumption(std::string laneID)
static std::string getEdgeID(std::string laneID)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
static std::vector< std::string > getIDList()
double getPMxEmissions() const
Returns the sum of last step PMx emissions.
double getLength() const
Returns the lane's length.
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
const PositionVector & getShape() const
Returns this lane's shape.
static std::vector< TraCIConnection > getLinks(std::string laneID)
static double getNoiseEmission(std::string laneID)
const std::string & getID() const
Returns the id.
static StringBijection< LinkState > LinkStates
link states
const SVCPermissions SVCAll
all VClasses are allowed
static void setDisallowed(std::string laneID, std::vector< std::string > disallowedClasses)
double getWidth() const
Returns the lane's width.
LinkState getState() const
Returns the current state of the link.
static double getWidth(std::string laneID)
static double getLastStepMeanSpeed(std::string laneID)
static StringBijection< LinkDirection > LinkDirections
link directions
static double getNOxEmission(std::string laneID)
void rebuildAllowedLanes()
MSLane * getViaLane() const
Returns the following inner lane.
double getCO2Emissions() const
Returns the sum of last step CO2 emissions.
void setLength(double val)
Sets a new length for the lane (used by TraCI only)
static double getLastStepLength(std::string laneID)
int getVehicleNumber() const
Returns the number of vehicles on this lane (for which this lane is responsible)
SVCPermissions getPermissions() const
Returns the vehicle class permissions for this lane.
double getSpeedLimit() const
Returns the lane's maximum allowed speed.
bool havePriority() const
Returns whether this link is a major link.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
static double getDefaultDecel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default deceleration for the given vehicle class This needs to be a function because the ...
static double getTraveltime(std::string laneID)
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
double getHCEmissions() const
Returns the sum of last step HC emissions.
std::vector< MSVehicle * > VehCont
Container for vehicles.
double getLength() const
Returns the length of this link.
void addParameter(const std::string &key, const std::string &value)
Adds a parameter.
const std::string & getParameter(const std::string &key, const std::string &defaultValue) const
Returns the value for a given key.
static std::string getParameter(const std::string &laneID, const std::string ¶m)
void setPermissions(SVCPermissions permissions, long transientID)
Sets the permissions to the given value. If a transientID is given, the permissions are recored as te...
double getElectricityConsumption() const
Returns the sum of last step electricity consumption.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
static std::vector< std::string > getAllowed(std::string laneID)
double getCOEmissions() const
Returns the sum of last step CO emissions.
static TraCIPositionVector getShape(std::string laneID)
static double getLastStepOccupancy(std::string laneID)
static double getFuelConsumption(std::string laneID)
static int getLinkNumber(std::string laneID)
double getHarmonoise_NoiseEmissions() const
Returns the sum of last step noise emissions.
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
static void setParameter(const std::string &routeID, const std::string &key, const std::string &value)
static void setLength(std::string laneID, double length)
static const MSLane * getLane(const std::string &id)
double getMeanSpeed() const
Returns the mean speed on this lane.
static double getCOEmission(std::string laneID)
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
static const long CHANGE_PERMISSIONS_PERMANENT
static int getLastStepVehicleNumber(std::string laneID)
static const SUMOVTypeParameter & getDefault()
return the default parameters, this is a function due to the http://www.parashift.com/c++-faq/static-init-order.html
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
double getNettoOccupancy() const
Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps)...
Representation of a lane in the micro simulation.
double getWaitingSeconds() const
Returns the overall waiting time on this lane.
static double getPMxEmission(std::string laneID)
static std::vector< std::string > getDisallowed(std::string laneID)
static void setMaxSpeed(std::string laneID, double speed)
static double getMaxSpeed(std::string laneID)
bool hasApproachingFoe(SUMOTime arrivalTime, SUMOTime leaveTime, double speed, double decel) const
Returns the information whether a vehicle is approaching on one of the link's foe streams...