Dear Ray,

Thank you for the detailed explanation and pointing me to the relevant
chapters in the MATPOWER manuals. I will definitely try the methods
you mentioned.

Thank you again for your help.

Ray Daniel Zimmerman <[email protected]> 于2025年2月26日周三 00:12写道:
>
> Sorry, I don’t have time at the moment for a more detailed answer, but there 
> are essentially two options:
>
> 1. Legacy framework - Study the examples in Chapter 7 of the MATPOWER User’s 
> Manual to learn how to add custom costs via callback functions.
> 2. Flexible framework - See Chapter 9 on Customizing MATPOWER, in the 
> MATPOWER Developer’s Manual. In this case, you’ll probably want to create an 
> extension that overrides one of the subclasses of mme_branch_opf_ac to add 
> your costs to the math model layer.
>
> In either case, you will need code that implements the polynomial and it’s 
> 1st and 2nd derivatives.
>
> Best,
>
>     Ray
>
>
> On Feb 6, 2025, at 7:05 PM, Min Zhou <[email protected]> wrote:
>
> Dear Community,
>
> I am trying to add a penalty term (a 4-order polynomial function) of
> the branch flow of a given line on the objective when solving AC-OPF.
> I was wondering if there a convenient way to do it?
>
> Many thanks if you can give me some advice.
>
> Best regards.
>
> --
> Min ZHOU
> School of Data Science
> City University of Hong Kong
>
>


-- 
Min ZHOU
School of Data Science
City University of Hong Kong


Reply via email to