Add simple binary utility for contact-rate policy tradeoff#1
Open
Add simple binary utility for contact-rate policy tradeoff#1
Conversation
Updated mathematical notation for clarity and consistency.
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.
Motivation
Description
economic_weightandhealth_weighttoABMand implementABM::evaluate_policy_utility(const std::vector<int>&)to evaluate binary policies (0= no reduction,1= reduced contacts).economic_weight * average_contact_multiplier - health_weight * (p_t * c_eff * i * (1-i)), wherec_effis the effective contact rate andiis infected share, and validate policy length/entries withstd::invalid_argument.Group::sample_infected()contact-rate application so reduced-contact groups use the reduction multiplier, updatem_calc_utility()to construct current policy and callevaluate_policy_utility(), and add necessary headers (<numeric>,<stdexcept>).docs/utility-function-issue.md), a proposal with literature context (docs/utility-function-proposal.md), and a short README note pointing toABM::evaluate_policy_utility.Testing
make main.o, which completed successfully../main.oand confirmed it executed and produced the epidemic curve output (run completed successfully).docs/utility-function-issue.md(manual posting required).Codex Task