Hello my friends, I am the new user of MATPOWER and am now doing DC OPF. My project requires me to add cost function without adding new optimization variables.
According to (5-27) - (5-31) in user manual page 31-32, we can build a user-defined cost function containing standard optimization variables x and the new variables z. However when tried to build my cost function with the number of elements in z set to zero (om = add_vars(om,'z',0)), I encountered an error saying that the dimension of N must match the dimension of z. At this point, I feel that we are only allowed to add z, instead of both x and z, into the user-defined cost function. Is there any way to solve such problem? Sincerely, Y.S.
