What does Revenue Management and Slot Packing for Space Rentals conclude, in numbers, about “Bookings at Fixed Times: Interval Partitioning and Weighted Interval Scheduling”?

Answer: Chapter 5 handles fixed-time bookings by interval partitioning and weighted interval scheduling: first come, first served earns 999.95 yuan a day less than the hindsight optimum.

Scope of the numbers: Chapter 1 computes exact expectations for an illustrative month of 20 studio-days: protecting 10 days lifts monthly revenue from 47323.9 yuan to 57432.1 yuan, 21.36 % more, though simulation shows that protection earns less in 0.1900 of months. Marked boxes separate published evidence, runnable Python calculations (18 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 999.95

worked day, arrival order9-12 15-19 13-16 9-21 11-13 14-16 15-19
FCFS9-12 15-19 = 3150 yuan
optimum 9-214800 yuan
3000 days: mean FCFS shortfall 999.95 yuan a day (sd 970.6)
days where FCFS turned the full-day shoot away0.4110
orphan hours a day: FCFS 0.693, optimum 0.435
Show the full program
# Chapter 5. p52: one studio day, fixed-time requests, FCFS vs optimum.
# Short requests (2 to 6 hours, 450 yuan an hour) and, on half of the
# days, one full-day shoot 9-21 at 4800 yuan arrive in random order.
# FCFS takes each request that fits. The hindsight optimum is weighted
# interval scheduling: sort by end, p(i) = last request ending by the
# start of i, OPT(i) = max(OPT(i-1), w_i + OPT(p(i))). Idle gaps shorter
# than the 2-hour minimum are counted as orphan hours. Parameters 示意.
import bisect
import math
import random
import statistics

RATE, F_DAY, OPEN, CLOSE, MIN_LEN = 450, 4800, 9, 21, 2
rng = random.Random(20261113)


def draw_day():
    reqs = []
    for _ in range(rng.randrange(3, 8)):
        ln = rng.choice((2, 2, 3, 4, 4, 6))
        st = rng.randrange(OPEN, CLOSE - ln + 1)
        reqs.append((st, st + ln, RATE * ln))
    if rng.random() < 0.5:
        reqs.insert(rng.randrange(len(reqs) + 1), (OPEN, CLOSE, F_DAY))
    return reqs


def fcfs(reqs):
    got = []
    for s, e, w in reqs:
        if all(e <= a or s >= b for a, b, _ in got):
            got.append((s, e, w))
    return got


def best(reqs):
    r = sorted(reqs, key=lambda t: t[1])
    ends = [t[1] for t in r]
    opt, pick = [0], [[]]
    for i, (s, e, w) in enumerate(r):
        k = bisect.bisect_right(ends, s, 0, i)
        if w + opt[k] > opt[i]:
            opt.append(w + opt[k])
            pick.append(pick[k] + [(s, e, w)])
        else:
            opt.append(opt[i])
            pick.append(pick[i])
    return pick[-1]


def orphan_hours(got):
    cuts = sorted([(OPEN, OPEN)] + [(s, e) for s, e, _ in got]
                  + [(CLOSE, CLOSE)])
    gaps = [b[0] - a[1] for a, b in zip(cuts, cuts[1:])]
    return math.fsum(g for g in gaps if 0 < g < MIN_LEN)


def show(tag, got):
    total = int(math.fsum(w for _, _, w in got))
    print("  %-7s %s = %d yuan" % (tag, " ".join(
        "%d-%d" % (s, e) for s, e, _ in sorted(got)), total))


ex = draw_day()
while len(ex) < 6 or F_DAY not in [w for _, _, w in ex] or \
        math.fsum(w for *_, w in fcfs(ex)) >= F_DAY:
    ex = draw_day()
print("worked day, arrival order: " + " ".join(
    "%d-%d" % (s, e) for s, e, _ in ex))
show("FCFS", fcfs(ex))
show("optimum", best(ex))
gap, orf, orb, lost = [], [], [], 0
for _ in range(3000):
    d = draw_day()
    a, b = fcfs(d), best(d)
    va = math.fsum(w for *_, w in a)
    vb = math.fsum(w for *_, w in b)
    gap.append(vb - va)
    orf.append(orphan_hours(a))
    orb.append(orphan_hours(b))
    had = F_DAY in [w for *_, w in d]
    lost += had and F_DAY not in [w for *_, w in a]  # step: count
print("3000 days: mean FCFS shortfall %.2f yuan a day (sd %.1f)"
      % (statistics.fmean(gap), statistics.stdev(gap)))
print("days where FCFS turned the full-day shoot away: %.4f" % (lost / 3000))
print("orphan hours a day: FCFS %.3f, optimum %.3f"
      % (statistics.fmean(orf), statistics.fmean(orb)))

Single source and citation

Fan, Y. (2026). Dynamic Revenue Management and Slot Packing for Space Rentals: Nested Protection Levels and the Elimination of Fragmented Idle Time (Version 1.0.0), Chapter 5: Bookings at Fixed Times: Interval Partitioning and Weighted Interval Scheduling. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-282 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026282,
  author    = {Fan, Yafu},
  title     = {Dynamic Revenue Management and Slot Packing for Space Rentals: Nested Protection Levels and the Elimination of Fragmented Idle Time},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book