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

Method _process_binding

pddlstream/algorithms/skeleton.py:312–337  ·  view source on GitHub ↗
(self, binding)

Source from the content-addressed store, hash-verified

310 #########################
311
312 def _process_binding(self, binding):
313 assert binding.calls <= binding.visits # TODO: global DEBUG mode
314 readd = is_new = False
315 if binding.is_dominated():
316 return readd, is_new
317 if binding.is_fully_bound:
318 action_plan = binding.skeleton.bind_action_plan(binding.mapping)
319 self.store.add_plan(action_plan, binding.cost)
320 is_new = True
321 return readd, is_new
322 binding.visits += 1
323 instance = binding.result.instance
324 if (REQUIRE_DOWNSTREAM and not binding.check_downstream()): # TODO: move check_complexity here
325 # TODO: causes redundant plan skeletons to be identified (along with complexity using visits instead of calls)
326 # Do I need to re-enable this stream in case another skeleton needs it?
327 # TODO: should I perform this when deciding to sample something new instead?
328 return STANDBY, is_new
329 #if not is_instance_ready(self.evaluations, instance):
330 # raise RuntimeError(instance)
331 if binding.up_to_date():
332 new_results, _ = process_instance(self.store, self.domain, instance, disable=self.disable)
333 is_new = bool(new_results)
334 for new_binding in binding.update_bindings():
335 self.push_binding(new_binding)
336 readd = not instance.enumerated
337 return readd, is_new
338
339 #########################
340

Callers 3

process_rootMethod · 0.95
process_until_newMethod · 0.95
process_complexityMethod · 0.95

Calls 8

push_bindingMethod · 0.95
process_instanceFunction · 0.90
bind_action_planMethod · 0.80
add_planMethod · 0.80
check_downstreamMethod · 0.80
up_to_dateMethod · 0.80
update_bindingsMethod · 0.80
is_dominatedMethod · 0.45

Tested by

no test coverage detected