Repository navigation
Conversation
… activity type Mobility rules can return an ActivityType for which the person has no assigned location (e.g. no workplace), which made get_assigned_location access an empty vector out of bounds. Add Person::has_assigned_location and skip the rule in Model and GraphABModel if no location is assigned. Also size m_assigned_location_model_ids by ActivityType::Count.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1613 +/- ##
==========================================
- Coverage 97.52% 97.51% -0.01%
==========================================
Files 190 190
Lines 16104 16111 +7
==========================================
+ Hits 15705 15711 +6
- Misses 399 400 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
Person::has_assigned_location(ActivityType).try_mobility_ruleinModel::perform_mobilityandGraphABModel::perform_mobilityreturnsfalse(person stays) if the person has no assigned location of the requestedActivityType, instead of accessing an empty vector out of bounds.Person::get_assigned_locationasserts that a location of the requested type is assigned.m_assigned_location_model_idsis now sized withActivityType::Countinstead ofLocationType::Count.TestModel.mobilityWithMissingAssignedLocations.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
Checks by code reviewer(s)
Closes #1612