You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In chapter 5.1.5 of the manual, it says that a set of contingencies can be applied to all periods and scenarios via loadmd. Alternatively, to apply contingencies only to some periods and scenarios, I think it should be used mdi.cont(t,j).contab.
I tried to apply this second method to the example most_ex4_dcopf_ss.m, in particular, the part of code relating to Secure Stochastic DC OPF (w/wind,cont,res,ramp).
I tried to apply some contingencies only to the second scenario (in total there are 3 scenarios and only one period per scenario):
I think I know what's going on. If the most.security_constraints option is set to the default –1, then most() decides whether to include contingencies by checking if contingencies are specified in the input. The issue is that it makes a faulty assumption and only checks to see whether mdi.cont(1,1).contab is present and not empty. If it doesn't find a contab there, it incorrectly assumes the problem is not security constrained and skips over any contingency handling.
I consider this a bug and plan to fix it to ensure that it doesn't disable contingency handling unless there are no contingencies specified in any period or scenario.
I was hoping you could set the most.security_constraints option to 1 and it would just work, but I just tried it and got the following error:
Error using most (line 170)
most: MDI.cont(t,j).contab cannot be empty when MPOPT.most.security_constraints = 1
And commenting out that check doesn't work either. So, it looks like this is yet another example of the wise adage ... "if you didn't test it, it doesn't work." 😞
Thank you very much for helping! I agree with the adage, and if the discovery of a bug could lead to being "remembered" in Appendix B of the manual, even better 😄
In chapter 5.1.5 of the manual, it says that a set of contingencies can be applied to all periods and scenarios via
loadmd
. Alternatively, to apply contingencies only to some periods and scenarios, I think it should be usedmdi.cont(t,j).contab
.I tried to apply this second method to the example
most_ex4_dcopf_ss.m
, in particular, the part of code relating toSecure Stochastic DC OPF (w/wind,cont,res,ramp)
.I tried to apply some contingencies only to the second scenario (in total there are 3 scenarios and only one period per scenario):
But nothing happens, as if the contingencies weren't there.
Instead, if I use
mdi.cont(t,j).contab
to apply these contingencies to all scenarios, as if I usedloadmd
, the program works correctly:I can't understand where I'm wrong, and above all I don't know if I understood the theory correctly.
The text was updated successfully, but these errors were encountered: