The python Evaluation source code, evaluation.py is available on GitHub at https://github.com/GOCompetition/Evaluation. The latest commit was November 6, 2019, adds a check on generators/branches mentioned in the con file but not in the raw file.
The update September 13, 2019, prints out some additional information on the base case. The update July 19, 2019, checks and scrubs switched shunt swrem. Should be == 0. The update July 11, 2019, checks for unallowable characters in ID strings and the pmin >= 0. The update April 26, 2019, fixed a data conversion issue. The update April 12, 2019, included additional alerts and fixed scrub_gen_cost. The update April 5, 2019, set config parameters for revising generator cost or normalizing part.fact (default is false). The update March 29, 2019, fixed the check on bmin and bmax in view of 1e-4 tolerance and scrub commas from ROP file. The update March 27, 2019, checks that at there is at least 1 outage in each contingency and checks binit feasibility. The update March 21, 2019, removes quotes in ROP The update March 16, 2019, removed extra datasets. The update March 15, 2019 inserted additional check_data scripts. The February 18, 2019, update fixed some Python 3 issues. The update on January 16, 2019, introduced performance improvements. The update on December 6, 2018, reduced the memory requirements. The update on November 29, 2018, made the code compatible with both Python 2 and 3.
The penalty parameters (in data units) in evaluation.py are discussed in Appendix D.1 of the Problem Formulation document.
Entrants may find the input data parsing done by the Evaluation code (specifically in data.py) a useful model for their own code. The data.py file is in the search path for all python submissions so it does not need to be included in a Team GitHub repository.
The python code WorstCase, available on GitHub at https://github.com/GOCompetition/WorstCase, constructs a guaranteed feasible solution with no starting point information by insuring that the normal voltage magnitude meets normal and emergency bounds in both base and contingency cases and stays the same. While feasible, the result is far from optimal and represents something of a worst case that any solver should be able to exceed. The resulting slack objective value is used when no other objective value is found due to missing solution files or errors in processing the solution files.
Interpreting DetailedSolution.csv
The output folder for every scenario has a DetailedSolution.csv file. This file is useful for identifying which constraints may be causing you problems. The definitive explanation of the column headers in the DetailedSolution.csv files produced by the Evaluation code is in the Evaluation code (search for the first instance of csv_writer.writerow). For convenience the columns are listed here. Numbers in parenthesis refer to equations in the Problem Formulation.
'ctg', # contingency label for the current contingency, empty if base case |
|
'infeas', # binary indicator of infeasibility for the base case or contingency of the current row - 1 indicates infeasible |
|
'pen', # penalty value on soft constraint violations in the base case or current contingency (1,6-31) |
|
'cost', # generator cost (base case only), 0 in contingencies (1-5) |
|
'obj', # obj, = pen + cost, cumulative (i.e. base case + all ctgs through the current row) (1) |
|
'vmax-idx', # bus number of maximum violation of bus voltage magnitude upper bounds (32,58) |
|
'vmax-val', # value of maximum violation of bus voltage magnitude upper bounds (32,58) |
|
'vmin-idx', # bus number of maximum violation of bus voltage magnitude lower bounds (32,58) |
|
'vmin-val', # value of maximum violation of bus voltage magnitude lower bounds (32,58) |
|
'bmax-idx', # bus number of maximum violation of switched shunt susceptance upper bounds (37,63) |
|
'bmax-val', # value of maximum violation of switched shunt susceptance upper bounds (37,63) |
|
'bmin-idx', # bus number of maximum violation of switched shunt susceptance lower bounds (37,63) |
|
'bmin-val', # value of maximum violation of switched shunt susceptance lower bounds (37,63) |
|
'pbal-idx', # bus number of maximum violation of real power balance constraints (46-48,72-74) |
|
'pbal-val', # value of maximum violation of real power balance constraints (46-48,72-74) |
|
'qbal-idx', # bus number of maximum violation of reactive power balance constraints (49-51,75-77) |
|
'qbal-val', # value of maximum violation of reactive power balance constraints (49-51,75-77) |
|
'pgmax-idx', # bus and unit id of maximum violation of generator real power upper bounds (33,34) |
|
'pgmax-val', # value of maximum violation of generator real power upper bounds (33,34) |
|
'pgmin-idx', # bus and unit id of maximum violation of generator real power lower bounds (33,34) |
|
'pgmin-val', # value of maximum violation of generator real power lower bounds (33,34) |
|
'qgmax-idx', # bus and unit id of maximum violation of generator reactive power upper bounds (35,36,61,62) |
|
'qgmax-val', # value of maximum violation of generator reactive power upper bounds (35,36,61,62) |
|
'qgmin-idx', # bus and unit id of maximum violation of generator reactive power lower bounds (35,36,61,62) |
|
'qgmin-val', # value of maximum violation of generator reactive power lower bounds (35,36,61,62) |
|
'qvg1-idx', # bus and unit id of maximum violation of generator pv/pq switching constraints of type 1 (under voltage -> reactive power at max) (94) |
|
'qvg1-val', # value of maximum violation of generator pv/pq switching constraints of type 1 (under voltage -> reactive power at max) (94) |
|
'qvg2-idx', # bus and unit id of maximum violation of generator pv/pq switching constraints of type 2 (overvoltage -> reactive power at min) (95) |
|
'qvg2-val', # value of maximum violation of generator pv/pq switching constraints of type 2 (overvoltage -> reactive power at min) (95) |
|
'lineomax-idx', # origin destination and circuit id of maximum violation of line origin flow bounds (52,53,78,79) |
|
'lineomax-val', # value of maximum violation of line origin flow bounds (52,53,78,79) |
|
'linedmax-idx', # origin destination and circuit id of maximum violation of line destination flow bounds (53,54,79,80) |
|
'linedmax-val', # value of maximum violation of line destination flow bounds (53,54,79,80) |
|
'xfmromax-idx', # origin destination and circuit id of maximum violation of transformer origin flow bounds (55,56,81,82) |
|
'xfmromax-val', # value of maximum violation of transformer origin flow bounds (55,56,81,82) |
|
'xfmrdmax-idx', # origin destination and circuit id of maximum violation of transformer destination flow bounds (56,57,82,83) |
|
'xfmrdmax-val', # value of maximum violation of transformer destination flow bounds (56,57,82,83)