Exemple #1
0
 public double GetLastStepOccupancy(string id)
 {
     return
         (TraCICommandHelper.ExecuteCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_INDUCTIONLOOP_VARIABLE,
              TraCIConstants.LAST_STEP_OCCUPANCY));
 }
Exemple #2
0
 /// <summary>
 /// Sets a new maximum allowed speed on the lane in m/s.
 /// </summary>
 public TraCIResponse <object> SetMaxSpeed(string laneId, double maxSpeed)
 {
     return(TraCICommandHelper.ExecuteSetCommand <object, double>(
                Client,
                laneId,
                TraCIConstants.CMD_SET_LANE_VARIABLE,
                TraCIConstants.VAR_MAXSPEED,
                maxSpeed));
 }
Exemple #3
0
 /// <summary>
 /// Returns the id of the edge this lane belongs to
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <string> GetEdgeId(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <string>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.LANE_EDGE_ID));
 }
Exemple #4
0
 /// <summary>
 /// Returns the estimated travel time for the last time step on the given lane [s]
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetTravelTime(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.VAR_CURRENT_TRAVELTIME));
 }
Exemple #5
0
 /// <summary>
 /// Sets a list of disallowed vehicle classes.
 /// </summary>
 public TraCIResponse <object> SetDisallowed(string laneId, List <string> disallowedVehicleClasses)
 {
     return(TraCICommandHelper.ExecuteSetCommand <object, List <string> >(
                Client,
                laneId,
                TraCIConstants.CMD_SET_LANE_VARIABLE,
                TraCIConstants.LANE_DISALLOWED,
                disallowedVehicleClasses));
 }
Exemple #6
0
 /// <summary>
 /// Returns the list of ids of vehicles that were on this lane in the last simulation step
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <List <string> > GetLastStepVehicleIds(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <List <string> >(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.LAST_STEP_VEHICLE_ID_LIST));
 }
Exemple #7
0
 /// <summary>
 /// The mean length of vehicles which were on this lane in the last step [m]
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetLastStepLength(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.LAST_STEP_LENGTH));
 }
Exemple #8
0
 public List <string> GetEdges(string id)
 {
     return
         (TraCICommandHelper.ExecuteCommand <List <string> >(
              Client,
              id,
              TraCIConstants.CMD_GET_ROUTE_VARIABLE,
              TraCIConstants.VAR_EDGES));
 }
Exemple #9
0
 public List <string> GetIdList()
 {
     return
         (TraCICommandHelper.ExecuteCommand <List <string> >(
              Client,
              "ignored",
              TraCIConstants.CMD_GET_ROUTE_VARIABLE,
              TraCIConstants.ID_LIST));
 }
Exemple #10
0
 public Position2D GetPosition(string id)
 {
     return
         (TraCICommandHelper.ExecuteCommand <Position2D>(
              Client,
              id,
              TraCIConstants.CMD_GET_POI_VARIABLE,
              TraCIConstants.VAR_POSITION));
 }
Exemple #11
0
 public int GetIdCount()
 {
     return
         (TraCICommandHelper.ExecuteCommand <int>(
              Client,
              "ignored",
              TraCIConstants.CMD_GET_ROUTE_VARIABLE,
              TraCIConstants.ID_COUNT));
 }
Exemple #12
0
 public Color GetColor(string id)
 {
     return
         (TraCICommandHelper.ExecuteCommand <Color>(
              Client,
              id,
              TraCIConstants.CMD_GET_POI_VARIABLE,
              TraCIConstants.VAR_COLOR));
 }
Exemple #13
0
 public string GetType(string id)
 {
     return
         (TraCICommandHelper.ExecuteCommand <string>(
              Client,
              id,
              TraCIConstants.CMD_GET_POI_VARIABLE,
              TraCIConstants.VAR_TYPE));
 }
Exemple #14
0
 public double GetLastStepMeanLength(string id)
 {
     return
         (TraCICommandHelper.ExecuteCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_INDUCTIONLOOP_VARIABLE,
              TraCIConstants.LAST_STEP_LENGTH));
 }
Exemple #15
0
 /// <summary>
 /// Returns the mean speed of vehicles that were on this lane within the last simulation step [m/s]
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetLastStepMeanSpeed(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.LAST_STEP_MEAN_SPEED));
 }
Exemple #16
0
 /// <summary>
 /// Returns the maximum speed allowed on this lane [m/s]
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetMaxSpeed(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.VAR_MAXSPEED));
 }
Exemple #17
0
 /// <summary>
 /// Returns the number of lanes within the scenario (the given Lane ID is ignored)
 /// </summary>
 /// <returns></returns>
 public TraCIResponse <int> GetIdCount()
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <int>(
              Client,
              "ignored",
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.ID_COUNT));
 }
Exemple #18
0
 /// <summary>
 /// Returns this lane's shape
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <Polygon> GetShape(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <Polygon>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.VAR_SHAPE));
 }
Exemple #19
0
 /// <summary>
 /// Returns the total lengths of vehicles on this lane during the last simulation step divided by the length of this lane
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetLastStepOccupancy(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.LAST_STEP_OCCUPANCY));
 }
Exemple #20
0
 /// <summary>
 /// Returns the width of the named lane [m]
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetWidth(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.VAR_WIDTH));
 }
Exemple #21
0
 /// <summary>
 /// Returns the waiting time for all vehicles on the lane [s]
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetWaitingTime(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.VAR_WAITING_TIME));
 }
Exemple #22
0
 /// <summary>
 /// Returns a list of ids of all lanes within the scenario (the given Lane ID is ignored)
 /// </summary>
 /// <returns></returns>
 public TraCIResponse <List <string> > GetIdList()
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <List <string> >(
              Client,
              "ignored",
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.ID_LIST));
 }
Exemple #23
0
 /// <summary>
 /// Returns the total number of halting vehicles for the last time step on the given lane.
 /// A speed of less than 0.1 m/s is considered a halt.
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <int> GetLastStepHaltingNumber(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <int>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.LAST_STEP_VEHICLE_HALTING_NUMBER));
 }
Exemple #24
0
 /// <summary>
 /// Sum of fuel consumption on this lane in ml during this time step.
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetFuelConsumption(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.VAR_FUELCONSUMPTION));
 }
Exemple #25
0
 /// <summary>
 /// Sets the length of the lane in m
 /// </summary>
 public TraCIResponse <object> SetLength(string laneId, double length)
 {
     return(TraCICommandHelper.ExecuteSetCommand <object, double>(
                Client,
                laneId,
                TraCIConstants.CMD_SET_LANE_VARIABLE,
                TraCIConstants.VAR_LENGTH,
                length));
 }
Exemple #26
0
 /// <summary>
 /// Sum of noise generated on this lane in dBA.
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetNoiseEmission(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.VAR_NOISEEMISSION));
 }
Exemple #27
0
 /// <summary>
 /// Returns the number of links outgoing from this lane [#]
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <byte> GetLinkNumber(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <byte>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.LANE_LINK_NUMBER));
 }
Exemple #28
0
 /// <summary>
 /// Sum of electricity consumption on this lane in kWh during this time step.
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <double> GetElectricityConsumption(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <double>(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.VAR_ELECTRICITYCONSUMPTION));
 }
Exemple #29
0
 /// <summary>
 /// Returns the mml-definitions of vehicle classes allowed on this lane
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public TraCIResponse <List <string> > GetAllowed(string id)
 {
     return
         (TraCICommandHelper.ExecuteGetCommand <List <string> >(
              Client,
              id,
              TraCIConstants.CMD_GET_LANE_VARIABLE,
              TraCIConstants.LANE_ALLOWED));
 }
Exemple #30
0
 public List <string> GetLastStepVehicleIds(string id)
 {
     return
         (TraCICommandHelper.ExecuteCommand <List <string> >(
              Client,
              id,
              TraCIConstants.CMD_GET_INDUCTIONLOOP_VARIABLE,
              TraCIConstants.LAST_STEP_VEHICLE_ID_LIST));
 }