Atelier des rouesLab FR
Objects/Documentation

decalages19.py

Guarantee slots across a delay change · decalages19.py

Download ↓
"""Minimax slot count with a single delay change per full joint cycle."""
import json
from itertools import accumulate
from math import lcm

LEFT={0,1,2,8,9,15,16}


def run(q,j):
    if not 6<=q<=40 or not 0<=j<=5:
        raise ValueError("unsupported period or jitter")
    length=lcm(24,q)
    right={a%q for a in (0,1,4,8,9)}
    times=[t for t in range(length) if t%24 in LEFT]
    floors=[]; constant=[]; witnesses=[]
    for d in range(q):

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.