The issue described in this post 
<https://www.mail-archive.com/[email protected]/msg05829.html> may be 
playing into it. There is a constant term related to ramping costs that is not 
in the MIQP objective function returned in mdo.results.f and mdo.QP.f. That 
constant term can be found in mdo.QP.c1. There was an update to most_summary() 
to address this in this commit 
<https://github.com/MATPOWER/most/commit/258da10ce1ca37d7fcb403c0d40b58e424939ca0>.

    Ray



> On Mar 20, 2018, at 1:12 PM, Bainan Xia <[email protected]> wrote:
> 
> Thanks for the explanation J
>  
> You are right, I’ve checked fixed_gencost matrix and found all constant terms 
> there. However, I’m calculating the pure generation cost in each time period 
> in the following way (deterministic, no contingency, linear cost curve):
>  
> for t = 1:nt
> mpc = mdo.flow(t).mpc;
> total_gen0(t) = sum(totcost(mpc.gencost, mpc.gen(:,PG)));
> total_gen1(t) = sum(mpc.gencost(:,5).*mpc.gen(:,PG) + mpc.gencost(:,6)); 
> %Here mpc.gencost(:,6)==0
> total_gen2(t) = sum(mpc.gencost(:,5).*mpc.gen(:,PG) + mpc.fixed_gencost(:,6));
> end
>  
> Then I got following relationship:
> sum(total_gen0) = sum(total_gen1) < f < sum(total_gen2)
> Based on my understanding, sum(total_gen2) should be the correct total 
> generation cost, however, it turns out to be greater than the value of 
> objective function, f, which includes other costs as well. I’m confused about 
> this result.
>  
> Best,
> Bainan
>  
>  
> From: [email protected] 
> <mailto:[email protected]> 
> <[email protected] 
> <mailto:[email protected]>> On Behalf Of Ray 
> Zimmerman
> Sent: Tuesday, March 20, 2018 7:47 AM
> To: MATPOWER discussion forum <[email protected] 
> <mailto:[email protected]>>
> Subject: Re: Calculating pure generation cost and assign load profile for 
> each bus
>  
> a) It would take some time for me to dig into the details (Carlos, maybe you 
> remember more off the top of your head), but it has to do with the fact that 
> the constant term (“no-load cost" is only included in the cost if the unit is 
> committed, so it is actually removed from the part that is a function of Pg 
> and handled separately. I believe, if I am not mistaken, the constant term 
> for generator i in period t, scenario j, contingency k, can be found 
> inmdo.flow(t,j,k).mpc.fixed_gencost(i). And I believe the 
> probability-weighted "no-load" cost for generator i in period t can be found 
> in  mdo.UC.c00(i,t).
>  
> b) It is possible. Simply change the col field of the profile from 
> CT_TAREALOAD to CT_TLOAD. See Table 9-2 in the MATPOWER User’s Manual 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.pserc.cornell.edu_matpower_docs_MATPOWER-2Dmanual-2D6.0.pdf&d=DwMFaQ&c=f_hce7QtucnhnFZbRZTIlH6nx5mag1_14FtEFKPmHCI&r=GT1sxYZuEA8wCoyfVcH4pg&m=nDAUs7Zt5c8XGhApWD8dwQ-Yn_zlRfVdHY8ZvGcYNrc&s=7Bk8BJVY8-xxq7m8t2Ry24uNowPTLbJI8LwQdHvivZE&e=>,
>  in the description of MATPOWER’s apply_changes() 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.pserc.cornell.edu_matpower_docs_ref_matpower6.0_apply-5Fchanges.html&d=DwMFaQ&c=f_hce7QtucnhnFZbRZTIlH6nx5mag1_14FtEFKPmHCI&r=GT1sxYZuEA8wCoyfVcH4pg&m=nDAUs7Zt5c8XGhApWD8dwQ-Yn_zlRfVdHY8ZvGcYNrc&s=HHDbKVYEzqHiE5eUMhW71E3WNb9CI1g33Zf4R9vyh6Y&e=>
>  function, which is used to implement the profiles in MOST.
>  
> Hope this helps,
>  
>     Ray
>  
> 
> 
> On Mar 19, 2018, at 8:09 PM, Bainan Xia <[email protected] 
> <mailto:[email protected]>> wrote:
>  
> Hi guys,
>  
> I’ve got following two questions when solving multi-period UC problem.
>  
> a)       Given the result structure ‘mdo’, I’m calculating the total 
> generation cost for time period t in following way:
> mpc = mdo.flow(t).mpc;
> total_cost = sum(totcost(mpc.gencost, mpc.gen(:, PG)));
> However, I found the total cost is much less than my expectation. Then I 
> compared mdo.flow(t).mpc.gencost and mpc.gencost and found all the constant 
> terms (in my case, cost curves are quadratic and last column defines the 
> constant term) are zero in the previous matrix, which is different from the 
> base case mpc structure. I’m wondering what causes the issue.
>  
> b)      Previously, from the example cases (ex_load_profile), I’ve learned 
> how to assign the time series load profile for each area/load zone. Now, I 
> would like to assign specific time series load profile for each bus and 
> cannot find an example doing so. I’m wondering whether there is a way to do 
> that. Otherwise, I may use the naïve method: making the #area/#load zone the 
> same as the #bus, so that I could assign the load profile in the old way.
>  
> Thanks for the help!
>  
> Best,
> Bainan

Reply via email to