Optimization problem - How to add same team constraint
问题 How the dataset looks like: I'm trying to build an optimization tool for fantasy football, but I'm having difficulty forcing the model to use players from the same team. 9 players form a lineup, need to be under 50k and we are maximizing "proj" projected points self.salary_cap = 50000 self.Minsalary_cap = 0 self.header = ['QB', 'RB', 'RB','WR', 'WR', 'WR', 'TE','FLEX', 'Def'] #define the pulp object problem prob = pulp.LpProblem('NFL', pulp.LpMaximize) #define the player variabless players