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

Method add_plan

pddlstream/algorithms/common.py:50–53  ·  view source on GitHub ↗
(self, plan, cost)

Source from the content-addressed store, hash-verified

48 def best_cost(self):
49 return self.solutions[-1].cost if self.solutions else INF
50 def add_plan(self, plan, cost):
51 # TODO: double-check that plan is a solution
52 if is_plan(plan) and (cost < self.best_cost):
53 self.solutions.append(Solution(plan, cost, elapsed_time(self.start_time)))
54 def has_solution(self):
55 return is_plan(self.best_plan)
56 def is_solved(self):

Callers 4

solve_incrementalFunction · 0.95
new_bindingMethod · 0.80
process_stream_planFunction · 0.80
_process_bindingMethod · 0.80

Calls 2

is_planFunction · 0.90
elapsed_timeFunction · 0.90

Tested by

no test coverage detected