Skip to content

Commit

Permalink
Added minor edits just to make clippy happier.
Browse files Browse the repository at this point in the history
  • Loading branch information
CGMossa committed May 9, 2021
1 parent 1c666c7 commit c965569
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/disease_ecs_diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ use epi_bevy::{
sir_spread_model::{self, Infected, Susceptible},
};


/// Printing the disease states whenever invoked. These disease states corresponds
/// to [DiseaseCompartments].
#[allow(dead_code)]
fn print_population_disease_states_at_app_exit(
tick: Res<ScenarioTime>,
query: Query<(&Infected, &Susceptible)>,
Expand All @@ -28,6 +30,7 @@ fn print_population_disease_states_at_app_exit(

/// Print disease states if infected state every half a second;
#[deprecated(note = "please use run criteria to handle when systems are run.")]
#[allow(dead_code)]
fn log_every_half_second(
query: Query<(
&FarmId,
Expand All @@ -50,6 +53,7 @@ fn log_every_half_second(
}

/// Print disease states if infected state has changed.
#[allow(dead_code)]
fn log_changes_in_infected(
query: Query<
(
Expand Down
10 changes: 4 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ use bevy::{
log::LogPlugin,
};

use epi_bevy::between_herd_spread_model::print_between_herd_infection_events;
use epi_bevy::cattle_population::{FarmId, HerdSize};
use epi_bevy::cattle_population::FarmId;
use epi_bevy::scenario_time::ScenarioTime;
use epi_bevy::sir_spread_model::{
DiseaseCompartments, DiseaseParameters as WithinHerdDiseaseParameters,
Expand Down Expand Up @@ -154,16 +153,15 @@ fn main() {
//FIXME: this is currently unused
max_repetitions: 2,
})
// .insert_resource(WithinHerdDiseaseParameters::new(0.0013, 0.008333))
.insert_resource(WithinHerdDiseaseParameters::new(0.0013, 0.008333))
// .insert_resource(WithinHerdDiseaseParameters::new(0.0013, 0.008333))
//TODO: this block adds parameters, but what I'd ideally want is for the SceneConfiguration to add
// them. So is there such a thing as a Bundle of Resources?
.insert_resource(WithinHerdDiseaseParameters::new(0.003, 0.00001))
// .insert_resource(WithinHerdDiseaseParameters::new(0.003, 0.00001))
// .insert_resource(between_herd_spread_model::ContactRate::new(0.095))
.insert_resource(between_herd_spread_model::ContactRate::new(Rate::new(10.).unwrap()))

.insert_resource(DetectionRate::new(
Rate::try_from(Probability::new(0.0031).unwrap()).unwrap(),
Rate::try_from(Probability::new(0.00031).unwrap()).unwrap(),
))
.insert_resource(RemainingProportion::new(Probability::new(0.10).unwrap()))
// .insert_resource(DetectionRatePerAnimal(Rate::try_from(Probability::new(0.5).unwrap()).unwrap()))
Expand Down
1 change: 0 additions & 1 deletion src/regulator_active_surveillance/tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use rand::SeedableRng;

use super::*;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/repopulation_by_scaling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{

/// This is intermittently linked with the disease spread model on the within
/// herd part and thus couldn't really be updated without some knowledge
#[allow(dead_code)]
fn repopulate_rescale_disease_compartments(
mut query: Query<(&mut Susceptible, &mut Infected, &mut Recovered, &HerdSize)>,
) {
Expand Down

0 comments on commit c965569

Please sign in to comment.