andes.core.service.EventFlag#
- class andes.core.service.EventFlag(u, vtype: type | None = None, name: str | None = None, tex_name=None, info=None)[source]#
Service to flag events when the input value changes. The typical input is a v-provider with binary values.
Implemented by providing self.check(**kwargs) as v_numeric. EventFlag.v stores the values of the input variable in the most recent iteration/step.
After the evaluation of self.check(), self.v will be updated.
Methods
assign_memory(n)Assign memory for
self.vand set the array to zero.check(**kwargs)Check status and set event flags.
get_names()Return name in a list
restore_init()No-op: VarService is recomputed each step.
snapshot_init()No-op: VarService is recomputed each step.
Attributes
class_nameReturn the class name
nReturn the count of values in
self.v.