;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*- File: planning/domains/job-shop.lisp

;;;; Assembling Two Cars: a Job-Shop Scheduling Problem

(defun make-car-assembly-problem ()
  "Assemble two cars, each by adding the engine, then the wheels, then
  inspecting it, with one engine hoist, one wheel station, two inspectors
  and 500 lug nuts [Fig. 11.13]."
  (make-job-shop-problem
   :jobs '((AddEngine1 AddWheels1 Inspect1)
	   (AddEngine2 AddWheels2 Inspect2))
   :resources '((EngineHoists . 1) (WheelStations . 1) (Inspectors . 2)
		(LugNuts . 500))
   :actions
   (list (make-job-shop-action :name 'AddEngine1 :duration 30
			       :use '((EngineHoists . 1)))
	 (make-job-shop-action :name 'AddEngine2 :duration 60
			       :use '((EngineHoists . 1)))
	 (make-job-shop-action :name 'AddWheels1 :duration 30
			       :use '((WheelStations . 1))
			       :consume '((LugNuts . 20)))
	 (make-job-shop-action :name 'AddWheels2 :duration 15
			       :use '((WheelStations . 1))
			       :consume '((LugNuts . 20)))
	 (make-job-shop-action :name 'Inspect1 :duration 10
			       :use '((Inspectors . 1)))
	 (make-job-shop-action :name 'Inspect2 :duration 10
			       :use '((Inspectors . 1))))))
