From 9ef2768939305ee9eb933514034fd527100aa7a6 Mon Sep 17 00:00:00 2001 From: Matthew Fennell Date: Thu, 14 May 2026 17:07:24 +0100 Subject: Score fake booking as 0 This allows the prevention of bookings fulfilling certain conditions from being booked, if they have a negative score. This can be useful if, for instance, I want to prevent any bookings on a given day. -inf always compared as less than another proposed score, meaning that it would be possible for a negative-scoring new booking to be booked as long as there was nothing better available. This commit means that a negatively scored booking will not be booked, even if it is the only option. --- util.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.scm b/util.scm index 6ad4333..ca58b0f 100644 --- a/util.scm +++ b/util.scm @@ -64,7 +64,7 @@ (define fake-score (let* ((fake-date (make-date 0 0 0 0 0 0 0 0)) (fake-booking (make-booking 'fake-venue 'fake-activity fake-date fake-date))) - `(,fake-booking ,(-(inf))))) + `(,fake-booking 0))) ;;; Dates -- cgit v1.2.3