See FAQ #1 <http://www.pserc.cornell.edu/matpower/#lossminimization>.
Ray > On Jan 11, 2018, at 10:16 PM, [email protected] wrote: > > Hi, <> > I see. Can we add the power loss into objective function in runopf() ? > > --------------------------------------------------------- > Best regards, > Wei Lin 林巍 > Zhejiang University, > Zheda Road 38#, Hangzhou, P.R.China, 310027 > +86-13675865210 > > 发件人: Ray Zimmerman [mailto:[email protected] <mailto:[email protected]>] > 发送时间: 2018年1月11日 23:56 > 收件人: [email protected] <mailto:[email protected]> > 主题: Re: The question about extend OPF and the optimization tool > > (FYI, in the future, please address such questions to the MATPOWER-L mailing > list <http://www.pserc.cornell.edu/matpower/mailinglists.html#discusslist>, > not to me directly) > > > Yes, it is possible to add user-defined costs to the OPF. Please see Sections > 6.3 and 6.4 and Chapter 7 in the MATPOWER User’s Manual > <http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-6.0.pdf>. If you > need general non-linear costs, you will need to use the latest development > version of MATPOWER on GitHub <https://github.com/MATPOWER/matpower/> You > can find the corresponding version of the manual here > <https://www.dropbox.com/s/3qkji1cuyi075uj/MATPOWER-manual.pdf?dl=0> > describing how to use the non-linear user-defined costs and constraints. > > Regarding YALMIP, MATPOWER does not use it except when using SDP_PF, so you > cannot use it to modify the problem normally solved by runopf(). > > Ray > > > >> On Jan 10, 2018, at 9:54 PM, <[email protected] >> <mailto:[email protected]>> <[email protected] >> <mailto:[email protected]>> wrote: >> >> Dear matpower: >> Thanks for matpower solving lots of problem in my power simulation. >> I have a question about the objective function in OPF. Can the system add >> some user-defined function expecting the generators cost, Like power loss , >> voltage deviation ? >> And the matpower can be with some optimization tools like yalmip ? When I >> use yalmip , I define some variable but it can not be solve in matpower? >> Code like: >> clc;clear; >> x = sdpvar(14,1); >> assign(x,ones(14,1)); >> mpc = loadcase('case14'); >> mpc.bus(:,4) = mpc.bus(:,4) + value(x); >> mpopt = mpoption('verbose',0,'out.all',0); >> result = runpf(mpc,mpopt); >> f = sum(abs(get_losses(result))); >> F= [sum(x)<=50]; >> sdp_result = solvesdp(F,f); >> and the result show the yalmip is successfully sovled , but the >> result is not right. >> Hope you can help me. >> >> --------------------------------------------------------- >> Best regards, >> Wei Lin 林巍 >> Zhejiang University, >> Zheda Road 38#, Hangzhou, P.R.China, 310027 >> +86-13675865210
