;;;;; ;;;;; INSTRUMENTATION CODE FOR MARATHON ASSIGNMENT ;;;;; (define-transducer (track-velocity vel) (state-variables (minvels (make-vector 3 10000000)) (start-time (+ %ms-clock 30000))) (when (> %ms-clock start-time) (let ((timeslot (quotient (- %ms-clock start-time) 60000))) (cond ((> timeslot 2) (format #t "Times: ~S ~S ~S~%" (vector-ref minvels 0) (vector-ref minvels 1) (vector-ref minvels 2)) (format #t "Score: ~S~%" (/ (+ (vector-ref minvels 0) (vector-ref minvels 1) (vector-ref minvels 2)) 3)) (exit-grl #t)) (else (vector-set! minvels timeslot (min (vector-ref minvels timeslot) vel)))))) minvels) (define-signal compute-score (track-velocity (translation-of base-measured-velocity)) (drives-requisites default-status-display-window))