     (when (:debug options)
       (def log log-debug))
     (if proceed?
-      (let [options {:n-workers      (:workers options)
-                     :n-reservations (:reservations options)
-                     :n-relations    (:relations options)
-                     :n-queries      (:queries options)}]
+      (let [options {:n-workers           (:workers options)
+                     :n-secondary-workers (:secondary-workers options)
+                     :n-reservations      (:reservations options)
+                     :n-relations         (:relations options)
+                     :n-queries           (:queries options)}]
         (log "options: " options)
         (when (not= (rem (:n-reservations options) (:n-workers options)) 0)
           (println "WARNING: number of reservations is not divisible by number"

(def cli-options
  [["-w" "--workers N" "Number of workers"
    ; Workers are called clients in vacation, the option is -c there.
    :default 20
    :parse-fn #(Integer/parseInt %)]
   ["-n" "--queries N" "Number of queries per relation per reservation"


(def master-initial-behavior
  (behavior
    [{:keys [n-workers n-secondary-workers n-reservations] :as options}]
    [_start]
    (let [{:keys [reservations cars flights rooms] :as data}
            (initialize-data options)
          ; It is important to wrap the two maps below in doall, so that they
          ; are executed here, where *actor* refers to the master actor, and not
          ; in another place. Stupid lazy Clojure.
          secondary-workers
            (doall (map #(spawn reserve-relation-behavior % *actor*)
                        (range n-secondary-workers)))
          reservation-workers
            (doall (map #(spawn reservation-behavior
                          % *actor* secondary-workers data options)
                        (range n-workers)))]
      #_(log-data data)
      (doseq [[worker reservation] (zip (cycle reservation-workers) reservations)]
        (send worker reservation))
      (become master-waiting-behavior (* n-reservations 4)))))

; MAIN

