                 :lt :gt))
         ; t REL rhs
         entry-time (:entry-time ha)
-        ;_ (println (:id ha) simple-guard "et" entry-time "push up" time-unit rhs "to" (+ entry-time time-unit) (+ entry-time rhs) "sat?" sat)
+        #_(println (:id ha) simple-guard "et" entry-time "push up" time-unit rhs "to" (+ entry-time time-unit) (+ entry-time rhs) "sat?" sat)
         min-t (+ entry-time time-unit)
         rhs (+ entry-time rhs)]
     (assert (not (nil? v10))

                                         ; already-past...
                                         (<= end then)
                                         ; and too-far-in-the-future transitions
                                         (> start min-t)) trs
                                                          ; use max(then, start) as transition time
                                                          (let [clipped-start (.max js/Math then start)
                                                                ; clip the interval in the transition as appropriate
                                                                trans (assoc trans :interval [clipped-start end])]
                                                            (if (< clipped-start min-t)
                                                              ; this is a new minimum time
                                                              [clipped-start [trans]]
                                                              ; otherwise must be equal to min-t
                                                              [min-t (conj trs trans)]))))
                                 [Infinity []]
                                 (:optional-transitions ha))]
    (assert (not= req-t min-opt-t) "Ambiguous required vs optional transition")

              :gt [(.max js/Math (+ rhs (/ time-unit 16)) min-t) Infinity]))))

(defn transition-interval [has ha transition]
  #_(println "Transition" (:id ha) (:x ha) (:target transition) (:guard transition))
  (let [intervals (map #(simple-interval has ha %) (:guard transition))
        interval (intersect-all intervals)]
    #_(println "interval:" intervals "->" interval)
    ; TODO: handle cases where transition is also guarded on states
    {:interval   interval
     :id         (:id ha)
