group = PlayersGroup(
optimizer.player_pool.get_players('Tyreek Hill', 'Travis Kelce'),
max_from_group=1,
depends_on=optimizer.player_pool.get_player_by_name('Patrick Mahomes'),
strict_depend=False, # if you want to generate lineups with Hill/Kelce but without Mahomes
)
optimizer.add_players_group(group).
From the docs....
group = PlayersGroup( optimizer.player_pool.get_players('Tyreek Hill', 'Travis Kelce'), max_from_group=1, depends_on=optimizer.player_pool.get_player_by_name('Patrick Mahomes'), strict_depend=False, # if you want to generate lineups with Hill/Kelce but without Mahomes ) optimizer.add_players_group(group).
If i flip that to True, optimizer runs