コード例 #1
0
 // does not matter which distribution is chosen here
 private void assignKValuesPersons() {
   for (Person p : this.scenario.getPopulation().getPersons().values()) {
     this.personsKValues.putAttribute(p.getId().toString(), "k", rnd.getUniform(1.0));
   }
   // write person k values
   ObjectAttributesXmlWriter attributesWriter = new ObjectAttributesXmlWriter(this.personsKValues);
   attributesWriter.writeFile(config.controler().getOutputDirectory() + pkValuesFile);
 }
コード例 #2
0
 private void assignKValuesAlternatives() {
   for (ActivityFacility facility :
       this.scenario.getActivityFacilities().getFacilities().values()) {
     this.facilitiesKValues.putAttribute(facility.getId().toString(), "k", rnd.getUniform(1.0));
   }
   ObjectAttributesXmlWriter attributesWriter =
       new ObjectAttributesXmlWriter(this.facilitiesKValues);
   attributesWriter.writeFile(config.controler().getOutputDirectory() + fkValuesFile);
 }