Package de.tudresden.sumo.util

Examples of de.tudresden.sumo.util.SumoCommand


  public synchronized void do_timestep() throws Exception{
   
    if (isClosed())
      throw new IllegalStateException("connection is closed");
   
    try {this.cp.do_job_set(new SumoCommand(Constants.CMD_SIMSTEP2, 0));}
    catch (Exception e) {
      closeAndDontCareAboutInterruptedException();
      throw e;
    }
   
View Full Code Here


   *
   * @return a list of ID's of all routes
   */

  public static SumoCommand getIDList(){
    return new SumoCommand(Constants.CMD_GET_ROUTE_VARIABLE, Constants.ID_LIST, "", Constants.RESPONSE_GET_ROUTE_VARIABLE, Constants.TYPE_STRINGLIST);
  }
View Full Code Here

  /**
   * Returns the number of all Routes in the network.
   */

  public static SumoCommand getIDCount(){
    return new SumoCommand(Constants.CMD_GET_ROUTE_VARIABLE, Constants.ID_COUNT, "", Constants.RESPONSE_GET_ROUTE_VARIABLE, Constants.TYPE_INTEGER);
  }
View Full Code Here

   * @param edges
   *            list of edges the new route is following
   */

  public static SumoCommand add(String routeID, SumoStringList edges){
    return new SumoCommand(Constants.CMD_SET_ROUTE_VARIABLE, Constants.ADD, routeID, edges);
  }
View Full Code Here

   * @return list of allowed vehicle classes. An empty list means all vehicles
   *         are allowed.
   */

  public static SumoCommand getAllowed(String laneID){
    return new SumoCommand(Constants.CMD_GET_LANE_VARIABLE, Constants.LANE_ALLOWED, laneID, Constants.RESPONSE_GET_LANE_VARIABLE, Constants.TYPE_STRINGLIST);
  }
View Full Code Here

  /**
   * Returns the number of all lanes in the network.
   */

  public static SumoCommand getIDCount(){
    return new SumoCommand(Constants.CMD_GET_LANE_VARIABLE, Constants.ID_COUNT, "", Constants.RESPONSE_GET_LANE_VARIABLE, Constants.TYPE_INTEGER);
  }
View Full Code Here

   * @param laneID
   *            a string identifying a lane
   * @return the CO2 emissions (in mg)
   */
  public static SumoCommand getCO2Emission(String laneID){
    return new SumoCommand(Constants.CMD_GET_LANE_VARIABLE, Constants.VAR_CO2EMISSION, laneID, Constants.RESPONSE_GET_LANE_VARIABLE, Constants.TYPE_DOUBLE);
  }
View Full Code Here

   *            a string identifying a lane
   * @return the CO emissions (in mg)
   */

  public static SumoCommand getCOEmission(String laneID){
    return new SumoCommand(Constants.CMD_GET_LANE_VARIABLE, Constants.VAR_COEMISSION, laneID, Constants.RESPONSE_GET_LANE_VARIABLE, Constants.TYPE_DOUBLE);
  }
View Full Code Here

   *            a string identifying a lane
   * @return list of disallowed vehicle classes
   */

  public static SumoCommand getDisallowed(String laneID){
    return new SumoCommand(Constants.CMD_GET_LANE_VARIABLE, Constants.LANE_DISALLOWED, laneID, Constants.RESPONSE_GET_LANE_VARIABLE, Constants.TYPE_STRINGLIST);
  }
View Full Code Here

   *            a string identifying a lane
   * @return the id of the edge this lane belongs to
   */

  public static SumoCommand getEdgeID(String laneID){
    return new SumoCommand(Constants.CMD_GET_LANE_VARIABLE, Constants.LANE_EDGE_ID, laneID, Constants.RESPONSE_GET_LANE_VARIABLE, Constants.TYPE_STRING);
  }
View Full Code Here

TOP

Related Classes of de.tudresden.sumo.util.SumoCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.