# Find the playoff elimination number # # called from: kbo_script.txt # calls: write_kbo_scenario.txt # printf "\nFinding PE number for %s.\n",k; let max_ties := 1; option cplex_options 'mipdisplay=1 fraccand = 10000 fracpass = 10 mipemphasis=3'; solve playoff_elimination; let max_ties := 10; option cplex_options 'mipdisplay=2 fraccand = 10000 fracpass = 10 mipemphasis=3 timelimit=60'; solve playoff_elimination; if (solve_result_num < 200 || solve_result = "limit") then { let pe[k] := total_wins[k] - w[k]; let filename := k & "_pe.txt"; printf "\nPlayoff elimination number = %d. Scenario written to %s\n",pe[k],filename; printf "Playoff Elimination Scenario for %s\n\n",k > (filename); printf "%s must win at least %d more games (%d total) to avoid eliminiation from the playoffs.\n",k,pe[k],total_wins[k] >> (filename); let number_of_teams_with_worse_records := card({j in TEAMS: wpct[j] < wpct[k]}); printf "Here's a scenario where %s makes the playoffs with %d wins.\n\n",k,total_wins[k] >> (filename); commands write_kbo_scenario.txt; } else let pe[team] := -1; # The problem is infeasible which means that the team is eliminated from first place }