Browse Source

Check combined constraints

Samuel W. Flint 4 years ago
parent
commit
35dbc95305
1 changed files with 7 additions and 0 deletions
  1. 7 0
      checking.lisp

+ 7 - 0
checking.lisp

@@ -12,4 +12,11 @@
       (incf (constraint-checks (problem constraint))))
     result))
 
+(defmethod check-constraint ((constraint <constraint-combined>) vvps &key &allow-other-keys)
+  (let ((value t))
+    (do* ((constraints (constraints constraint) (rest constraints))
+          (constr (first constraints) (first constraints)))
+         ((or (not value) (null constr)) value)
+      (setf value (check-constraint constr vvps :suppress-cc-update-p t)))))
+
 ;;; End lcsp