Dear Yang:

If I understand correctly what you have in mind, then it seems to me that you have two choices:  1) approximate the exponential in a limited range with a higher order polynomial (which MATPOWER can easily handle), or 2) write matlab code to implement user-defined cost functions (i.e., exponential, including their gradients and hessians!).  If you are not adept at writing code at that level, I suggest that you go for option 1, and take into account the modeling error incurred by using a polynomial approximation.

carlos.

Yang wrote:
Ray, thanks for your guidance. And for runopf_w_res()I have some problems. Actually, I read a paper, it divide the 30 buses into 3 areas, I don' know the basis, and how can I realize it in matpower, whether the areas are zones in matpower. The mannual is very well, but my coding is at a low level, so I can't absorb it quickly and easily.
In fact, what I want to do is about the following:
Part One, there are two types of objectives function:
the first is
.
It is like runopf_w_res(), and I want to divide it into 3 areas like the paper I read.
And the second is
It adds the environment factor. And the Exponential term is key need to deal with. Part Two is I want to make the second objective function dynamic, like diving 1h into 6 periods, each period is 10 minutes. If I finish Part One, I can do this by modifying the data, but how can I make it smarter.

Thanks for your patience and guidance.

Warm regards.
Yang.






At 2020-01-03 01:36:43, "Ray Daniel Zimmerman" <[email protected]> wrote:

    Hi Yang,

    It’s not clear whether you simply want to use the fixed reserves
    extension (see Section 7.6.1 in the MATPOWER User’s Manual
    <https://matpower.org/docs/MATPOWER-manual-7.0.pdf>) or you want
    to implement your own OPF extension. In the first case you can
    simply use runopf_w_res(). In the second, please see Chapter 7 and
    the code for the various extensions described in Section 7.6.

       Ray


    On Dec 25, 2019, at 8:11 PM, Yang <[email protected]
    <mailto:[email protected]>> wrote:

    Dear sir,
    I want to do the extensible OPF, and I read paper /MATPOWER’s
    Extensible Optimal Power Flow Architecture/.
    The objective function is min f(x)+fu(x,z),and fu=sum(ci*ri),
    following the code:
    Ar = [I I];
    om = add_vars(om, 'R', ng, [], Rmin, Rmax);
    om = add_constraints(om, 'Pg_plus_R', Ar, [], Pmax, {'Pg', 'R'});
    om = add_constraints(om, 'Rreq', Az, Rreq, [], {'R'});
    om = add_costs(om, 'Rcost', struct('N',I,'Cw',Rcost), {'R'});

    I add these into .m file, as for add_vars if I should change [],
    Rmin, Rmax into data I need, and do the same with other codes.
    I don't know if it's right.
    Best regards.

    Yang.








Reply via email to