I am trying to develop a fantasy football Monte Carlo simulation with the following constraints:
Necessary:
12 teams (every team plays every other team at least once)
14 weeks (weeks 12,13, and 14 always repeat weeks 1,2, and 3, respectively *effectively this is an 11 week season and last 3 weeks can just repeat the first 3*)
N number of seasons
I would like a dataframe with the following columns: season, team, week where the values are the respective opponents for each team for each week during the respective season. If team 'a' is playing team 'd' in week 3 of season 142; then team 'd' also must play team 'a' in week 3 of season 142.
I have tried this in both R using loops and alteryx, but I seem to be getting stuck having constraints in both dimensions - opponents must play each other in the same week, and can only play each other once (in the first 11 weeks). Have not worked previously with iterative macros, so this will be completely new for me.