Armi - 2022-12-05

Hello! I'm using an algorithm to find the best position and size of a capacitor in a distribution system. I used opendss and matlab. I have a problem to the result of power loss im getting. this is the snippet of my code while the attached pic is the losses i get. Thank u!

DSSText.Command= ['New Capacitor.C8 Bus1=8  kV=23 Phases=3  kvar=' num2str(y(7))];
DSSText.Command= ['New Capacitor.C9 Bus1=9  kV=23 Phases=3  kvar=' num2str(y(8))];
DSSText.Command= ['New Capacitor.C10 Bus1=10  kV=23 Phases=3  kvar=' num2str(y(9))];


DSSText.Command='Solve'; 
Losses= DSSCircuit.Losses;    
DSSText.Command='show losses';