Tabnine Logo
JDEQSimConfigGroup.getCarSize
Code IndexAdd Tabnine to your IDE (free)

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

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

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

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

  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);
  }
}
org.matsim.core.mobsim.jdeqsimJDEQSimConfigGroupgetCarSize

Popular methods of JDEQSimConfigGroup

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

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now