Did you check the success flag in the results to make sure it solved successfully?
Also, the fact that your example code uses mdo makes me wondering if it’s the output of most(), not rundcopf(). If so, then you are looking in the wrong place for the results. Ray > On Sep 3, 2018, at 1:59 AM, Frederik Paul Sapp <frederik.s...@tu-dortmund.de> > wrote: > > Dear Prof Ray Zimmerman, > > thanks a lot for your work! > > I am running a dc opf (rundcopf) based on a self-created dataset and the > algorithm gets to an optimal solution. > > However, in the results I found that the sum of the real power injections > of all power plants is not equal to the sum of all real power demands: > > sum(mdo.gen(:,2) = 1.1739e+05 > sum(mdo.bus(:,3) = 1.9066e+05 > > Shouldn´t it be the same values? Or are there any other aspects that I > have to consider when taking a look at the balance of power infeed and > demand? > > Best regards > Frederik > > > > > > >