parameters

parameters

Set the parameters for hpvsim.

Functions

Name Description
make_pars Create the parameters for the simulation. Typically, this function is used
reset_layer_pars Helper function to set layer-specific parameters. If layer keys are not provided,

make_pars

parameters.make_pars(**kwargs)

Create the parameters for the simulation. Typically, this function is used internally rather than called by the user; e.g. typical use would be to do sim = hpv.Sim() and then inspect sim.pars, rather than calling this function directly.

Parameters

Name Type Description Default
version str if supplied, use parameters from this version required
kwargs dict any additional kwargs are interpreted as parameter names {}

Returns

Name Type Description
pars dict the parameters of the simulation

reset_layer_pars

parameters.reset_layer_pars(pars, layer_keys=None, force=False)

Helper function to set layer-specific parameters. If layer keys are not provided, then set them based on the population type. This function is not usually called directly by the user, although it can sometimes be used to fix layer key mismatches (i.e. if the contact layers in the population do not match the parameters). More commonly, however, mismatches need to be fixed explicitly.

Parameters

Name Type Description Default
pars dict the parameters dictionary required
layer_keys list the layer keys of the population, if available None
force bool reset the parameters even if they already exist False