Codota Logo
JDEQSimConfigGroup
Code IndexAdd Codota to your IDE (free)

How to use
JDEQSimConfigGroup
in
org.matsim.core.mobsim.jdeqsim

Best Java code snippets using org.matsim.core.mobsim.jdeqsim.JDEQSimConfigGroup (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: matsim-org/matsim

public static void disposeEndLegMessage(EndLegMessage message) {
  if (!JDEQSimConfigGroup.isGC_MESSAGES()) {
    endLegMessageQueue.add(message);
  }
}
origin: matsim-org/matsim

  public void testParametersSetCorrectly() {
    Config config = super.loadConfig(this.getPackageInputDirectory() + "config.xml");
    JDEQSimConfigGroup jdeqSimConfigGroup = ConfigUtils.addOrGetModule(config, JDEQSimConfigGroup.NAME, JDEQSimConfigGroup.class);
    assertEquals(360.0, jdeqSimConfigGroup.getSimulationEndTime(), EPSILON);
    assertEquals(2.0, jdeqSimConfigGroup.getFlowCapacityFactor(), EPSILON);
    assertEquals(3.0, jdeqSimConfigGroup.getStorageCapacityFactor(), EPSILON);
    assertEquals(3600.0, jdeqSimConfigGroup.getMinimumInFlowCapacity(), EPSILON);
    assertEquals(10.0, jdeqSimConfigGroup.getCarSize(), EPSILON);
    assertEquals(20.0, jdeqSimConfigGroup.getGapTravelSpeed(), EPSILON);
    assertEquals(9000.0, jdeqSimConfigGroup.getSqueezeTime(), EPSILON);
  }
}
origin: matsim-org/matsim

public Road(Scheduler scheduler, Link link) {
  super(scheduler);
  this.link = link;
  /*
   * calculate the maximum number of cars, which can be on the road at the
   * same time
   */
  this.maxNumberOfCarsOnRoad = Math.round(link.getLength()
      * NetworkUtils.getNumberOfLanesAsInt(Time.UNDEFINED_TIME, link)
      * config.getStorageCapacityFactor() / config.getCarSize());
  /**
   * it is assured here, that a road must have the space of at least one
   * car
   */
  if (this.maxNumberOfCarsOnRoad == 0) {
    this.maxNumberOfCarsOnRoad = 1;
  }
  double maxInverseInFlowCapacity = 3600 / (config.getMinimumInFlowCapacity()
      * config.getFlowCapacityFactor() * NetworkUtils.getNumberOfLanesAsInt(Time.UNDEFINED_TIME, link));
  this.inverseOutFlowCapacity = 1 / (((Link) link).getFlowCapacityPerSec() * config.getFlowCapacityFactor());
  if (this.inverseOutFlowCapacity > maxInverseInFlowCapacity) {
    this.inverseInFlowCapacity = maxInverseInFlowCapacity;
  } else {
    this.inverseInFlowCapacity = this.inverseOutFlowCapacity;
  }
  this.gapTravelTime = link.getLength() / config.getGapTravelSpeed();
  // gap must be initialized to null because of the application logic
  this.gap = null;
}
origin: matsim-org/matsim

@Inject
public DownstreamSensor(LinkSensorManager sensorManager, Scenario scenario) {
  this.sensorManager = sensorManager;
  this.network = scenario.getNetwork();
  this.lanes = scenario.getLanes();
  this.carSize = scenario.getConfig().jdeqSim().getCarSize();
  this.storageCapacityFactor = scenario.getConfig().qsim().getStorageCapFactor();
  this.signalsData = (SignalsData) scenario.getScenarioElement(SignalsData.ELEMENT_NAME);
  init();
}
 
origin: matsim-org/matsim

this.deadlockPreventionMessages.add(vehicle.scheduleDeadlockPreventionMessage(
    this.deadlockPreventionMessages.getLast().getMessageArrivalTime()
        + config.getSqueezeTime(), this));
    + config.getSqueezeTime(), this));
origin: matsim-org/matsim

  @Override
  public void run() {
    events.initProcessing();
    Timer t = new Timer();
    t.startTimer();

    Scheduler scheduler = new Scheduler(new MessageQueue(), config.getSimulationEndTime());
    Road.setAllRoads(new HashMap<Id<Link>, Road>());

    // initialize network
    Road road;
    for (Link link : this.scenario.getNetwork().getLinks().values()) {
      road = new Road(scheduler, link);
      Road.getAllRoads().put(link.getId(), road);
    }

    for (Person person : this.scenario.getPopulation().getPersons().values()) {
      new Vehicle(scheduler, person, activityDurationInterpretation); // the vehicle registers itself to the scheduler
    }

    scheduler.startSimulation();

    t.endTimer();
    log.info("Time needed for one iteration (only JDEQSimulation part): " + t.getMeasuredTime() + "[ms]");
    events.finishProcessing();
  }
}
origin: matsim-org/matsim

this.jdeqSim = new JDEQSimConfigGroup();
this.modules.put(JDEQSimConfigGroup.NAME, this.jdeqSim);
origin: matsim-org/matsim

public static void disposeDeadlockPreventionMessage(DeadlockPreventionMessage message) {
  if (!JDEQSimConfigGroup.isGC_MESSAGES()) {
    deadlockPreventionMessageQueue.add(message);
  }
}
origin: matsim-org/matsim

public static void disposeEnterRoadMessage(EnterRoadMessage message) {
  if (!JDEQSimConfigGroup.isGC_MESSAGES()) {
    enterRoadMessageQueue.add(message);
  }
}
origin: matsim-org/matsim

public static void disposeLeaveRoadMessage(LeaveRoadMessage message) {
  if (!JDEQSimConfigGroup.isGC_MESSAGES()) {
    leaveRoadMessageQueue.add(message);
  }
}
origin: matsim-org/matsim

public static void disposeEndRoadMessage(EndRoadMessage message) {
  if (!JDEQSimConfigGroup.isGC_MESSAGES()) {
    endRoadMessageQueue.add(message);
  }
}
origin: matsim-org/matsim

public static void disposeStartingLegMessage(StartingLegMessage message) {
  if (!JDEQSimConfigGroup.isGC_MESSAGES()) {
    startingLegMessageQueue.add(message);
  }
}
org.matsim.core.mobsim.jdeqsimJDEQSimConfigGroup

Javadoc

The micro-simulation parameters.

Most used methods

  • getCarSize
  • getFlowCapacityFactor
  • getGapTravelSpeed
  • getMinimumInFlowCapacity
  • getSimulationEndTime
  • getSqueezeTime
  • getStorageCapacityFactor
  • <init>
  • isGC_MESSAGES
  • setGC_MESSAGES

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now