Atelier des rouesLab FR
Objects/Documentation

sejour21.py

I provide the code for this study. Restoring a schedule guarantee

Download ↓
"""Certify the first restoring dwell using nested feasible sets of delay paths."""
from math import lcm
import json
from ruptures20 import solve
from decalages19 import run


def study(q):
    T=lcm(24,q);target=run(q,1)['one'];cache={}
    def trial(h):
        if h not in cache:cache[h]=solve(q,1,h)
        return cache[h]['two']
    lo,hi=1,T
    while lo<hi:
        mid=(lo+hi)//2
        if trial(mid)==target:hi=mid

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.