From f83dc5273c9972e8ea2914a0efc5821a1c501428 Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" Date: Thu, 19 Oct 2023 10:21:59 -0500 Subject: [PATCH] Fix errors from rebasing. --- shop3/decls.lisp | 1 + shop3/planning-tree/tree-reductions.lisp | 4 ++-- shop3/shop3.lisp | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shop3/decls.lisp b/shop3/decls.lisp index eb62324c..e12db6ab 100644 --- a/shop3/decls.lisp +++ b/shop3/decls.lisp @@ -89,6 +89,7 @@ (defvar *operator-tasks*) ; record of the task atom for operators (declaim (type hash-table *operator-tasks* *task-operator*)) (defvar *task-operator*) ; inverse of *operator-tasks* +(defvar *reduction-labels*) ; support recording method labels in plan tree (defparameter *optimize-cost* nil) ; whether to optimize with branch and bound (defparameter *optimal-plan* 'fail) ; optimal plan found so far (defparameter *optimal-cost* 0) ; cost of *optimal-plan* diff --git a/shop3/planning-tree/tree-reductions.lisp b/shop3/planning-tree/tree-reductions.lisp index 39abd4a9..9f33e8a8 100644 --- a/shop3/planning-tree/tree-reductions.lisp +++ b/shop3/planning-tree/tree-reductions.lisp @@ -70,11 +70,11 @@ (let ((all-subtasks (extract-subtasks reduction))) (iter (for subtask in all-subtasks) (setf (gethash subtask *subtask-parents*) - task1))) + task1)) (when method-label (alexandria:nconcf *reduction-labels* (mapcar #'(lambda (subtask) (cons subtask method-label)) - all-subtasks)))) + all-subtasks))))) (defun extract-subtasks (reduction) (cond diff --git a/shop3/shop3.lisp b/shop3/shop3.lisp index be48cd3d..9c3d6f40 100644 --- a/shop3/shop3.lisp +++ b/shop3/shop3.lisp @@ -168,6 +168,7 @@ MPL/GPL/LGPL triple license. For details, see the software source file.") ;; [mpelican:20090226.1825CST] obsolete, please use state-type arg or default-state-type slot in domain class (*state-encoding* :obsolete-state-encoding-variable) (*plan-tree* plan-tree) + (*reduction-labels* nil) (*collect-state* (or collect-state plan-tree)) (*subtask-parents* (make-subtask-parents-table)) (*operator-tasks* (make-operator-task-table))