It turns out that I was recently faced with a similar situation, so I implemented another MATPOWER extension to convert the limits on certain lines to soft limits, with a simple linear cost on line violations. I plan to include it in the final release of MATPOWER 5, but I will send it to you off-list now. Hopefully, it does exactly what you want.
Sorry for the lack of good clear examples in the manual of adding additional costs, constraints. I hope to remedy that at some point. For the time being, there is an example buried in the test suite, starting around line 185 in t/t_opf_mips.m. -- Ray Zimmerman Senior Research Associate B30 Warren Hall, Cornell University, Ithaca, NY 14853 USA phone: (607) 255-9645 > On Oct 29, 2014, at 11:03 AM, mohd <[email protected]> wrote: > > Good Morning all, > > I am using a DC OPF to be tested in a real case system. However, the problem > does not converge. However, if i remove transmission constraint, then the > problem is solved. Upon further inspection, i found some lines are violating > the constraint. When checking the high concentrated load area, i found the > least resistance path carries the most amount of the flow, while the high > resistance path carries less, which is logical and well-known. Now, what I am > trying to do is to add a penalty function when lines exceeds their capacity > to encourage the flow to the high resistance path, which is taken care of by > the OPF since it tries to minimize the obj function. Since line limits are > already included as part of my OPF in matpower, my understanding is that i > need to add penalty function to the objective function only. If so, when i > followed the manual, i kind of got lost with several matrices that needs to > be created and defined and i wish that matpower showed an example of > modifying the objective function, so i can follow and make an analogy. So, i > appreciate any help that can be provided or direction that can lead me to an > example that can be easily followed. Thanks.
