You'll have to define the coefficients of the cost function in mpc.gencost. Read the manual for the generator cost data format.
Note that with a single generator in the system, the OPF will diverge once any limits (voltage, line flow, etc.) are hit (unless you have dispatchable load). I would simply run a power flow instead of an OPF for your case as both would give identical results. An OPF should be typically used when there are multiple generators available. Shri From: Fereshteh Moghateli <[email protected]> Reply-To: MATPOWER discussion forum <[email protected]> Date: Fri, 27 Jun 2014 08:05:52 -0800 To: MATPOWER discussion forum <[email protected]> Subject: Re: simulating the outage of a generator >hi > >in a distribution feeder that there isn't any generator > or DG,for run OPF if i want define a cost function for node1(it is >define ref node), how i can define mpc.gen? > > >On Fri, Jun 27, 2014 at 5:36 AM, Abhyankar, Shrirang G. ><[email protected]> wrote: > >Yes. > >On Jun 27, 2014, at 4:28 AM, "ahmad rezaee" <[email protected]> >wrote: > > > >Dear all > >For simulating the outage of a generator, just changing the 8th column of >mpc.gen (the column related to the status of that generator) to zero is >enough? This change truly simulates the outage of that generator? > >Thank you very much > >Kind Regards >Ahmad > > > > > > > > > >
