Dear Professor,

first of all thank you for your help.

I modify profiles.values in the main file just because it is more clear to me. 
I believe it doesnt matter in what way we change the load profile matrix. 


To present my problem I attach fragment of my results with changed load 
profile. I have prepared 4 different UC problems. 



-----------------------------------------------------------------

Assumtions:
Generators 1-13 must work
Pmin of generators 1-13 is 0.9Pmax 

-----> sum(mpc.gen([1:13],PMAX)) = 4450

-----> sum(mpc.gen([1:13],PMIN)) = 4005
-----> min(mpc.gen(14:end),PMIN) = 43.7
-----> no wind farms (to simplify)

-----------------------------------------------------------------



______________________________________________________________________________________________

Case no. 1 Xl = 4050/4242 (flat load profile equal 4050)
 nt = 11; 

 

ms.Pg = 

 495.0000 495.0000 495.0000 495.0000 495.0000 495.0000 495.0000 495.0000 
495.0000 495.0000 495.0000
 166.5000 166.5000 166.5000 166.5000 166.5000 166.5000 166.5000 166.5000 
166.5000 166.5000 166.5000
 288.0000 288.0000 288.0000 288.0000 288.0000 288.0000 288.0000 288.0000 
288.0000 288.0000 288.0000
 372.6000 372.6000 372.6000 372.6000 372.6000 372.6000 372.6000 372.6000 
372.6000 372.6000 372.6000
 96.3000 96.3000 96.3000 96.3000 96.3000 96.3000 96.3000 96.3000 96.3000 
96.3000 96.3000
 107.1000 107.1000 107.1000 107.1000 107.1000 107.1000 107.1000 107.1000 
107.1000 107.1000 107.1000
 273.6000 273.6000 273.6000 273.6000 273.6000 273.6000 273.6000 273.6000 
273.6000 273.6000 273.6000
 133.2000 133.2000 133.2000 133.2000 133.2000 133.2000 133.2000 133.2000 
133.2000 133.2000 133.2000
 229.5000 229.5000 229.5000 229.5000 229.5000 229.5000 229.5000 229.5000 
229.5000 229.5000 229.5000
 234.0000 234.0000 234.0000 234.0000 234.0000 234.0000 234.0000 234.0000 
234.0000 234.0000 234.0000
 441.9000 441.9000 441.9000 441.9000 441.9000 441.9000 441.9000 441.9000 
441.9000 441.9000 441.9000
 442.8000 442.8000 442.8000 442.8000 442.8000 442.8000 442.8000 442.8000 
442.8000 442.8000 442.8000
 724.6800 724.6800 724.6800 724.6800 724.6800 724.6800 724.6800 724.6800 
724.6800 724.6800 724.6800
 0 0 0 0 0 0 0 0 0 0 0
 44.8200 44.8200 44.8200 44.8200 44.8200 44.8200 44.8200 44.8200 44.8200 
44.8200 44.8200
 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0
______________________________________________________________________________________________

Case no. 2 Xl = 4550/4242 (flat load profile equal 4550)
 nt = 11; 

ms.Pg = 

 495.0000 495.0000 495.0000 495.0000 495.0000 495.0000 495.0000 495.0000 
495.0000 495.0000 495.0000
 166.5000 166.5000 166.5000 166.5000 166.5000 166.5000 166.5000 166.5000 
166.5000 166.5000 166.5000
 288.0000 288.0000 288.0000 288.0000 288.0000 288.0000 288.0000 288.0000 
288.0000 288.0000 288.0000
 372.6000 372.6000 372.6000 372.6000 372.6000 372.6000 372.6000 372.6000 
372.6000 372.6000 372.6000
 96.3000 96.3000 96.3000 96.3000 96.3000 96.3000 96.3000 96.3000 96.3000 
96.3000 96.3000
 107.1000 107.1000 107.1000 107.1000 107.1000 107.1000 107.1000 107.1000 
107.1000 107.1000 107.1000
 273.6000 273.6000 273.6000 273.6000 273.6000 273.6000 273.6000 273.6000 
273.6000 273.6000 273.6000
 133.2000 133.2000 133.2000 133.2000 133.2000 133.2000 133.2000 133.2000 
133.2000 133.2000 133.2000
 229.5000 229.5000 229.5000 229.5000 229.5000 229.5000 229.5000 229.5000 
229.5000 229.5000 229.5000
 234.0000 234.0000 234.0000 234.0000 234.0000 234.0000 234.0000 234.0000 
234.0000 234.0000 234.0000
 441.9000 441.9000 441.9000 441.9000 441.9000 441.9000 441.9000 441.9000 
441.9000 441.9000 441.9000
 442.8000 442.8000 442.8000 442.8000 442.8000 442.8000 442.8000 442.8000 
442.8000 442.8000 442.8000
 724.6800 724.6800 724.6800 724.6800 724.6800 724.6800 724.6800 724.6800 
724.6800 724.6800 724.6800
 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0
 438.4222 438.4221 438.4221 438.4221 438.4221 438.4221 438.4221 438.4221 
438.4221 438.4221 438.4221
 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0
 106.3978 106.3979 106.3979 106.3979 106.3979 106.3979 106.3979 106.3979 
106.3979 106.3979 106.3979




______________________________________________________________________________________________

Case no. 3 Xl = 4550/4242 (variable profile with Pmax = 4550)
 nt = 10;
ms.Pg = 

 515.2955 531.7955 548.2955 531.7955 515.2955 498.7955 495.0000 495.0000 
495.0000 495.0000
 175.9670 181.0074 185.0000 180.9662 176.0235 174.6296 170.9017 167.1316 
168.5251 166.5000
 317.6509 320.0000 320.0000 320.0000 317.8575 308.6551 299.0551 289.4551 
290.4058 288.0000
 400.9407 413.3607 414.0000 413.3827 400.9627 396.0318 385.2871 374.4205 
378.4369 372.6000
 107.0000 107.0000 107.0000 107.0000 106.5686 103.3586 100.1486 96.9386 96.3000 
96.3000
 119.0000 119.0000 119.0000 119.0000 118.5202 114.9502 111.3802 107.8102 
107.1000 107.1000
 301.7684 304.0000 304.0000 304.0000 301.9647 293.2223 284.1023 274.9823 
275.8855 273.6000
 140.7736 144.8059 148.0000 144.7730 140.8188 139.7036 136.7214 133.7053 
134.8201 133.2000
 253.1281 255.0000 255.0000 255.0000 253.2927 245.9595 238.3095 230.6595 
231.4171 229.5000
 258.0914 260.0000 260.0000 260.0000 258.2592 250.7823 242.9823 235.1823 
235.9547 234.0000
 475.5118 490.2418 491.0000 490.2678 475.5378 469.6898 456.9467 444.0591 
448.8225 441.9000
 476.4802 491.2402 492.0000 491.2663 476.5063 470.6464 457.8774 444.9635 
449.7366 442.8000
 754.3925 778.5485 802.7045 778.5485 754.3925 730.2365 724.6800 724.6800 
724.6800 724.6800
 0 0 0 0 0 0 0 0 0 0
 104.0000 104.0000 104.0000 104.0000 104.0000 103.3388 96.6078 81.0120 62.9160 
44.8200
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0


______________________________________________________________________________________________

Case no. 4 Xl = 4550/4242 (variable profile with Pmax = 4550)
 nt = 11;

MOST: MIQP solver 'GUROBI' failed with exit flag = -4
 You can query the workspace to debug.
 When finished, type the word "return" to continue.

______________________________________________________________________________________________

The last case is something I dont understand. However Pload(11) = 4039.9 the UC 
is cannot be converged. If the generator 15 is shutdown it is would possible to 
get the UC calculated.I assume this is because Gurobi is not taking startups 
nad shutdowns into account at all. I attach m-files and 3 figures for you if 
you could check it. Thank you very much.

Best Regards,
Michal Polecki


On 10/08/18 15:28, Ray Zimmerman  <[email protected]> wrote: 
> 
> 
> 
> 
> 
> 
> There is nothing here that is necessarily an error, though it’s not clear to 
> me why you are modifying the load profile after loading it with 
> getprofiles(), as opposed to modifying the profile file itself, though I’m 
> sure there could be valid reasons to do it that way, depending on the context.
> 
> 
> 
> 
> But I still think answering my other question is critical for tracking down 
> what is going on. Namely, have you confirmed that the load profile is not 
> being applied? Is the generation schedule in the result completely flat?
> 
> 
> 
> 
>  Ray
> 
> 
> 
> 
> 
> > 
> > On Sep 29, 2018, at 2:22 AM, Michal Polecki <[email protected]> 
> > wrote:
> > 
> > 
> > 
> > Dear Profesor,
> > 
> > 
> > 
> > 
> > I can share it. It is quite complicated though. I'll send you 4 files 
> > necessary for obtaining the load profile.
> > 
> > 
> > 
> > 
> > 
> > To use the files in Matpower I wrote a code like this:
> > 
> > 
> > 
> > 
> > loadbuses = MMloadbuses(mpc);
> > profiles = getprofiles('MM_ex_load_profile_118bus');
> > profiles.rows = loadbuses;
> > profiles.values(:,1,:) = MMloads_profiles(mpc,nt);
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Can you spot any mistakes?
> > 
> > 
> > 
> > 
> > Best Regards,
> > 
> > Michał Połecki
> > 
> > 
> > 
> > 
> > 
> > 
> > On 09/28/18 16:02, Ray Zimmerman  <[email protected]> wrote: 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > I’m afraid I can’t guess without seeing the details of what you are 
> > > doing. But, have you confirmed that the load profile is not being 
> > > applied? Is the generation schedule in the result completely flat?
> > > 
> > > 
> > > 
> > > 
> > > If so, can you share the load profile file you are using? It should look 
> > > something like ex_load_profile.m.
> > > 
> > > 
> > > 
> > > 
> > >  Ray
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > > 
> > > > On Sep 26, 2018, at 2:48 PM, Michal Polecki 
> > > > <[email protected](javascript:main.compose()> wrote:
> > > > 
> > > > 
> > > > 
> > > > Dear Profesor,
> > > > 
> > > > 
> > > > 
> > > > 
> > > > first of all thank you for your time. To tell the story short: I want 
> > > > to perform ecomonic wind power curtailment. 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Yes, I meant length of the planning hotizon (usually called nt).
> > > > 
> > > > I model wind as deterministic.
> > > > 
> > > > Yes, the wind is included in the commitment (this is the purpose of the 
> > > > whole analysis. As I wrote, my goal is to observe the economic 
> > > > curatilment of wind farms)
> > > > 
> > > > I started from zero costs of start-ups and shutdowns. What is 
> > > > unexpected about the results is the fact that program gives me fixed 
> > > > UC. You have already written in the other e-mail that: 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > "My question was whether you checked the MOST results for the cases 
> > > > that run but do not include any startup or shutdown of units to confirm 
> > > > that the total generation is tracking the load profile you are 
> > > > attempting to specify. If there is an error somewhere in the inputs 
> > > > that prevents the load profile being applied as expected, it would 
> > > > result in a fixed commitment schedule like this" 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > I don't know what could be "an error somewhere in the inputs that 
> > > > prevents the load profile being applied as expected". I think you have 
> > > > precisely described my problem, but I dont know where the error could 
> > > > appear. Could you suggest me anything?
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Best Regards,
> > > > 
> > > > Michał Połecki
> > > > 
> > > > 
> > > > 
> > > > 
> > > > On 09/17/18 19:04, Ray Zimmerman  
> > > > <[email protected](javascript:main.compose()> wrote: 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > I don’t think we have enough details of the case you are running and 
> > > > > what you find unexpected about the results and why.
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > What do you mean by “longest possible number of terms”? Do you mean 
> > > > > the maximum length of the planning horizon?
> > > > > 
> > > > > Are you modeling the wind as stochastic or deterministic?
> > > > > 
> > > > > Are you including wind in the commitment? I would recommend setting 
> > > > > them as must-run with PMIN = 0.
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >  Ray
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > > 
> > > > > > On Sep 13, 2018, at 10:09 AM, Michal Polecki 
> > > > > > <[email protected]> wrote:
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Dear All,
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > I've wrote a script which is checking longest possible number of 
> > > > > > terms in most. In my case it was 152 terms (for 118 bus case with 
> > > > > > 13 wind farms). As I previously written it is not clear to me why 
> > > > > > the Gurobi is chosing the solution in which there is no Startup and 
> > > > > > shutdown. In case Pmin of convetional generation greater than Pload 
> > > > > > it is curtailing wind generation (which gencost is zero). I've 
> > > > > > attached plut_uc of the result file.
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > This is options I have.
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > mpopt = mpoption('verbose', verbose);
> > > > > > mpopt = mpoption(mpopt, 'out.gen', 1);
> > > > > > mpopt = mpoption(mpopt, 'model', 'AC');
> > > > > > mpopt = mpoption(mpopt, 'most.skip_prices',1);
> > > > > > mpopt = mpoption(mpopt, 'most.solver', 'gurobi');
> > > > > > mpopt = mpoption(mpopt, 'most.uc.run', '1');
> > > > > > mpopt = mpoption(mpopt, 'gurobi.method', -1); %% automatic
> > > > > > % mpopt = mpoption(mpopt, 'gurobi.method', 0); %% primal simplex
> > > > > > % mpopt = mpoption(mpopt, 'gurobi.method', 1); %% dual simplex
> > > > > > % mpopt = mpoption(mpopt, 'gurobi.method', 2); %% barrier
> > > > > > mpopt = mpoption(mpopt, 'gurobi.threads', 2);
> > > > > > mpopt = mpoption(mpopt, 'gurobi.opts.MIPGap', 0);
> > > > > > mpopt = mpoption(mpopt, 'gurobi.opts.MIPGapAbs', 0);
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Best Regards,
> > > > > > 
> > > > > > Michał Połecki
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > On 09/10/18 21:15, Michal Polecki  <[email protected]> 
> > > > > > wrote: 
> > > > > > > 
> > > > > > > Thank you for your answer.
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 1) I have already checked if the load can be covered by 
> > > > > > > generation and if the ramps of generators are suffcient. I'll do 
> > > > > > > it one more time, thank you.
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 2) Gurobi gives exitflag -4.
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Best Regards,
> > > > > > > 
> > > > > > > Michał Połecki
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On 09/10/18 16:20, Ray Zimmerman  <[email protected]> wrote: 
> > > > > > > > 
> > > > > > > > Did you check that the load profile is working correctly? Is 
> > > > > > > > the total generation dispatch following the load profile you 
> > > > > > > > expected?
> > > > > > > > 
> > > > > > > > Also, what do you mean “it is impossible for MATPOWER to 
> > > > > > > > calculate” for the 24 hour horizons? Does Gurobi run forever, 
> > > > > > > > find that the problem is infeasible, or what?
> > > > > > > > 
> > > > > > > >  Ray
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > > On Sep 10, 2018, at 8:24 AM, Michal Polecki 
> > > > > > > > > <[email protected]> wrote:
> > > > > > > > > 
> > > > > > > > > Dear Creators and Users of Matpower,
> > > > > > > > > 
> > > > > > > > > I have a problem with Unit Commiment problem. I've studied 
> > > > > > > > > all examples attached to Matpower and also I've created some 
> > > > > > > > > more cases before going to my large problem. It seemed to 
> > > > > > > > > give me correct results. I'm using Gurobi.
> > > > > > > > > Now I'm trying to run 118 bus case with 13 additional wind 
> > > > > > > > > farms. What I have observed is, that MATPOWER is sticking to 
> > > > > > > > > the first plan of work (no startups or shutdowns though cost 
> > > > > > > > > of it is 0). What is more is some cases it is impossible for 
> > > > > > > > > MATPOWER to calculate long period e.i nt = 24. I have written 
> > > > > > > > > simple script to cut this long period into 4 6-hour periods. 
> > > > > > > > > Then Matpower was able to calculate each of them. Plot_UC of 
> > > > > > > > > each 6-hour period is attached.
> > > > > > > > > 
> > > > > > > > > Do you have an idea what could be problem? 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > nt = 6;
> > > > > > > > > mpc = loadcase('MMcase118v5');
> > > > > > > > > Pg = mpc.gen(:,PG);
> > > > > > > > > 
> > > > > > > > > for i = 1:4
> > > > > > > > > result = MM_118bus_UC(nt,Xwind,Xload,cw,cl,Pg);
> > > > > > > > > if result.results.f>0
> > > > > > > > > res(j) = result;
> > > > > > > > > Pg = result.results.Pc([1:19],nt);
> > > > > > > > > cw = cw+nt;
> > > > > > > > > cl = cl+nt;
> > > > > > > > > j= j+1;
> > > > > > > > > else
> > > > > > > > > break
> > > > > > > > > end
> > > > > > > > > end
> > > > > > > > > 
> > > > > > > > > Michał Połecki 
> > > > > > > > > 
> > > > > > > > > -- 
> > > > > > > > > Michał Połecki <P1.jpg><P2.jpg><P3.jpg><P4.jpg>
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > -- 
> > > > > > > Michał Połecki
> > > > > > > 
> > > > > > -- 
> > > > > > Michał Połecki<152_periods.jpg> 
> > > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >  
> > > > > 
> > > > -- 
> > > > Michał Połecki
> > > > 
> > > 
> > > 
> > > 
> > > 
> > >  
> > > 
> > -- 
> > Michał Połecki<MMloads_profiles.m> <MMloadbuses.m> <MMobc_system_godz.mat> 
> > <MM_ex_load_profile_118bus.m> 
> > 
> 
> 
> 
> 
>  
> 
-- 
Michał Połecki

Attachment: Matpower_flat_UC.7z
Description: Binary data

Reply via email to