treat_num#

class treat_num(max_capacity=None, **kwargs)[source]#

Bases: BaseTreatment

Treat a fixed number of people each timestep.

Parameters:

max_capacity (int) – maximum number who can be treated each timestep

Attributes

has_product

Check if the intervention has a product

now

Shortcut to self.t.now()

states

Return a flat list of all states

statesdict

Return a flat dictionary (objdict) of all states

ti

Get the current module timestep

timevec

Shortcut to self.t.timevec

Methods

add_to_queue()[source]#

Add people who are willing to accept treatment to the queue

get_candidates()[source]#

Get the indices of people who are candidates for treatment

step()[source]#

Apply treatment. On each timestep, this method will add eligible people who are willing to accept treatment to a queue, and then will treat as many people in the queue as there is capacity for.