diff --git a/404.html b/404.html index 05f7214..ba3fbcf 100644 --- a/404.html +++ b/404.html @@ -25,7 +25,7 @@ - +
@@ -51,7 +51,7 @@
- +
@@ -122,16 +122,16 @@

Page not found (404)

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/LICENSE-text.html b/LICENSE-text.html index 62f6212..04a38eb 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -90,15 +90,15 @@

License

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/LICENSE.html b/LICENSE.html index 62b2fcc..41c0594 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -94,15 +94,15 @@

MIT License

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/API.html b/articles/API.html index cf10c2d..2246ad1 100644 --- a/articles/API.html +++ b/articles/API.html @@ -18,15 +18,13 @@ - - - +
@@ -52,7 +50,7 @@
- +
@@ -103,7 +101,7 @@

API

- Source: vignettes/API.Rmd + Source: vignettes/API.Rmd
@@ -407,9 +405,7 @@

Simulate +

@@ -422,16 +418,16 @@

Simulate

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/Changing_Populations.html b/articles/Changing_Populations.html index 14f5bc1..871c25b 100644 --- a/articles/Changing_Populations.html +++ b/articles/Changing_Populations.html @@ -18,15 +18,13 @@ - - - +
@@ -52,7 +50,7 @@
- +
@@ -103,7 +101,7 @@

Changing population

- Source: vignettes/Changing_Populations.Rmd + Source: vignettes/Changing_Populations.Rmd
@@ -193,9 +191,7 @@

Simulation - -

+ @@ -208,16 +204,16 @@

Simulation

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/Checkpoint.html b/articles/Checkpoint.html index 2e02abd..ff6ad11 100644 --- a/articles/Checkpoint.html +++ b/articles/Checkpoint.html @@ -18,15 +18,13 @@ - - - +
@@ -52,7 +50,7 @@
- +
@@ -103,7 +101,7 @@

Saving and restoring simulation state

- Source: vignettes/Checkpoint.Rmd + Source: vignettes/Checkpoint.Rmd
@@ -537,9 +535,7 @@

Saving and restoring events - -

+ @@ -552,16 +548,16 @@

Saving and restoring events

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/Contributing.html b/articles/Contributing.html index 7108230..c7f0998 100644 --- a/articles/Contributing.html +++ b/articles/Contributing.html @@ -18,15 +18,13 @@ - - - +
@@ -52,7 +50,7 @@
- +
@@ -103,7 +101,7 @@

Contributing

- Source: vignettes/Contributing.Rmd + Source: vignettes/Contributing.Rmd
@@ -216,9 +214,7 @@

Wishlist - -

+ @@ -231,16 +227,16 @@

Wishlist

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/Performance.html b/articles/Performance.html index 80d9274..ea7184f 100644 --- a/articles/Performance.html +++ b/articles/Performance.html @@ -18,15 +18,13 @@ - - - +
@@ -52,7 +50,7 @@
- +
@@ -103,7 +101,7 @@

Performance

- Source: vignettes/Performance.Rmd + Source: vignettes/Performance.Rmd
@@ -194,8 +192,8 @@

Bitset keep <- probs >= 0.5 -stay <- filter_bitset(bitset = bset,other = which(keep)) -leave <- filter_bitset(bitset = bset,other = which(!keep))

+stay <- filter_bitset(bitset = bset, other = keep) +leave <- filter_bitset(bitset = bset, other = !keep)

This pattern is almost always slower than using the sample method with a set difference:

@@ -364,9 +362,7 @@ 

C++ Prefabs - -

+ @@ -379,16 +375,16 @@

C++ Prefabs

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/Tutorial.html b/articles/Tutorial.html index 3a0eabc..d22ade8 100644 --- a/articles/Tutorial.html +++ b/articles/Tutorial.html @@ -18,15 +18,13 @@ - - - +
@@ -52,7 +50,7 @@
- +
@@ -103,7 +101,7 @@

Tutorial

- Source: vignettes/Tutorial.Rmd + Source: vignettes/Tutorial.Rmd
@@ -124,15 +122,20 @@

SpecificationTo start, we should define some constants. The epidemic will be simulated in a population of 1000, where 5 persons are initially infectious, whose indices are randomly sampled. The effective contact -rate \(\beta\) will be a function of -the deterministic \(R_{0}\) and -recovery rate \(\gamma\). We also -specify dt, which is the size of the time step \((\Delta t)\). Because individual’s time -steps are all of unit length, we scale transition probabilities by -dt to create models with different sized steps, -interpreting the discrete time model as a discretization of a continuous -time model. If the maximum time is tmax then the overall -number of time steps is tmax/dt.

+rate +β\beta +will be a function of the deterministic +R0R_{0} +and recovery rate +γ\gamma. +We also specify dt, which is the size of the time step +(Δt)(\Delta t). +Because individual’s time steps are all of unit length, we scale +transition probabilities by dt to create models with +different sized steps, interpreting the discrete time model as a +discretization of a continuous time model. If the maximum time is +tmax then the overall number of time steps is +tmax/dt.

 N <- 1e3
 I0 <- 5
@@ -159,11 +162,14 @@ 

Processes step (unused here, but can model time-dependent processes, such as seasonality or school holiday). Within the function, we get the current number of infectious individuals, then calculate the per-capita -force of infection on each susceptible person, \(\lambda = \beta I/N\). Next we get a -individual::Bitset containing those susceptible individuals -and use the sample method to randomly select those who will -be infected on this time step. The probability is given by \(1 - e^{-\lambda\Delta t}\). This is the -same as the CDF of an exponential random variate so we use +force of infection on each susceptible person, +λ=βI/N\lambda = \beta I/N. +Next we get a individual::Bitset containing those +susceptible individuals and use the sample method to +randomly select those who will be infected on this time step. The +probability is given by +1eλΔt1 - e^{-\lambda\Delta t}. +This is the same as the CDF of an exponential random variate so we use stats::pexp to compute that quantity. Finally, we queue a state update for those individuals who were sampled.

@@ -199,12 +205,13 @@ 

Events intersection of already infectious persons with persons who have not been scheduled, precisely those who need to have recovery times sampled and recoveries scheduled. We sample those times from -stats::rgeom, where the probability for recovery is \(1-e^{-\gamma \Delta t}\). Note that we add -one to the resulting vector, because by default R uses a “number of -failures” parameterization rather than “number of trials”, meaning it -would be possible for an individual to be infectious for 0 time steps -without the correction. Finally we schedule the recovery using the -recovery event object.

+stats::rgeom, where the probability for recovery is +1eγΔt1-e^{-\gamma \Delta t}. +Note that we add one to the resulting vector, because by default R uses +a “number of failures” parameterization rather than “number of trials”, +meaning it would be possible for an individual to be infectious for 0 +time steps without the correction. Finally we schedule the recovery +using the recovery event object.

We note at this point would be possible to queue the recovery event at the same time the infection state update was made, but we separate event and process for illustration of how the package works.

@@ -266,9 +273,7 @@

Simulation +

@@ -281,16 +286,16 @@

Simulation

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/index.html b/articles/index.html index 1597ef0..33da118 100644 --- a/articles/index.html +++ b/articles/index.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -97,15 +97,15 @@

All vignettes

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/authors.html b/authors.html index 7229991..c2c83ed 100644 --- a/authors.html +++ b/authors.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -72,7 +72,7 @@

Authors and Citation

- +
  • Giovanni Charles. Author, maintainer.

    @@ -90,14 +90,14 @@

    Authors and Citation

  • -

    Imperial College of Science, Technology and Medicine. Copyright holder. +

    Imperial College of Science, Technology and Medicine. Copyright holder.

Citation

- Source: inst/CITATION + Source: inst/CITATION
@@ -127,15 +127,15 @@

Citation

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/index.html b/index.html index 3a9981a..9c634ec 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ - +
@@ -52,7 +52,7 @@
- +
@@ -281,16 +281,16 @@

Dev status

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/news/index.html b/news/index.html index e6f6db8..35342e7 100644 --- a/news/index.html +++ b/news/index.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
+
+ +
  • Add a copy_from method to the Bitset class.
  • +
  • Improve performance of bitset operations by making num_bits a compile-time constant expression.
  • +
  • Support vectors of logicals as an argument to filter_bitset.
  • +
  • Allow processes to be named, in order to produce more useful call stacks.
  • +
  • Allow events and variables to be added and removed when restoring the simulation.
  • @@ -139,7 +146,7 @@
-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/pkgdown.yml b/pkgdown.yml index baf1984..42fda47 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,5 +1,5 @@ pandoc: 3.1.11 -pkgdown: 2.0.8 +pkgdown: 2.1.0 pkgdown_sha: ~ articles: API: API.html @@ -8,5 +8,4 @@ articles: Contributing: Contributing.html Performance: Performance.html Tutorial: Tutorial.html -last_built: 2024-04-16T12:50Z - +last_built: 2024-07-18T16:23Z diff --git a/reference/Bitset.html b/reference/Bitset.html index 22baa14..39aeb43 100644 --- a/reference/Bitset.html +++ b/reference/Bitset.html @@ -10,7 +10,7 @@ - +
@@ -35,7 +35,7 @@
- +
@@ -294,17 +294,38 @@

Arguments

Method copy()

-

returns a copy of the bitset.

+

returns a copy of the bitset.

+

In cases where a destination bitset already exists, it may be more +performant to use the copy_from method instead.

Usage

b$copy()
+


+

Method copy_from()

+

overwrite the value of the bitset from another bitset.

+

This is similar to calling other$copy(), but can be more +efficient by reusing the resources of the existing bitset.

+

Usage

+ +
b$copy_from(other)
+ +
+
+

Arguments

+ +
other
+

the other bitset.

+ + +
+


Method to_vector()

return an integer vector of the elements stored in this bitset.

-

Usage

+

Usage

b$to_vector()
@@ -326,15 +347,15 @@

Usage
-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/CategoricalVariable.html b/reference/CategoricalVariable.html index 74c6fb3..95c4161 100644 --- a/reference/CategoricalVariable.html +++ b/reference/CategoricalVariable.html @@ -7,7 +7,7 @@ - +
@@ -32,7 +32,7 @@

- +
@@ -88,7 +88,7 @@

CategoricalVariable Class

Methods

- +

Public methods

@@ -313,15 +313,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/DoubleVariable.html b/reference/DoubleVariable.html index b93fa55..893a200 100644 --- a/reference/DoubleVariable.html +++ b/reference/DoubleVariable.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -80,7 +80,7 @@

DoubleVariable Class

Methods

- +

Public methods

@@ -330,15 +330,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/Event.html b/reference/Event.html index 85a8072..56653e0 100644 --- a/reference/Event.html +++ b/reference/Event.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -84,7 +84,7 @@

Super class

Methods

- +

Public methods

@@ -235,15 +235,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/EventBase.html b/reference/EventBase.html index d856610..6389963 100644 --- a/reference/EventBase.html +++ b/reference/EventBase.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -80,7 +80,7 @@

EventBase Class

Methods

- +

Public methods

@@ -165,15 +165,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/IntegerVariable.html b/reference/IntegerVariable.html index d55534b..6e1437d 100644 --- a/reference/IntegerVariable.html +++ b/reference/IntegerVariable.html @@ -7,7 +7,7 @@ - +
@@ -32,7 +32,7 @@
- +
@@ -88,7 +88,7 @@

IntegerVariable Class

Methods

- +

Public methods

@@ -350,15 +350,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/RaggedDouble.html b/reference/RaggedDouble.html index 185cdcc..e297afe 100644 --- a/reference/RaggedDouble.html +++ b/reference/RaggedDouble.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -80,7 +80,7 @@

RaggedDouble Class

Methods

- +

Public methods

@@ -305,15 +305,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/RaggedInteger.html b/reference/RaggedInteger.html index b86f542..945cd33 100644 --- a/reference/RaggedInteger.html +++ b/reference/RaggedInteger.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -80,7 +80,7 @@

RaggedInteger Class

Methods

- +

Public methods

@@ -305,15 +305,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/Render.html b/reference/Render.html index e2c00f4..615504e 100644 --- a/reference/Render.html +++ b/reference/Render.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -80,7 +80,7 @@

Render

Methods

- +

Public methods

@@ -191,15 +191,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/TargetedEvent.html b/reference/TargetedEvent.html index 7b906ff..88088e6 100644 --- a/reference/TargetedEvent.html +++ b/reference/TargetedEvent.html @@ -4,7 +4,7 @@ - +
@@ -29,7 +29,7 @@
- +
@@ -86,7 +86,7 @@

Super class

Methods

- +

Public methods

@@ -309,15 +309,15 @@

Arguments -

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/bernoulli_process.html b/reference/bernoulli_process.html index 094a0bf..2cee82d 100644 --- a/reference/bernoulli_process.html +++ b/reference/bernoulli_process.html @@ -4,7 +4,7 @@ - +
@@ -29,7 +29,7 @@
- +
@@ -85,27 +85,27 @@

Bernoulli process

Arguments

-
variable
+ + +
variable

a categorical variable.

-
from
+
from

a string representing the source category.

-
to
+
to

a string representing the destination category.

-
rate
+
rate

the probability to move individuals between categories.

Value

- - -

a function which can be passed as a process to simulation_loop.

+

a function which can be passed as a process to simulation_loop.

@@ -120,15 +120,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/categorical_count_renderer_process.html b/reference/categorical_count_renderer_process.html index dd3fdd2..37ccf22 100644 --- a/reference/categorical_count_renderer_process.html +++ b/reference/categorical_count_renderer_process.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -83,23 +83,23 @@

Render Categories

Arguments

-
renderer
+ + +
renderer

a Render object.

-
variable
+
variable

a CategoricalVariable object.

-
categories
+
categories

a character vector of categories to render.

Value

- - -

a function which can be passed as a process to simulation_loop.

+

a function which can be passed as a process to simulation_loop.

@@ -114,15 +114,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/filter_bitset.html b/reference/filter_bitset.html index 2afc760..5470dcd 100644 --- a/reference/filter_bitset.html +++ b/reference/filter_bitset.html @@ -2,14 +2,15 @@ Filter a bitset — filter_bitset • individual - +
@@ -34,7 +35,7 @@
- +

This non-modifying function returns a new Bitset object of the same maximum size as the original but which only contains -those values at the indices specified by the argument other. -Indices in other may be specified either as a vector of integers or as -another bitset. Please note that filtering by another bitset is not a -"bitwise and" intersection, and will have the same behavior as providing -an equivalent vector of integer indices.

+those values at the indices specified by the argument other.

+

Indices in other may be specified either as a vector of logicals, a +vector of integers or as another bitset. If a vector of logicals is +specified, it must be of the same size as the bitset. Please note that +filtering by another bitset is not a "bitwise and" intersection, and will +have the same behavior as providing an equivalent vector of integer indices.

@@ -95,12 +97,15 @@

Filter a bitset

Arguments

-
bitset
+ + +
bitset

the Bitset to filter

-
other
-

the values to keep (may be a vector of intergers or another Bitset)

+
other
+

the values to keep (may be a vector of integers, logicals, or +another Bitset)

@@ -116,15 +121,15 @@

Arguments

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/fixed_probability_multinomial_process.html b/reference/fixed_probability_multinomial_process.html index 9e65958..1750b06 100644 --- a/reference/fixed_probability_multinomial_process.html +++ b/reference/fixed_probability_multinomial_process.html @@ -6,7 +6,7 @@ - +
@@ -31,7 +31,7 @@
- +
@@ -95,31 +95,31 @@

Multinomial process

Arguments

-
variable
+ + +
variable

a CategoricalVariable object.

-
source_state
+
source_state

a string representing the source state.

-
destination_states
+
destination_states

a vector of strings representing the destination states.

-
rate
+
rate

probability of individuals in source state to leave.

-
destination_probabilities
+
destination_probabilities

probability vector of destination states.

Value

- - -

a function which can be passed as a process to simulation_loop.

+

a function which can be passed as a process to simulation_loop.

@@ -134,15 +134,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/index.html b/reference/index.html index 81aec84..178a86d 100644 --- a/reference/index.html +++ b/reference/index.html @@ -1,9 +1,9 @@ -Function reference • individualPackage index • individual - +
@@ -28,7 +28,7 @@
- +
@@ -196,15 +196,15 @@

Simulation
-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/infection_age_process.html b/reference/infection_age_process.html index 933d946..1147717 100644 --- a/reference/infection_age_process.html +++ b/reference/infection_age_process.html @@ -9,7 +9,7 @@ - +
@@ -34,7 +34,7 @@
- +
@@ -105,47 +105,47 @@

Infection process for age-structured models

Arguments

-
state
+ + +
state

a CategoricalVariable object.

-
susceptible
+
susceptible

a string representing the susceptible state (usually "S").

-
exposed
+
exposed

a string representing the state new infections go to (usually "E" or "I").

-
infectious
+
infectious

a string representing the infected and infectious state (usually "I").

-
age
+
age

a IntegerVariable giving the age of each individual.

-
age_bins
+
age_bins

the total number of age bins (groups).

-
p
+
p

the probability of infection given a contact.

-
dt
+
dt

the size of the time step (in units relative to the contact rates in mixing).

-
mixing
+
mixing

a mixing (contact) matrix between age groups.

Value

- - -

a function which can be passed as a process to simulation_loop.

+

a function which can be passed as a process to simulation_loop.

@@ -160,15 +160,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/multi_probability_bernoulli_process.html b/reference/multi_probability_bernoulli_process.html index aeac95e..b9fb1e9 100644 --- a/reference/multi_probability_bernoulli_process.html +++ b/reference/multi_probability_bernoulli_process.html @@ -7,7 +7,7 @@ - +
@@ -32,7 +32,7 @@
- +
@@ -91,27 +91,27 @@

Overdispersed Bernoulli process

Arguments

-
variable
+ + +
variable

a CategoricalVariable object.

-
from
+
from

a string representing the source state.

-
to
+
to

a string representing the destination state.

-
rate_variable
+
rate_variable

DoubleVariable giving individual probability of each individual in source state to leave.

Value

- - -

a function which can be passed as a process to simulation_loop.

+

a function which can be passed as a process to simulation_loop.

@@ -126,15 +126,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/multi_probability_multinomial_process.html b/reference/multi_probability_multinomial_process.html index 553c8ac..8f81121 100644 --- a/reference/multi_probability_multinomial_process.html +++ b/reference/multi_probability_multinomial_process.html @@ -7,7 +7,7 @@ - +
@@ -32,7 +32,7 @@
- +
@@ -97,31 +97,31 @@

Overdispersed multinomial process

Arguments

-
variable
+ + +
variable

a CategoricalVariable object.

-
source_state
+
source_state

a string representing the source state.

-
destination_states
+
destination_states

a vector of strings representing the destination states.

-
rate_variable
+
rate_variable

DoubleVariable giving individual probability of each individual in source state to leave

-
destination_probabilities
+
destination_probabilities

probability vector of destination states.

Value

- - -

a function which can be passed as a process to simulation_loop.

+

a function which can be passed as a process to simulation_loop.

@@ -136,15 +136,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/reschedule_listener.html b/reference/reschedule_listener.html index 351ef1e..284aa5a 100644 --- a/reference/reschedule_listener.html +++ b/reference/reschedule_listener.html @@ -4,7 +4,7 @@ - +
@@ -29,7 +29,7 @@
- +
@@ -85,11 +85,13 @@

Reschedule listener

Arguments

-
event
+ + +
event

a TargetedEvent.

-
delay
+
delay

the delay until the follow-up event.

@@ -106,15 +108,15 @@

Arguments

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/restore_object_state.html b/reference/restore_object_state.html index a0849ce..4f89d84 100644 --- a/reference/restore_object_state.html +++ b/reference/restore_object_state.html @@ -5,11 +5,13 @@ If the list of object is named, more objects may be specified than were originally present in the saved simulation, allowing a simulation to be extended with more features upon resuming. In this case, the -restore_state method is called with a NULL argument."> - +
@@ -34,7 +36,7 @@
- +
@@ -86,7 +88,9 @@

Restore the state of simulation objects.

If the list of object is named, more objects may be specified than were originally present in the saved simulation, allowing a simulation to be extended with more features upon resuming. In this case, the -restore_state method is called with a NULL argument.

+restore_state method of the new objects is called with a NULL +argument. Conversly, the list of objects may omit certain entries, in which +case their state to be restored is ignored.

@@ -95,16 +99,18 @@

Restore the state of simulation objects.

Arguments

-
timesteps
+ + +
timesteps

the number of time steps that have already been simulated

-
objects
+
objects

a simulation object (eg. a variable or event) or an arbitrarily nested list structure of such objects.

-
state
+
state

a saved simulation state for the given objects, as returned by save_object_state. This should have the same shape as the objects argument: if a list of objects is given, then @@ -126,15 +132,15 @@

Arguments

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/restore_simulation_state.html b/reference/restore_simulation_state.html index ebeaedc..75c37ce 100644 --- a/reference/restore_simulation_state.html +++ b/reference/restore_simulation_state.html @@ -5,7 +5,7 @@ - +
@@ -30,7 +30,7 @@
- +
@@ -87,29 +87,29 @@

Restore the simulation state

Arguments

-
state
+ + +
state

the simulation state to restore, as returned by save_simulation_state.

-
variables
+
variables

the list of Variables

-
events
+
events

the list of Events

-
restore_random_state
+
restore_random_state

if TRUE, restore R's global random number generator's state from the checkpoint.

Value

- - -

the time step at which the simulation should resume.

+

the time step at which the simulation should resume.

@@ -124,15 +124,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/save_object_state.html b/reference/save_object_state.html index 511c2ac..01d9e2e 100644 --- a/reference/save_object_state.html +++ b/reference/save_object_state.html @@ -3,7 +3,7 @@ - +
@@ -28,7 +28,7 @@
- +
@@ -83,16 +83,16 @@

Save the state of a simulation object or set of objects.

Arguments

-
objects
+ + +
objects

a simulation object (eg. a variable or event) or an arbitrarily nested list structure of such objects.

Value

- - -

the saved states of the objects. This has the same shape as the given +

the saved states of the objects. This has the same shape as the given objects: if a list was passed as an argument, this returns the corresponding list of saved states. If a singular object was passed, this returns just that particular object's state.

@@ -110,15 +110,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/save_simulation_state.html b/reference/save_simulation_state.html index 80e802c..a5c52e6 100644 --- a/reference/save_simulation_state.html +++ b/reference/save_simulation_state.html @@ -4,7 +4,7 @@ - +
@@ -29,7 +29,7 @@
- +
@@ -85,23 +85,23 @@

Save the simulation state

Arguments

-
timesteps
+ + +
timesteps

the number of time steps that have already been simulated

-
variables
+
variables

the list of Variables

-
events
+
events

the list of Events

Value

- - -

the saved simulation state.

+

the saved simulation state.

@@ -116,15 +116,15 @@

Value

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/simulation_loop.html b/reference/simulation_loop.html index ab44990..32f5b1a 100644 --- a/reference/simulation_loop.html +++ b/reference/simulation_loop.html @@ -4,7 +4,7 @@ - +
@@ -29,7 +29,7 @@
- +
@@ -92,35 +92,35 @@

A premade simulation loop

Arguments

-
variables
+ + +
variables

a list of Variables

-
events
+
events

a list of Events

-
processes
+
processes

a list of processes to execute on each timestep

-
timesteps
+
timesteps

the end timestep of the simulation. If state is not NULL, timesteps must be greater than state$timestep

-
state
+
state

a checkpoint from which to resume the simulation

-
restore_random_state
+
restore_random_state

if TRUE, restore R's global random number generator's state from the checkpoint.

Value

- - -

Invisibly, the saved state at the end of the simulation, suitable for later resuming.

+

Invisibly, the saved state at the end of the simulation, suitable for later resuming.

@@ -169,15 +169,15 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/update_category_listener.html b/reference/update_category_listener.html index 41c1e92..939af94 100644 --- a/reference/update_category_listener.html +++ b/reference/update_category_listener.html @@ -5,7 +5,7 @@ - +
@@ -30,7 +30,7 @@
- +
@@ -87,11 +87,13 @@

Update category listener

Arguments

-
variable
+ + +
variable

a CategoricalVariable object.

-
to
+
to

a string representing the destination category.

@@ -108,15 +110,15 @@

Arguments

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/sitemap.xml b/sitemap.xml index 96e4d12..d925981 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,117 +1,41 @@ - - - - /404.html - - - /LICENSE-text.html - - - /LICENSE.html - - - /articles/API.html - - - /articles/Changing_Populations.html - - - /articles/Checkpoint.html - - - /articles/Contributing.html - - - /articles/Performance.html - - - /articles/Tutorial.html - - - /articles/index.html - - - /authors.html - - - /index.html - - - /news/index.html - - - /reference/Bitset.html - - - /reference/CategoricalVariable.html - - - /reference/DoubleVariable.html - - - /reference/Event.html - - - /reference/EventBase.html - - - /reference/IntegerVariable.html - - - /reference/RaggedDouble.html - - - /reference/RaggedInteger.html - - - /reference/Render.html - - - /reference/TargetedEvent.html - - - /reference/bernoulli_process.html - - - /reference/categorical_count_renderer_process.html - - - /reference/filter_bitset.html - - - /reference/fixed_probability_multinomial_process.html - - - /reference/index.html - - - /reference/infection_age_process.html - - - /reference/multi_probability_bernoulli_process.html - - - /reference/multi_probability_multinomial_process.html - - - /reference/reschedule_listener.html - - - /reference/restore_object_state.html - - - /reference/restore_simulation_state.html - - - /reference/save_object_state.html - - - /reference/save_simulation_state.html - - - /reference/simulation_loop.html - - - /reference/update_category_listener.html - + +/404.html +/LICENSE-text.html +/LICENSE.html +/articles/API.html +/articles/Changing_Populations.html +/articles/Checkpoint.html +/articles/Contributing.html +/articles/Performance.html +/articles/Tutorial.html +/articles/index.html +/authors.html +/index.html +/news/index.html +/reference/Bitset.html +/reference/CategoricalVariable.html +/reference/DoubleVariable.html +/reference/Event.html +/reference/EventBase.html +/reference/IntegerVariable.html +/reference/RaggedDouble.html +/reference/RaggedInteger.html +/reference/Render.html +/reference/TargetedEvent.html +/reference/bernoulli_process.html +/reference/categorical_count_renderer_process.html +/reference/filter_bitset.html +/reference/fixed_probability_multinomial_process.html +/reference/index.html +/reference/infection_age_process.html +/reference/multi_probability_bernoulli_process.html +/reference/multi_probability_multinomial_process.html +/reference/reschedule_listener.html +/reference/restore_object_state.html +/reference/restore_simulation_state.html +/reference/save_object_state.html +/reference/save_simulation_state.html +/reference/simulation_loop.html +/reference/update_category_listener.html +