Re: question about mpc case model

2017-07-12 Thread Xian Guo
Hi Gang, Thanks for your reply. I tried that, and it can work quite well. Thanks again. 2017-07-12 11:42 GMT-04:00 Gang Huang : > Hi Xian, > > For both of your questions, yes! > > To model multiple generators connected to the same bus, just create a new > row in "mpc.gen" (note: please do no

Re: question about mpc case model

2017-07-12 Thread Gang Huang
Hi Xian, For both of your questions, yes! To model multiple generators connected to the same bus, just create a new row in "mpc.gen" (note: please do not forget the corresponding row in "mpc.gencost") and fill it with the data of a new generator. To model multiple loads, you can add them up to th

question about mpc case model

2017-07-12 Thread Xian Guo
Hi, I have a quick question about the mpc case modelling file. Could I have multiple generators and loads connecting to the same bus? If so, how to model this in "mpc.bus", "mpc.gen", "mpc,gencost" matrix? Also, for the slack bus, if I have both generators and load connected to that, should th

Re: Objective Functions

2017-07-12 Thread Akash Tyagi
Hello, The obj_func mainly minimizes the cost including the real and reactive power. But I have to only minimize objective function i.e. cost considering only the reactive power. I tried the way explained by you above but I am not able to do this.? Can you help? basically, my goal is to change the

RE: To make changes in runpf.m

2017-07-12 Thread Bone, Gorazd
Hi, It's not in the runpf.m file. The function makeJac() is defined in the file makeJac.m . In the file makeJac.m, the Jacobian matrix of the power mismatch formulation is calculated and can be called with the command makeJac(). Inside file runpf.m, the functions are only called, not defined. T

Re: Objective Functions

2017-07-12 Thread Akash Tyagi
ok, thanks On Wed, Jul 12, 2017 at 1:40 PM, Kardoš Juraj wrote: > Try to have a look in the code in opf_costfcn.m and compare it with the > objective function definition in the manual (http://www.pserc.cornell.edu/ > matpower/manual.pdf) section 6.1 equation (6.6). You will find the > function i

Re: Objective Functions

2017-07-12 Thread Kardoš Juraj
Try to have a look in the code in opf_costfcn.m and compare it with the objective function definition in the manual (http://www.pserc.cornell.edu/matpower/manual.pdf) section 6.1 equation (6.6). You will find the function implemented in the code, as well as its gradient and Hessian w.r.t. vecto

Re: Objective Functions

2017-07-12 Thread Akash Tyagi
Can you explain me through simple example.? On Wed, Jul 12, 2017 at 1:09 PM, Kardoš Juraj wrote: > Hello, > > as far as I know, you can define arbitrary objective function by modifying > the following source file: opf_costfcn.m. Don’t forget that you need to > provide gradient and Hessian w.r.t.

Re: Objective Functions

2017-07-12 Thread Kardoš Juraj
Hello, as far as I know, you can define arbitrary objective function by modifying the following source file: opf_costfcn.m. Don’t forget that you need to provide gradient and Hessian w.r.t. OPF control variables as well. These derivations are used in optimizers to find the optimal solution. Be