langgoap.MaxWallClockPolicy#
- class MaxWallClockPolicy(seconds, name='MaxWallClockPolicy')[source]#
Terminate after
secondsof wall-clock time since the run started.Reads
state['wall_clock_started_at'], the epoch timestamp (time.time()) the planner stores on its first invocation (seeGoapPlanner). Epoch seconds survive a checkpoint resume in another process, which atime.monotonic()reading would not (issue #50). Until the planner has set the anchor the policy returnsNone; construction time is intentionally not the start anchor so a long-livedGoapGraphdoes not bleed wall-clock between runs.- Parameters:
seconds (float)
name (str)
- __init__(seconds, name='MaxWallClockPolicy')#
- Parameters:
seconds (float)
name (str)
- Return type:
None
Methods
__init__(seconds[, name])should_terminate(state)Attributes
secondsname