Skip to content

feat: Network Propagation Epidemiology Tool#655

Open
fderuiter wants to merge 1 commit intomainfrom
feat/epidemiology-network-propagation-14582420259585349310
Open

feat: Network Propagation Epidemiology Tool#655
fderuiter wants to merge 1 commit intomainfrom
feat/epidemiology-network-propagation-14582420259585349310

Conversation

@fderuiter
Copy link
Owner

This commit adds the Network Propagation tool to the Epidemiology tab in the math_explorer_gui. It calculates the R0 value for heterogeneous networks and uses egui::Painter to visually render an abstraction of a disease spreading through a node network.


PR created automatically by Jules for task 14582420259585349310 started by @fderuiter

- Implements `NetworkPropagationTool` using the `EpidemiologyTool` trait.
- Uses math backend `heterogeneous_r0` to calculate reproduction number.
- Exposes UI sliders for parameters (beta, gamma, mean_degree, variance).
- Uses `egui::Painter` to render a fixed circular network graph.
- Updates `todo_gui.md` marking the feature as completed.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@fderuiter fderuiter marked this pull request as ready for review March 19, 2026 00:01
Copilot AI review requested due to automatic review settings March 19, 2026 00:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Network Propagation” sub-tool to the Epidemiology tab in math_explorer_gui, using math_explorer::epidemiology::networks::heterogeneous_r0 to compute an R0 value and egui::Painter to draw a simple network visualization.

Changes:

  • Introduces NetworkPropagationTool UI with sliders for β, γ, mean degree, and degree variance, plus an R0 readout and basic network rendering.
  • Registers the new tool in the Epidemiology tab’s tool list.
  • Marks the “Network Propagation” roadmap item as completed.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
todo_gui.md Marks Network Propagation feature as implemented in the roadmap.
math_explorer_gui/src/tabs/epidemiology/network.rs New tool implementation: parameters, R0 calculation, and painter-based visualization.
math_explorer_gui/src/tabs/epidemiology/mod.rs Adds the network module and includes the new tool in the selector list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +81 to +85
.add(egui::Slider::new(&mut self.mean_degree, 0.1..=10.0).text("Mean Degree <k>"))
.changed();
changed |= ui
.add(egui::Slider::new(&mut self.degree_variance, 0.0..=10.0).text("Degree Variance Var(k)"))
.changed();
Comment on lines +15 to +18
num_nodes: usize,
positions: Vec<[f32; 2]>,
edges: Vec<(usize, usize)>,
}
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