Randomisation with constraints

Offline or online?