Skip to content

1530 enable mutiple types for the same location and assignment of multiple locations of one type#1548

Open
jubicker wants to merge 13 commits into
mainfrom
1530-enable-mutiple-types-for-the-same-location-and-assignment-of-multiple-locations-of-one-type
Open

1530 enable mutiple types for the same location and assignment of multiple locations of one type#1548
jubicker wants to merge 13 commits into
mainfrom
1530-enable-mutiple-types-for-the-same-location-and-assignment-of-multiple-locations-of-one-type

Conversation

@jubicker
Copy link
Copy Markdown
Member

@jubicker jubicker commented Apr 23, 2026

Changes and Information

Please briefly list the changes (main added features, changed items, or corrected bugs) made:

  • Introduce ActivityType and make location assigment for agents dependent on ActivityType rather than on LocationType
  • Implemement possibility to habe multiple locations of the same ActivityType assigned

If need be, add additional information and what the reviewer should look out for in particular:

Merge Request - Guideline Checklist

Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.

Checks by code author

  • Every addressed issue is linked (use the "Closes #ISSUE" keyword below).
  • New code adheres to coding guidelines.
  • No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.).
  • Tests are added for new functionality and a local test run was successful (with and without OpenMP).
  • Appropriate documentation within the code (Doxygen) for new functionality has been added in the code.
  • Appropriate external documentation (ReadTheDocs) for new functionality has been added to the online documentation and checked in the preview.
  • Proper attention to licenses, especially no new third-party software with conflicting license has been added.
  • (For ABM development) Checked benchmark results and ran and posted a local test above from before and after development to ensure performance is monitored.

Checks by code reviewer(s)

  • Corresponding issue(s) is/are linked and addressed.
  • Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.).
  • Appropriate unit tests have been added, CI passes, code coverage and performance is acceptable (did not decrease).
  • No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.).
  • On merge, add 2-5 lines with the changes (main added features, changed items, or corrected bugs) to the merge-commit-message. This can be taken from the briefly-list-the-changes above (best case) or the separate commit messages (worst case).

closes #1530

Copy link
Copy Markdown
Member

@DavidKerkmann DavidKerkmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I don't have much to criticize.
One could think about adding a few teacher to the minimal example such that location_type and activity_type are different. There should be a small test that covers this possibility in any case.

Comment thread cpp/models/abm/person.cpp Outdated
}

void Person::set_location(LocationType type, LocationId id, int model_id)
void Person::set_location(ActivityType type, LocationType location_type, LocationId id, int model_id)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd stay consistent and always call it activity_type (check also other functions).

Suggested change
void Person::set_location(ActivityType type, LocationType location_type, LocationId id, int model_id)
void Person::set_location(ActivityType activity_type, LocationType location_type, LocationId id, int model_id)

Comment thread cpp/models/abm/person.cpp Outdated
m_location = id;
m_location_type = type;
m_location_type = location_type;
m_activity_type = type;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_activity_type = type;
m_activity_type = activity_type;

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 94.40000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.47%. Comparing base (52329fe) to head (f209fc1).

Files with missing lines Patch % Lines
cpp/models/abm/common_abm_loggers.h 30.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1548      +/-   ##
==========================================
- Coverage   97.48%   97.47%   -0.02%     
==========================================
  Files         190      190              
  Lines       16030    16040      +10     
==========================================
+ Hits        15627    15635       +8     
- Misses        403      405       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable mutiple types for the same location and assignment of multiple locations of one type

2 participants