Tracers#

The policyengine_core.tracers module contains classes used to represent tracers, which are used to track the computation involved in calculating variables.

ComputationLog#

class policyengine_core.tracers.computation_log.ComputationLog(full_tracer: FullTracer)[source]#

Bases: object

print_log(aggregate=False, max_depth=100) None[source]#

Print the computation log of a simulation.

If aggregate is False (default), print the value of each computed vector.

If aggregate is True, only print the minimum, maximum, and average value of each computed vector.

This mode is more suited for simulations on a large population.

If max_depth is None (default), print the entire computation.

If max_depth is set, for example to 3, only print computed vectors up to a depth of max_depth.

FlatTrace#

class policyengine_core.tracers.flat_trace.FlatTrace(full_tracer: FullTracer)[source]#

Bases: object

FullTracer#

class policyengine_core.tracers.full_tracer.FullTracer[source]#

Bases: object

PerformanceLog#

class policyengine_core.tracers.performance_log.PerformanceLog(full_tracer: FullTracer)[source]#

Bases: object

SimpleTracer#

class policyengine_core.tracers.simple_tracer.SimpleTracer[source]#

Bases: object

TraceNode#

class policyengine_core.tracers.trace_node.TraceNode(name: 'str', period: 'str', branch_name: 'str' = 'default', parent: 'typing.Optional[TraceNode]' = None, children: 'typing.List[TraceNode]' = <factory>, parameters: 'typing.List[TraceNode]' = <factory>, value: 'typing.Optional[Array]' = None, start: 'float' = 0, end: 'float' = 0)[source]#

Bases: object

TracingParameterNodeAtInstant#

class policyengine_core.tracers.tracing_parameter_node_at_instant.TracingParameterNodeAtInstant(parameter_node_at_instant: ParameterNode, tracer: tracers.FullTracer, branch_name: str)[source]#

Bases: object