3
3
[ ![ Crates.io Version] ( https://img.shields.io/crates/v/virolution?style=for-the-badge )] ( https://crates.io/crates/virolution )
4
4
[ ![ docs.rs] ( https://img.shields.io/docsrs/virolution?style=for-the-badge )] ( https://docs.rs/virolution )
5
5
[ ![ GitHub Branch] ( https://img.shields.io/github/check-runs/sirno/virolution/main?style=for-the-badge )] ( https://github.com/sirno/virolution/actions )
6
+ <!-- cargo-rdme start -->
6
7
7
8
## Virolution - Agent-Based Simulation of Viral Evolution
8
9
@@ -66,18 +67,17 @@ parameters:
66
67
- [1.0, 0.0, 1.0, 1.0]
67
68
- [1.0, 1.0, 0.0, 1.0]
68
69
- [1.0, 1.0, 1.0, 0.0]
69
- host_fitness : !SingleHost
70
- reproductive :
71
- distribution : !Exponential
72
- weights :
73
- beneficial : 0.29
74
- deleterious : 0.51
75
- lethal : 0.2
76
- neutral : 0.0
77
- lambda_beneficial : 0.03
78
- lambda_deleterious : 0.21
79
- utility : !Algebraic
80
- upper : 1.5
70
+ host_model : !SingleHost
71
+ distribution : !Exponential
72
+ weights :
73
+ beneficial : 0.29
74
+ deleterious : 0.51
75
+ lethal : 0.2
76
+ neutral : 0.0
77
+ lambda_beneficial : 0.03
78
+ lambda_deleterious : 0.21
79
+ utility : !Algebraic
80
+ upper : 1.5
81
81
schedule :
82
82
- generation : " {} % 1"
83
83
event : transmission
@@ -101,8 +101,9 @@ between two compartments. The sample event will occur every 200 generations and
101
101
the current generation number and an event will be executed whenever the expression evaluates
102
102
to 0.
103
103
104
- There are more parameters and events that can be configured in the schedule. For more information
105
- on the configuration, see the [documentation](https://docs.rs/virolution/latest/virolution/config/index.html).
104
+ There are more parameters and events that can be configured in the schedule. For more
105
+ information on the configuration, see the
106
+ [documentation](https://docs.rs/virolution/latest/virolution/config/index.html).
106
107
107
108
When the simulation is complete (reached its maximum generation), the final population will be
108
109
stored in a file called `final.<i>.csv`, where `<i>` is the compartment number. The file will
@@ -120,8 +121,9 @@ and recombinants can be derived:
120
121
use std::sync::Arc;
121
122
122
123
use virolution::core::*;
123
- use virolution::core::fitness::init::*;
124
- use virolution::core::fitness::utility::*;
124
+ use virolution::init::fitness::*;
125
+ use virolution::core::fitness::UtilityFunction;
126
+ use virolution::providers::FitnessProvider;
125
127
use virolution::encoding::Nucleotide as Nt;
126
128
127
129
let sequence = vec![Nt::A; 4];
@@ -146,3 +148,4 @@ assert_eq!(mutant2.get_sequence(), vec![Nt::A, Nt::G, Nt::C, Nt::A]);
146
148
assert_eq!(recombinant.get_sequence(), vec![Nt::A, Nt::A, Nt::C, Nt::A]);
147
149
` ` `
148
150
151
+ <!-- cargo-rdme end -->
0 commit comments