Bug Fixes
- Optimal Power Flow (OPF): When including thousands of contingent interfaces to be enforced during an OPF, the OPF algorithm would include a very large number of violated contingent interfaces into the linear program tableau. This would make the basis very large and significantly slow down the calculation of the inverse of the basis. Including all contingent interfaces was unnecessary, and the improvement in this patch implements a way to filter and include only those contingent interfaces that have a non-zero contingent MW flow contribution. This allows users to specify a very large number of interface-constraints and still arrive at a tractable OPF solution. This improvement was tested with 43,000 interface constraints in an OPF, where the tableau would previously include 7,500 constraints, and that was filtered down to around 500 constraints. This 15-fold reduction in the size of the basis matrix resulted in a 3000-fold (order n^3) reduction in the time needed to calculate the basis inverse in the inner loop. A user had reported that the OPF kept running but it was just taking a really long time to solve.. With this improvement the test case OPF solved in about 165 seconds. Otherwise, it would have probably terminated after around 6.5 days!
