The power flow in branch 3 is not an optimization variable, so you need to 
express your cost as a function of the optimization variables. For an AC power 
flow model, this is non-linear, so that’s problematic. For a DC power flow 
model, however, the flow is a linear function of the angles so you can apply a 
user-defined cost to it. I suggest you take a look at toggle_softlims.m for an 
example of code that puts a cost on the flow that exceeds a threshold. What you 
want to do is nearly identical (for the DC case), except that your threshold 
would be zero and you are only doing it for a specific line.

    Ray


> On Mar 20, 2015, at 8:59 AM, 李岩松 <[email protected]> wrote:
> 
> Dear All:
> 
>    I have studied the ‘6.3 Extended OPF Formulation’ and '7 Extending the 
> OPF’ in ‘manual.pdf’ to include additional cost in the function but failed to 
> figure it out. 
> 
>   The default objective function is the total cost of all the generators per 
> hour. 
> 
> 
>   Now I want to add ‘Pbranch3*ξ’, in which Pbranch3 is the active power 
> transferred on branch 3 and ξ is the electricity price which is a constant.
> 
> <截图1.png>
> 
>   
> With greatest pleasure to get any response.
> Yours sincerely 
> Yansong Li
> 2015/03/20
> 
> 

Reply via email to