Skip to content

Comments

Add simple binary utility for contact-rate policy tradeoff#1

Open
gvegayon wants to merge 2 commits intomainfrom
codex/create-utility-function-for-government-regulation-model
Open

Add simple binary utility for contact-rate policy tradeoff#1
gvegayon wants to merge 2 commits intomainfrom
codex/create-utility-function-for-government-regulation-model

Conversation

@gvegayon
Copy link
Member

Motivation

  • Expose a concrete, optimization-ready utility that encodes the tradeoff between economic activity (contacts) and transmission risk for binary group policies.
  • Replace the placeholder utility with a simple, solver-agnostic evaluator that can be used by downstream optimizers or search routines.

Description

  • Add tunable weights economic_weight and health_weight to ABM and implement ABM::evaluate_policy_utility(const std::vector<int>&) to evaluate binary policies (0 = no reduction, 1 = reduced contacts).
  • Implement utility as economic_weight * average_contact_multiplier - health_weight * (p_t * c_eff * i * (1-i)), where c_eff is the effective contact rate and i is infected share, and validate policy length/entries with std::invalid_argument.
  • Fix Group::sample_infected() contact-rate application so reduced-contact groups use the reduction multiplier, update m_calc_utility() to construct current policy and call evaluate_policy_utility(), and add necessary headers (<numeric>, <stdexcept>).
  • Add documentation artifacts: a ready-to-post issue draft (docs/utility-function-issue.md), a proposal with literature context (docs/utility-function-proposal.md), and a short README note pointing to ABM::evaluate_policy_utility.

Testing

  • Built the project with make main.o, which completed successfully.
  • Ran the model with ./main.o and confirmed it executed and produced the epidemic curve output (run completed successfully).
  • Created the in-repo issue draft because the GitHub CLI is not available in the environment, so the issue content is in docs/utility-function-issue.md (manual posting required).

Codex Task

Updated mathematical notation for clarity and consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant