import collections
import numpy as np

Request = collections.namedtuple('Request', ['label','start','end', 'weight'])

def randomrequests(K, α=2.0, d=5.0):
    '''Generate a list of K requests, of average duration d, with α concurrent requests on average.'''
    rng = np.random.default_rng()
    T = int(d*K/α)
    start = rng.choice(T, size=K)
    duration = rng.poisson(lam=d, size=K) + 1
    weight = rng.poisson(lam=10, size=K) + 1
    label = list(range(K))
    return [Request(f'r{l}',s,s+d,w) for l,s,d,w in zip(label,start,duration,weight)]

for r in randomrequests(10):
    print(r)