Hi Jubeyer,
I suggest adding a new value for the opf.flow_lim option to indicate this
combination of mixed branch constraints. Then do a multi-file search of the
code to find everywhere that option is used and insert a conditional on your
new value and implement your mixed case. You’ll definitely have to do it for
the evaluation of h and dh in opf_branch_flow_fcn() and for d2H in
opf_branch_flow_hess(), but I suspect there may be some other places as well.
Ray
> On May 20, 2019, at 1:14 PM, Jubeyer Rahman <[email protected]> wrote:
>
> Hi Ray,
>
> Thanks for your reply. I would like to ask some more help on modifying the
> opf_branch_flow_fcn.m. Here goes my description:
>
> As far as I know, matpower does not discriminate between transformer and
> non-transformer branch, but for my case I have two different type of
> constraints for non-transformer and transformer branches. For non-transformer
> lines I have flow limit constrained by current whereas for transformer, flow
> limits are constrained by apparent power rating. Can you suggest, how should
> I incorporate those two situations together.
>
> The way, I am currently adopting to implement those constraints, is first I
> consider all the branch flows constrained by line current rating. Then, I
> calculate the transformer branch constraints as per apparent power ratings.
> Eventually, I replace previously calculated transformer branch information by
> this new quantities.
>
> Do you think this will create any problem for further processing with the h
> and dh , determined from branch_flow_fcn.m?
>
> Regards,
> Jubeyer
>
> On Mon, May 20, 2019 at 12:16 PM Ray Daniel Zimmerman <[email protected]
> <mailto:[email protected]>> wrote:
> a. radians
>
> b. In both of those cases, there are no constrained branches (i.e. all
> mpc.branch(:, RATE) are zero), meaning there are no branch flow limits to
> evaluate, so opf_branch_flow_fcn() does not need to be called.
>
> c. A function pointer to opf_branch_flow_fcn() is declared with the input
> parameter il in line 320 of opf_setup.m
> <https://github.com/MATPOWER/matpower/blob/a6a489c3d3a83f5c65fc7e0a5dc5306eb7cc6ac0/lib/opf_setup.m#L320>,
> and il is defined in line 287
> <https://github.com/MATPOWER/matpower/blob/a6a489c3d3a83f5c65fc7e0a5dc5306eb7cc6ac0/lib/opf_setup.m#L287>.
>
> Ray
>
>
>
>> On May 16, 2019, at 11:51 AM, Jubeyer Rahman <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi,
>>
>> I have several questions on the code in opf_branch_flow_fcn.m;
>>
>> a. What is the unit of voltage angle 'Va' within opf_branch_flow_fcn.m ,
>> degree or radian?
>>
>> b. While running opf for some of the cases like case14, case118, etc. when I
>> set the breakpoint within the opf_branch_flow_fcn.m, it does not halt there;
>> what are the reasons for that? Though for cases like case9 or case5, it does
>> enter in the branch_flow_fcn code?
>>
>> c. where the 'il' (an input to opf_branch_flow_fcn) is first declared? and
>> which one is the immediate code before opf_branch_flow_fcn where 'il' has
>> been modified?
>>
>> Regards,
>> Jubeyer
>>
>>
>