112 tempContent.
writeInt((
int) links.size());
114 for (std::vector<TraCIConnection>::const_iterator i = links.begin(); i != links.end(); ++i) {
166 for (
int iPoint = 0; iPoint <
MIN2(255, (
int) shp.size()); ++iPoint) {
246 std::string paramName =
"";
267 std::string warning =
"";
299 std::vector<std::string> classes;
307 std::vector<std::string> classes;
355 for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
356 if (myShape.distance2D((*j)->getPosition()) <= myRange) {
357 myIDs.insert((*j)->getID());
371 myIDs.insert(l->
getID());
static double getCO2Emission(std::string laneID)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa3: Get Lane Variable)
#define LAST_STEP_MEAN_SPEED
static int getLastStepHaltingNumber(std::string laneID)
MSEdge & getEdge() const
Returns the lane's edge.
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc3: Change Lane State)
#define CMD_GET_VEHICLE_VARIABLE
double distance2D(const Position &p, bool perpendicular=false) const
closest 2D-distance to point p (or -1 if perpendicular is true and the point is beyond this vector) ...
#define VAR_CURRENT_TRAVELTIME
static double getHCEmission(std::string laneID)
static double getLength(std::string laneID)
static std::vector< std::string > getLastStepVehicleIDs(std::string laneID)
static double getWaitingTime(std::string laneID)
static void setAllowed(std::string laneID, std::vector< std::string > allowedClasses)
static double getElectricityConsumption(std::string laneID)
static std::string getEdgeID(std::string laneID)
static std::vector< std::string > getIDList()
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
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.
virtual void writeUnsignedByte(int)
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
static void setDisallowed(std::string laneID, std::vector< std::string > disallowedClasses)
#define VAR_NOISEEMISSION
#define VAR_FUELCONSUMPTION
virtual void writeInt(int)
virtual int readUnsignedByte()
static double getWidth(std::string laneID)
static double getLastStepMeanSpeed(std::string laneID)
#define RESPONSE_GET_LANE_VARIABLE
static double getNOxEmission(std::string laneID)
static double getLastStepLength(std::string laneID)
bool readTypeCheckingStringList(tcpip::Storage &inputStorage, std::vector< std::string > &into)
Reads the value type and a string list, verifying the type.
virtual void writeStringList(const std::vector< std::string > &s)
#define CMD_GET_LANE_VARIABLE
virtual std::string readString()
#define CMD_GET_EDGE_VARIABLE
static double getTraveltime(std::string laneID)
TraCI server used to control sumo by a remote TraCI client.
virtual void writeStorage(tcpip::Storage &store)
std::vector< MSVehicle * > VehCont
Container for vehicles.
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
#define LAST_STEP_VEHICLE_NUMBER
static std::string getParameter(const std::string &laneID, const std::string ¶m)
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
static std::vector< std::string > getAllowed(std::string laneID)
virtual void writeString(const std::string &s)
#define LAST_STEP_VEHICLE_ID_LIST
static TraCIPositionVector getShape(std::string laneID)
std::string toHex(const T i, std::streamsize numDigits=0)
static double getLastStepOccupancy(std::string laneID)
#define CMD_SET_LANE_VARIABLE
#define VAR_ELECTRICITYCONSUMPTION
static double getFuelConsumption(std::string laneID)
static int getLinkNumber(std::string laneID)
virtual void writeDouble(double)
static void setParameter(const std::string &routeID, const std::string &key, const std::string &value)
static void setLength(std::string laneID, double length)
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
#define LAST_STEP_OCCUPANCY
static double getCOEmission(std::string laneID)
static int getLastStepVehicleNumber(std::string laneID)
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
void add(const MSLane *const l) const
Adds the given object to the container.
Representation of a lane in the micro simulation.
static double getPMxEmission(std::string laneID)
static std::vector< std::string > getDisallowed(std::string laneID)
#define LAST_STEP_VEHICLE_HALTING_NUMBER
static void setMaxSpeed(std::string laneID, double speed)
static double getMaxSpeed(std::string laneID)
static bool getShape(const std::string &id, PositionVector &shape)
Returns the named lane's shape.