MCPcopy Create free account
hub / github.com/caelan/pddlstream / timed_process

Method timed_process

pddlstream/algorithms/skeleton.py:402–413  ·  view source on GitHub ↗
(self, max_time=INF, max_iterations=INF)

Source from the content-addressed store, hash-verified

400 # TODO: increment the complexity level even more if nothing below in the queue
401
402 def timed_process(self, max_time=INF, max_iterations=INF):
403 # TODO: combine process methods into process_until
404 iterations = num_new = 0
405 if not self.is_active():
406 return num_new
407 print('Sampling for up to {:.3f} seconds'.format(max_time)) #, max_iterations))
408 start_time = time.time() # TODO: instead use sample_time
409 while self.is_active() and (elapsed_time(start_time) < max_time) and (iterations < max_iterations):
410 iterations += 1
411 num_new += self.process_root()
412 #print('Iterations: {} | New: {} | Time: {:.3f}'.format(iterations, num_new, elapsed_time(start_time)))
413 return num_new + self.greedily_process()
414
415 #########################
416

Callers 1

processMethod · 0.95

Calls 4

is_activeMethod · 0.95
process_rootMethod · 0.95
greedily_processMethod · 0.95
elapsed_timeFunction · 0.90

Tested by

no test coverage detected