Good job. Unfortunately, I think your approach might start to struggle if you change any of the rules associated with the model (for example, try to apply that to a different sport for Fantasy, or change a rule), or if you scale the problem up to more realistic sizes (since you are using "brute force"). As an example, let's consider a larger field of players (more realistic for Fantasy Sports applications). We can simulate that as such: %macro createData(n=15); data have(drop=i rename=(count=player)); retain count 0; set have; do i = 1 to &n; count+1; playerNumber = player; output; end; run; %mend createData; %createData(); Running your code took 49 minutes. Players : 76|77|511|512|513|514|61|541|542|301|302 Max Points : 66 Cost : 71000 NOTE: DATA statement used (Total process time): real time 49:02.72 cpu time 49:02.69 And running my code took: 0.08s NOTE: Optimal. NOTE: Objective = 68. NOTE: PROCEDURE OPTMODEL used (Total process time): real time 0.08 seconds cpu time 0.07 seconds Also, are you sure your code is exact? The OR solver found a better solution (68).
... View more