Subtle bug in runpf when enforcing q_lims (strange behavior of MATLAB's union)

2014-11-11 Thread Jose Luis Marin
[I'm re-sending this to the list, I don't think it got through the first time] Hello Ray, I think I've stumbled upon a bug. It appears when enforcing generator q_lims, but only when there's exactly *one* generator violating the QMAX constraint AND *one* generator violating the QMIN constraint.

Re: Subtle bug in runpf when enforcing q_lims (strange behavior of MATLAB's union)

2014-11-11 Thread Ray Zimmerman
Good catch … and thanks for the detailed description and patch. I ended up simply doing … infeas = union(mx', mn')’; … which I think should handle the problem as well. Matlab’s union returns a row or column vector depending on whether the inputs are rows or columns. But if they’re