Thank you very much for your help. Could you please let me know what I have
to do in order to compare results with and without considering reactive
power as optimization variable as well as considering both reactive offers
and bids? I am sorry but I didn't understand about your reply.
Best Regards

D. Xu



On Tue, Feb 21, 2012 at 20:42, Ray Zimmerman <[email protected]> wrote:

> Setting the bid and offer quantities to zero causes QMIN and QMAX to be
> set to zero when executing the underlying OPF. Doing runmarket without
> providing any reactive bids and offers is not the same. In that case, you
> would need to set QMIN and QMAX appropriately in the case file, as they
> will not be modified by any submitted offers/bids.
>
>   --
> Ray Zimmerman
> Senior Research Associate
> 419A Warren Hall, Cornell University, Ithaca, NY 14853
> phone: (607) 255-9645
>
>
>
>
> On Feb 21, 2012, at 2:04 PM, Dailan Xu wrote:
>
> I am sorry for asking many questions.
>
> Considering active and reactive offer and bid quantities, how can I set
> Qmin=Qmax=0? Is it possible?
>
> Are these two sentences are equal: QMIN = QMAX = 0 &&  doing runmarket
> without reactive offers and bids?
>
> I didn't understand exactly in which either I have to set QMIN = QMAX = 0
> or offer and bid quantities for reactive power must be zero.
>
>
> Best Regards
>
>
>
>
>
> On Tue, Feb 21, 2012 at 19:55, Ray Zimmerman <[email protected]> wrote:
>
>> If you add a power factor constraint instead of setting QMIN = QMAX = 0,
>> then you should make sure that the corresponding QMIN and QMAX values and
>> reactive offer and bid quantities correspond to the available reactive
>> range specified by PMIN, PMAX and the power factor constraint.
>>
>>   --
>> Ray Zimmerman
>> Senior Research Associate
>> 419A Warren Hall, Cornell University, Ithaca, NY 14853
>> phone: (607) 255-9645
>>
>>
>>
>>
>> On Feb 21, 2012, at 1:49 PM, Dailan Xu wrote:
>>
>> Dear Prof. Zimmerman,
>>
>> Thank you so much. Can I constrain power factor, i.e set to, for example,
>> 0.9? I want to compare the results with and without considering reactive
>> power as optimization variable.
>>
>> Best Regards
>>
>> Dailan
>>
>>
>> On Tue, Feb 21, 2012 at 19:28, Ray Zimmerman <[email protected]> wrote:
>>
>>> If you want to no reactive power control (i.e. generators produce no
>>> reactive power), then the offer and bid quantities for reactive power must
>>> be zero.
>>>
>>>   --
>>> Ray Zimmerman
>>> Senior Research Associate
>>> 419A Warren Hall, Cornell University, Ithaca, NY 14853
>>> phone: (607) 255-9645
>>>
>>>
>>>
>>>
>>> On Feb 21, 2012, at 12:07 PM, Dailan Xu wrote:
>>>
>>> Dear Dr. Zimmerman,
>>>
>>> According to replies to one of the posts: You have written that in the
>>> case of without reactive power control I can set Qmax=Qmin. In my case that
>>> I have reactive and active offers and bids, how can I do this? I also want
>>> to compare the results with and without reactive power control.
>>>
>>> Best Regards
>>>
>>> D. Xu
>>>
>>>
>>>
>>> On Tue, Feb 21, 2012 at 16:40, Dailan Xu <[email protected]> wrote:
>>>
>>>> Dear Prof. Zimmerman,
>>>>
>>>> Thank you very much for your helpful comments.
>>>>
>>>> Best Regards
>>>>
>>>> Dailan
>>>>
>>>>
>>>>
>>>> On Tue, Feb 21, 2012 at 14:42, Ray Zimmerman <[email protected]> wrote:
>>>>
>>>>> Each dispatchable load has a fixed power factor (fixed Q/P ratio) that
>>>>> is determined by PMIN and either QMIN (negative) or QMAX (positive). Only
>>>>> one of QMIN and QMAX can be non-zero (in your data they are both 
>>>>> non-zero).
>>>>> Let's suppose that for dispatchable load *k* that QMIN is the
>>>>> non-zero one. In this case, gen(k,QG) will always be negative and equal to
>>>>> gen(k,PG) * gen(k,QMIN)/gen(k,PMIN). This means that this unit always
>>>>> absorbs both real and reactive power, so it can have non-zero bids to buy
>>>>> both, but the offers to sell must be zero quantity (since PMAX and QMAX 
>>>>> are
>>>>> both zero). So you must make sure that the bid quantities have the same
>>>>> ratio ... that is ...  sum(bid.Q.qty(k,:)/sum(bid.P.qty(k,:)) must
>>>>> equal gen(k,QMIN)/gen(k,PMIN).
>>>>>
>>>>>   --
>>>>> Ray Zimmerman
>>>>> Senior Research Associate
>>>>> 419A Warren Hall, Cornell University, Ithaca, NY 14853
>>>>> phone: (607) 255-9645
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Feb 20, 2012, at 4:38 PM, Dailan Xu wrote:
>>>>>
>>>>> Dear Dr. Zimmerman,
>>>>>
>>>>> I am so sorry I disturbed you again.
>>>>>
>>>>> When I set Qmax=0 , * *I get the following error #1 and all the Q/P
>>>>> ratios are constant and consistent with the offers and bids and when I set
>>>>> it to non-zero I get error #2.
>>>>>
>>>>> If you see the case study in 15 buses I have both generators and
>>>>> dispatchable loads i.e. buses {6 9 14 28 30 38 40 45 47 54 56 62 64 81 
>>>>> 84}.
>>>>>
>>>>> If it is possible for you please see the files.
>>>>>
>>>>> Error #1:
>>>>> ??? Error using ==> off2case at 174
>>>>> Qmax <= 0, reactive offer not allowed for gen 20
>>>>>
>>>>> Error in ==> smartmkt at 74
>>>>> [gen, genoffer] = off2case(mpc.gen, mpc.gencost, offers, bids,
>>>>> mkt.lim);
>>>>>
>>>>> Error in ==> runmarket at 141
>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>> mpopt);
>>>>>
>>>>> Error #2:
>>>>>
>>>>> ??? Error using ==> makeAvl at 73
>>>>> makeAvl: either Qmin or Qmax must be equal to zero for each
>>>>> dispatchable load.
>>>>>
>>>>> Error in ==> opf_setup at 168
>>>>>   [Avl, lvl, uvl]  = makeAvl(baseMVA, gen);
>>>>>
>>>>> Error in ==> opf at 219
>>>>> om = opf_setup(mpc, mpopt);
>>>>>
>>>>> Error in ==> uopf at 128
>>>>> [results, success] = opf(mpc, mpopt);
>>>>>
>>>>> Error in ==> smartmkt at 90
>>>>> [r, success] = uopf(mpc2, mpopt);
>>>>>
>>>>> Error in ==> runmarket at 141
>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>> mpopt);
>>>>>
>>>>> Best Regards
>>>>>
>>>>> Dailan
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Feb 20, 2012 at 22:10, Ray Zimmerman <[email protected]> wrote:
>>>>>
>>>>>> The error implies that there is a load that has a non-zero Q bid
>>>>>> quantity and a non-zero Q offer quantity. One of them must be zero. I.e. 
>>>>>> A
>>>>>> load is either always absorbing reactive power or always supplying it
>>>>>> (remember constant Q/P ratio).
>>>>>>
>>>>>>     Ray
>>>>>>
>>>>>> On Feb 20, 2012, at 4:06 PM, Dailan Xu wrote:
>>>>>>
>>>>>> Dear Dr. Zimmerman,
>>>>>>
>>>>>> I have done all of your recommendation. But I get the following
>>>>>> error. I have attached the files that I have changed.
>>>>>>
>>>>>> ?? Error using ==> makeAvl at 73
>>>>>> makeAvl: either Qmin or Qmax must be equal to zero for each
>>>>>> dispatchable load.
>>>>>>
>>>>>> Error in ==> opf_setup at 168
>>>>>>   [Avl, lvl, uvl]  = makeAvl(baseMVA, gen);
>>>>>>
>>>>>> Error in ==> opf at 219
>>>>>> om = opf_setup(mpc, mpopt);
>>>>>>
>>>>>> Error in ==> uopf at 128
>>>>>> [results, success] = opf(mpc, mpopt);
>>>>>>
>>>>>> Error in ==> smartmkt at 90
>>>>>> [r, success] = uopf(mpc2, mpopt);
>>>>>>
>>>>>> Error in ==> runmarket at 141
>>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>>> mpopt);
>>>>>>
>>>>>> Best Regards
>>>>>>
>>>>>> Dailan
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Feb 20, 2012 at 21:53, Ray Zimmerman <[email protected]>wrote:
>>>>>>
>>>>>>> For the generators the reactive offer and bid quantities should be
>>>>>>> consistent with the QMAX and QMIN (if negative) parameters for the
>>>>>>> generator. For dispatchable loads, the ratio of P and Q is always 
>>>>>>> constant
>>>>>>> (defined by PMIN and QMIN or QMAX, whichever is non-zero). The P and Q 
>>>>>>> bid
>>>>>>> quantities must be consistent with (ratio must be the same) this ratio.
>>>>>>>
>>>>>>> --
>>>>>>>  Ray Zimmerman
>>>>>>> Senior Research Associate
>>>>>>> 419A Warren Hall, Cornell University, Ithaca, NY 14853
>>>>>>> phone: (607) 255-9645
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Feb 20, 2012, at 3:44 PM, Dailan Xu wrote:
>>>>>>>
>>>>>>> Dear Dr. zimmerman,
>>>>>>>
>>>>>>> Thank you so much. In my case, if you look at the file, I have 15
>>>>>>> Generators and 29 dispatcahble loads in which 15 genarators are in the 
>>>>>>> same
>>>>>>> place with dispatchable loads. I don't know how can I adjust Qmax and 
>>>>>>> Qmin
>>>>>>> as one of them should be zero. After setting I got the following errors:
>>>>>>>
>>>>>>> ??? Error using ==> off2case at 174
>>>>>>> Qmax <= 0, reactive offer not allowed for gen 17
>>>>>>>
>>>>>>> Error in ==> smartmkt at 74
>>>>>>> [gen, genoffer] = off2case(mpc.gen, mpc.gencost, offers, bids,
>>>>>>> mkt.lim);
>>>>>>>
>>>>>>> Error in ==> runmarket at 141
>>>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>>>> mpopt);
>>>>>>>
>>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>>>> After changing Qmax I got these errors
>>>>>>>
>>>>>>> ??? Error using ==> makeAvl at 73
>>>>>>> makeAvl: either Qmin or Qmax must be equal to zero for each
>>>>>>> dispatchable load.
>>>>>>>
>>>>>>> Error in ==> opf_setup at 168
>>>>>>>   [Avl, lvl, uvl]  = makeAvl(baseMVA, gen);
>>>>>>>
>>>>>>> Error in ==> opf at 219
>>>>>>> om = opf_setup(mpc, mpopt);
>>>>>>>
>>>>>>> Error in ==> uopf at 128
>>>>>>> [results, success] = opf(mpc, mpopt);
>>>>>>>
>>>>>>> Error in ==> smartmkt at 90
>>>>>>> [r, success] = uopf(mpc2, mpopt);
>>>>>>>
>>>>>>> Error in ==> runmarket at 141
>>>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>>>> mpopt);
>>>>>>>
>>>>>>> Best Regards
>>>>>>>
>>>>>>> D. Xu
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Feb 20, 2012 at 21:13, Ray Zimmerman <[email protected]>wrote:
>>>>>>>
>>>>>>>> It's been a while since I looked at this code, but it appears that
>>>>>>>> there is a requirement that reactive bids and offers must have 
>>>>>>>> *ng*rows, where
>>>>>>>> *ng* is equal to the total number of generators and dispatchable
>>>>>>>> loads together.
>>>>>>>>
>>>>>>>> --
>>>>>>>>  Ray Zimmerman
>>>>>>>> Senior Research Associate
>>>>>>>> 419A Warren Hall, Cornell University, Ithaca, NY 14853
>>>>>>>> phone: (607) 255-9645
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Feb 20, 2012, at 1:28 PM, Dailan Xu wrote:
>>>>>>>>
>>>>>>>> By adding reactive offers I get the following error, as I have
>>>>>>>> attached the files.
>>>>>>>>
>>>>>>>> Error using  -
>>>>>>>> Matrix dimensions must agree.
>>>>>>>>
>>>>>>>> Error in auction (line 185)
>>>>>>>>     clip = o.on .* (offers.prc - co.prc);
>>>>>>>>
>>>>>>>> Error in smartmkt (line 156)
>>>>>>>>         [co.Q, cb.Q] = auction(Qoffer, Qbid, mkt.auction_type,
>>>>>>>> mkt.lim.Q, gtee_prc);
>>>>>>>>
>>>>>>>> Error in runmarket (line 141)
>>>>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>>>>> mpopt);
>>>>>>>>
>>>>>>>> Error in ANM_3 (line 75)
>>>>>>>> [r,co,cb] = runmarket(mpc,offers,bids,mkt,mpoption);
>>>>>>>>
>>>>>>>> Best Regards
>>>>>>>>
>>>>>>>> Dailan
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------- Forwarded message ----------
>>>>>>>> From: Dailan Xu <[email protected]>
>>>>>>>> Date: Mon, Feb 20, 2012 at 18:29
>>>>>>>> Subject: Re: Reactive offers and bids
>>>>>>>> To: Ray Zimmerman <[email protected]>
>>>>>>>>
>>>>>>>>
>>>>>>>> Please look at this files. It is the simplified version of that I
>>>>>>>> sent you. I think the problem is this MATPOWER cannot solve reactive 
>>>>>>>> bids
>>>>>>>> with more than 1 block per bid.Please help me.
>>>>>>>>
>>>>>>>> Reference to non-existent field 'Q'.
>>>>>>>>
>>>>>>>> Error in smartmkt (line 139)
>>>>>>>>         nQo = size(offers.Q.qty, 2);
>>>>>>>>
>>>>>>>> Error in runmarket (line 141)
>>>>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>>>>> mpopt);
>>>>>>>>
>>>>>>>>
>>>>>>>> Best Regards
>>>>>>>>
>>>>>>>> Dailan
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Feb 20, 2012 at 18:01, Dailan Xu <[email protected]>wrote:
>>>>>>>>
>>>>>>>>> Please don't write as a function. Please select all and push F9
>>>>>>>>> and will get the error. When I run it for only active offers and bids 
>>>>>>>>> there
>>>>>>>>> is no problem while by adding the reactive bids this problem is 
>>>>>>>>> occurred.
>>>>>>>>> Best Regards
>>>>>>>>>
>>>>>>>>> D. Xu
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Feb 20, 2012 at 17:54, Ray Zimmerman <[email protected]>wrote:
>>>>>>>>>
>>>>>>>>>> I cannot reproduce your error. Here is what I get ...
>>>>>>>>>>
>>>>>>>>>> >> ANM_1
>>>>>>>>>>
>>>>>>>>>> ans =
>>>>>>>>>>
>>>>>>>>>>     44    21
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ans =
>>>>>>>>>>
>>>>>>>>>>     44     8
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ans =
>>>>>>>>>>
>>>>>>>>>>     29     2
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ans =
>>>>>>>>>>
>>>>>>>>>>     29     2
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ans =
>>>>>>>>>>
>>>>>>>>>>     44     2
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ans =
>>>>>>>>>>
>>>>>>>>>>     44     2
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> SMARTMARKET: non-convergent UOPFError using *
>>>>>>>>>> Inner matrix dimensions must agree.
>>>>>>>>>>
>>>>>>>>>> Error in smartmkt (line 174)
>>>>>>>>>>     price       = mkt.lim.P.max_offer * ones(ng, 1);
>>>>>>>>>>
>>>>>>>>>> Error in runmarket (line 141)
>>>>>>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>>>>>>> mpopt);
>>>>>>>>>>
>>>>>>>>>> Error in ANM_1 (line 260)
>>>>>>>>>> [r, co, cb, f, dispatch, success, et] =
>>>>>>>>>> runmarket(mpc,offers,bids,mkt,mpoption);
>>>>>>>>>>
>>>>>>>>>> 174     price       = mkt.lim.P.max_offer * ones(ng, 1);
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>   --
>>>>>>>>>> Ray Zimmerman
>>>>>>>>>> Senior Research Associate
>>>>>>>>>> 419A Warren Hall, Cornell University, Ithaca, NY 14853
>>>>>>>>>> phone: (607) 255-9645
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Feb 20, 2012, at 10:48 AM, Dailan Xu wrote:
>>>>>>>>>>
>>>>>>>>>> Dear Dr. Zimmerman,
>>>>>>>>>>
>>>>>>>>>> I want to do runmarket with active and reactive offers and bids.
>>>>>>>>>> I receive the following message:
>>>>>>>>>>
>>>>>>>>>> How can I solve the problem? I have attached the case files.
>>>>>>>>>> By the way, I do not want to distribute my case file because of
>>>>>>>>>> this reason I only sent to your email.
>>>>>>>>>>
>>>>>>>>>> Reference to non-existent field 'Q'.
>>>>>>>>>>
>>>>>>>>>> Error in smartmkt (line 139)
>>>>>>>>>>         nQo = size(offers.Q.qty, 2);
>>>>>>>>>>
>>>>>>>>>> Error in runmarket (line 141)
>>>>>>>>>> [co, cb, r, dispatch, success] = smartmkt(mpc, offers, bids, mkt,
>>>>>>>>>> mpopt);
>>>>>>>>>>
>>>>>>>>>> Best Regards
>>>>>>>>>>
>>>>>>>>>> Dailan
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> <ANM_1.m><case84_newdispatch6_7.m>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> <case84_newdispatch6_3.m><ANM_3.m>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> <case84_newdispatch6_8.m><ANM_3.m>
>>>>>>
>>>>>>
>>>>>>
>>>>> <case84_newdispatch6_8.m><ANM_3.m>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
>
>

Reply via email to