예제 #1
0
파일: Zone.java 프로젝트: sebhoerl/matsim
 public Geometry drawWorkGeometry() {
   if (!this.workBuilding2size.isEmpty()) {
     return MathHelpers.draw(this.workBuilding2size, this.workBuildingSizeSum, this.rnd)
         .getGeometry();
   } else {
     Logger.getLogger(this.getClass().getName())
         .warning(
             "Could not fine work building  in zone "
                 + this.zoneId
                 + "; falling back to zone geometry.");
     return this.getGeometry();
   }
 }
예제 #2
0
파일: Zone.java 프로젝트: sebhoerl/matsim
 public Geometry drawHomeGeometry(final String buildingType) {
   if (VILLA.equals(buildingType) && !this.villas.isEmpty()) {
     return this.villas.get(this.rnd.nextInt(this.villas.size())).getGeometry();
   } else if (APARTMENT.equals(buildingType) && !this.apartmentBuilding2size.isEmpty()) {
     return MathHelpers.draw(this.apartmentBuilding2size, this.apartmentBuildingSizeSum, this.rnd)
         .getGeometry();
   } else {
     Logger.getLogger(this.getClass().getName())
         .warning(
             "Could not fine home building of type "
                 + buildingType
                 + " in zone "
                 + this.zoneId
                 + "; falling back to zone geometry.");
     return this.getGeometry();
   }
 }