       (def log log-debug))
     (when-not (or print-error? print-help?)
       (log "options: " options)
-      (println "TODO")))
+      (let [reservations-per-customer
+              (quot (:reservations options) (:customers options))
+            customers
+              (for [i (range (:customers options))]
+                (spawn customer-behavior))]
+        (when (not= (rem (:reservations options) (:customers options)) 0)
+          (println "WARNING: number of reservations is not divisible by number"
+            "of customers. Using" reservations-per-customer "reservations per"
+            "customer, so only" (* reservations-per-customer (count customers))
+            "in total."))
+        (doseq [c customers]
+          (dotimes [_i reservations-per-customer]
+            (send c))))))
   (shutdown-agents))

  (send logger (fn [_] (apply println args))))

(def cli-options
  [["-d" "--debug" "Print debug information"]
   ["-h" "--help" "Print help information"]])

(def usage

Options:

" (:summary (clojure.tools.cli/parse-opts nil cli-options))))

(def customer-behavior
  (behavior
    []
    []
    (log "start reservation")
    (dosync
      (println "TODO"))))

(defn -main [& args]
  "Main function. `args` should be a list of command line arguments."
