Tabnine Logo
Volume.getValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getValue
method
in
org.matsim.counts.Volume

Best Java code snippets using org.matsim.counts.Volume.getValue (Showing top 13 results out of 315)

origin: matsim-org/matsim

public final Volume getMaxVolume() {
  Volume v_max = null;
  double max = -1.0;
  for (Volume v : this.volumes.values()) {
    if (v.getValue() > max) { max = v.getValue(); v_max = v; }
  }
  return v_max;
}
origin: matsim-org/matsim

@Override
public void startVolume(final Volume volume, final BufferedWriter out) throws IOException {
  out.write("\t\t<volume");
  out.write(" h=\"" + volume.getHourOfDayStartingWithOne() + "\"");
  out.write(" val=\"" + volume.getValue() + "\"");
  out.write(" />\n");
}
origin: matsim-org/matsim

this.content.append(this.CHR_HT);
countValue = volume.getValue();
double simValue = volumes[hour - 1];
origin: matsim-org/matsim

for (Volume volume : entry.getValue().getVolumes().values()){
  sum += volume.getValue() ;
origin: matsim-org/matsim

  public void testGetVolumes() {
    Count count = new Count(Id.create(0, Link.class), "1");
    count.createVolume(1, 100.0);

    Iterator<Volume> vol_it = count.getVolumes().values().iterator();
    while (vol_it.hasNext()) {
      Volume v = vol_it.next();
      assertTrue("Getting volumes failed", v.getValue() == 100.0);
    }

  }
}
origin: matsim-org/matsim

/**
 * Creates the List with the counts vs sim values stored in the
 * countAttribute Attribute of this class.
 */
private void compare() {
  for (Count<Link> count : this.counts.getCounts().values()) {
    if (!distanceFilter.isInRange(count)) {
      continue;
    }
    double[] volumes = this.volumesPerLinkPerHour.getVolumesForStop(Id.create(count.getId(), TransitStopFacility.class));
    if (volumes == null || volumes.length == 0) {
      log.warn("No volumes for count location: " + count.getId().toString());
      continue;
    }
    for (int hour = 1; hour <= 24; hour++) {
      Volume volume = count.getVolume(hour);
      if (volume != null) {
        double countValue = volume.getValue();
        double simValue=volumes[hour-1];
        simValue *= this.countsScaleFactor;
        this.result.add(new CountSimComparisonImpl(count.getId(), count.getCsLabel(), hour, countValue, simValue));
      }
    }
  }
}
origin: matsim-org/matsim

  count = 0 ;
count += volume.getValue() ;
if ( ! ( (timeBinIndex%multiple) == (multiple-1) ) ) {
  log.warn( " NOT adding measurement: timeBinIndex: " + timeBinIndex + "; multiple: " + multiple ) ;
origin: matsim-org/matsim

Volume v = count.getVolume(i + 1);
if (v != null) {
  writer.write(v.getValue() + TAB);
} else {
  writer.write("n/a" + TAB);
origin: matsim-org/matsim

public void testGetVolume() {
  Count count = new Count(Id.create(0, Link.class), "1");
  count.createVolume(1, 100.0);
  assertTrue("Getting volume failed", count.getVolume(1).getValue() == 100.0);
}
origin: matsim-org/matsim

public void testCreateVolume() {
  Count count = new Count(Id.create(0, Link.class), "1");
  Volume volume = count.createVolume(1, 100.0);
  assertTrue("Creation and initialization of volume failed", volume.getHourOfDayStartingWithOne()==1);
  assertTrue("Creation and initialization of volume failed", volume.getValue()==100.0);
}
origin: matsim-org/matsim

Volume v = vol_it.next();
Assert.assertTrue(v.getHourOfDayStartingWithOne()>0);
Assert.assertTrue(v.getValue()>=0.0);
origin: matsim-org/matsim

  public void testSEVolume() {
    AttributeFactory attributeFactory = new AttributeFactory();
    final Counts counts = new Counts();
    CountsReaderMatsimV1 reader = new CountsReaderMatsimV1(counts);
    reader.startTag("counts", attributeFactory.createCountsAttributes(), null);
    reader.startTag("count", attributeFactory.createCountAttributes(), null);
    reader.startTag("volume", attributeFactory.createVolumeAttributes(), null);

    assertEquals("Volume attribute setting failed", 100.0, counts.getCount(Id.create(1, Link.class)).getVolume(1).getValue(), EPSILON);
  }
}
origin: matsim-org/matsim

  public void testSEElementVolume() throws SAXException {
    AttributeFactory attributeFactory = new AttributeFactory();
    final Counts counts = new Counts();
    MatsimCountsReader reader = new MatsimCountsReader(counts);
    reader.setDoctype("counts_v1.xsd");

    reader.startElement("", "counts", "counts", attributeFactory.createCountsAttributes());
    reader.startElement("", "count", "count", attributeFactory.createCountAttributes());
    reader.startElement("", "volume", "volume", attributeFactory.createVolumeAttributes());

    assertEquals("Volume attribute setting failed", 100.0, counts.getCount(Id.create(1, Link.class)).getVolume(1).getValue(), EPSILON);

    reader.endElement("", "volume", "volume");
    reader.endElement("", "count", "count");
    reader.endElement("", "counts", "counts");
  }
}
org.matsim.countsVolumegetValue

Popular methods of Volume

  • getHourOfDayStartingWithOne
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 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