Skip to content

Commit

Permalink
Score Prep: adding coordinates of home activity
Browse files Browse the repository at this point in the history
  • Loading branch information
ln0455686 committed Nov 6, 2023
1 parent b39e7d6 commit 849ebbe
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ public void run() {
"FirstPRStation",
"LastPRStation",
"livesInsideBoundaryZone",
"isCarUser"});
"isCarUser",
"home_x",
"home_y"});
for (Person person : population.getPersons().values()) {

// regional division
Expand Down Expand Up @@ -116,6 +118,9 @@ public void run() {
String firstPRStation = getFirstPRStation(person.getSelectedPlan(),prStations);
String lastPRStation = getLastPRStation(person.getSelectedPlan(),prStations);

// get coordinates of home activity
String homeX = String.valueOf(home.getCoord().getX());
String homeY = String.valueOf(home.getCoord().getY());

writer.writeNext(new String[]{person.getId().toString(),
String.valueOf(person.getSelectedPlan().getScore()),
Expand All @@ -128,7 +133,9 @@ public void run() {
firstPRStation,
lastPRStation,
String.valueOf(livesInsideBoundaryZone),
String.valueOf(isCarUser)}
String.valueOf(isCarUser),
homeX,
homeY}
);
}
writer.close();
Expand Down

0 comments on commit 849ebbe

Please sign in to comment.