Skip to content

Connecting itinerary manager to settings#115

Open
erik-rosenstrom wants to merge 1 commit intoetr-school-closure-draft-reactivefrom
etr-school-closure-draft-reactive-settings
Open

Connecting itinerary manager to settings#115
erik-rosenstrom wants to merge 1 commit intoetr-school-closure-draft-reactivefrom
etr-school-closure-draft-reactive-settings

Conversation

@erik-rosenstrom
Copy link
Copy Markdown
Collaborator

@erik-rosenstrom erik-rosenstrom commented May 5, 2026

This PR connects the registered itinerary modifiers to settings and the infection propagation loop. A context extension method is implemented for the itinerary manager that returns the itinerary ratios of a person's dominate itinerary modifier. If there are no itinerary modifiers registered the person default itinerary ratios are returned. This implementation does not modify persons itinerary ratios person properties.

Copy link
Copy Markdown
Collaborator

@confunguido confunguido left a comment

Choose a reason for hiding this comment

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

A few comments but also think this needs to wait until we modify the dominant itinerary approach.

Comment thread src/itinerary_manager.rs

}

pub fn init(context: &mut Context) -> Result<(), ModelError> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These itineraries look like a test. It's okay to leave them as part of the tests if we aren't ready to define some itinerary modifiers them right now.

Comment thread src/itinerary_manager.rs
self.get_itinerary_modifiers(person_id).into_iter().max()
}

fn get_dominant_itinerary_modifier_ratios(&self, person_id: PersonId) -> ItineraryRatios {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks like it will change when you incorporate a different approach for the itinerary modifiers.

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.

2 participants