private void startVolume(final Attributes meta) { if (this.currcount != null) { this.currcount.createVolume(Integer.parseInt(meta.getValue("h")), Double.parseDouble(meta.getValue("val"))); } }
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); } } }
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); }
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); }
private Counts<Link> createDummyCounts() { final Counts<Link> counts = new Counts<Link>(); counts.setYear( 1988 ); for ( double i=0; i < 10; i+=1 ) { for ( double j=0; j < 10; j+=1 ) { final Count<Link> c = counts.createAndAddCount( Id.createLinkId( i+"-"+j ), i+"-"+j ); c.setCoord( new Coord( i , j ) ); c.createVolume( 1 , 0 ); } } return counts; }
simCounts.getCount(countSimComparison.getId()).setCoord(counts.getCount(countSimComparison.getId()).getCoord()); simCounts.getCount(countSimComparison.getId()).createVolume(countSimComparison.getHour(), countSimComparison.getSimulationValue());