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

Method process_complexity

pddlstream/algorithms/skeleton.py:382–400  ·  view source on GitHub ↗
(self, complexity_limit)

Source from the content-addressed store, hash-verified

380 return num_new + self.greedily_process()
381
382 def process_complexity(self, complexity_limit):
383 # TODO: could copy the queue and filter instances that exceed complexity_limit
384 num_new = 0
385 if not self.is_active():
386 return num_new
387 print('Sampling while complexity <= {}'.format(complexity_limit))
388 while self.is_active():
389 _, binding = self.pop_binding()
390 if binding.check_complexity(complexity_limit): # not binding.up_to_date() or
391 readd, is_new = self._process_binding(binding)
392 num_new += is_new
393 if readd is not STANDBY:
394 if readd is True:
395 self.push_binding(binding)
396 continue
397 self.standby.append(binding)
398 self.readd_standby()
399 return num_new + self.greedily_process()
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

Callers 1

processMethod · 0.95

Calls 7

is_activeMethod · 0.95
pop_bindingMethod · 0.95
_process_bindingMethod · 0.95
push_bindingMethod · 0.95
readd_standbyMethod · 0.95
greedily_processMethod · 0.95
check_complexityMethod · 0.80

Tested by

no test coverage detected