I am trying to analyse in depth , the code of matpower in order to make suggestions to you. SO in terms of losses, let us assume that bus A and bus B are both connected to each other. A power comes out of bus A and is 100MW and power goes into bus B and is 70MW. So the losses are 30MW. Line capacity is 100MW.
Recently, a questions has been asked about the following situation. The power coming out of bus A is 100MW and the power going into bus B is -70MW. So the losses are 100 + 70 = 170 MW. The line capacity is 100MW. But the losses are 170MW > line capacity = 100MW. If we consider the losses as a power that comes out of a certain point in line, then this is possible (case 1). However, in the research community there have been suggestions to consider the losses less than the line capacity (case 2). As far as I can see, you consider the first case in Matpower. Do you aim at considering the second case ?
