Hello everbody, I'm getting an error when I try to run a dc OPF to a new case that I have uploaded. This is the error that I am getting: Error using sparse Index exceeds matrix dimensions.
Error in makeBdc (line 72) Cft = sparse(i, [f;t], [ones(nl, 1); -ones(nl, 1)], nl, nb); %% connection matrix Error in most (line 944) [Bdc, Bl, Psh, PLsh] = makeBdc(baseMVA, mpc.bus, mpc.branch(ion,:)); Error in MAIN (line 42) mdo = most(mdi, mpopt); I don't understand why I'm getting this error, because all the branch and bus data of my case is correctly uploaded. On the other side, the number of buses are 22 (nb), and the number of lines are 47 (nl). The list of "from" buses (f) is: [ 18 18 21 21 14 14 7 7 7 12 1 1 12 4 3 3 11 11 11 11 9 9 9 10 10 8 4 4 2 2 15 15 20 20 6 6 6 6 5 17 22 18 18 18 20 16 18] And the list of "to" buses is: [ 21 21 22 22 19 19 9 9 9 9 9 9 1 1 7 7 7 9 9 9 5 5 5 5 5 13 2 2 12 12 17 27 16 16 10 10 8 8 15 8 19 9 9 9 1 15 9] Could someone help me? I am stuck at this :(. I really appreciate your help, greetings, Tatiana Cantillo -- *Este correo no representa opiniĆ³n o consentimiento oficial de la Universidad del Norte, por lo que esta no adquiere ninguna responsabilidad por su contenido, salvo en el caso de funcionarios en ejercicio de atribuciones reglamentarias. Puede provenir de una cuenta ofrecida a funcionarios o estudiantes, como parte del ejercicio educativo, evento en el cual tanto el mensaje como sus anexos son estrictamente confidenciales. Ha sido analizado con software antivirus; no obstante, no se garantiza que sea seguro o no contenga errores o virus, por lo que la Universidad del Norte no se hace responsable de su transmisiĆ³n.*