-
Notifications
You must be signed in to change notification settings - Fork 17
1280 trip addition overhaul #1281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
912d032
5959b3f
129b102
f59d457
6c0fb3f
406e597
b86f98f
a60168d
da4f61b
76f5a00
d97e96c
e40a851
2ef703f
2260143
1dea067
4f82054
dc2a7a1
344b73a
c02e399
89c2d5d
647728f
b102d40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,8 +125,12 @@ class ABMMobilityEdge | |
for (int i = int(persons_to_change.size()) - 1; i >= 0; --i) { | ||
auto& person = model_from.get_persons()[persons_to_change[i]]; | ||
auto target_type = person.get_location_type(); | ||
if (target_type == abm::LocationType::Count) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why should this happen? Locations with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not in the graph abm. Please ask julia but in graph_abmmodel.h There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was discussed extensively. While in the current implementation nothing changes, it is worth noticing that the read-in of trips is now changed: Before, trips that change the model only considered the given LocationType and mapped this to an assigned location of the person. Now, the actual ID is required, which is then taken to determine the LocationType and then again being used to map to an assigned location. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a discussion we decided to use a LocationType::invalid, that is inserted after LocationType::Count. |
||
target_type = model_to.get_location(person.get_location()).get_type(); | ||
} | ||
//check if Person uses this edge | ||
if (person.get_assigned_location_model_id(target_type) == model_to.get_id()) { | ||
|
||
auto target_id = person.get_assigned_location(target_type); | ||
//set correct location for person | ||
person.set_location(target_type, target_id, model_to.get_id()); | ||
|
Uh oh!
There was an error while loading. Please reload this page.