You are exactly right. The issue is that there is one simple clarifying word 
missing from the answer in the FAQ. It should say “positive, constant, equal 
marginal costs”, which is what was intended. I guess I assumed it was clear 
from the context, but let me add that to keep anyone else from tripping over 
that issue.

Thanks,

    Ray


> On Aug 17, 2017, at 9:03 AM, Ehsan Hejri <[email protected]> wrote:
> 
> Dear community,
> 
> Hi. I have written a very simple OPF myself with objective function of loss 
> minimization and I compared my results with matpower standard opf results.  
> 
> My OPF program: 
> 
> - Input data : 'case6ww' in matpower 
> - ObjFcn = ∑Pg - ∑Pd
> - ∑Pd = const
> -  Flow limits  : not considered in my program
> -  Solver : fmincon 
> 
> Matpower Standard OPF program  
> 
> - Flow limits:  not considered  so : rateA = 0 for all lines
> - Solver : MIPS  
> - generator cost data : My question 
> 
> I am only getting the same answer when mpc.gencost is like below : 
> 
> 
> TCL MERGE ERROR ( 08/17/2017 13:36:22 ): "invalid command name ">""
OutmailID: 121731364, List: 'matpower-l', MemberID: 75174736
SCRIPT: "generator cost data > %        1       startup shutdown                
n       x1      y1      ...     xn      yn > %  2       startup shutdown        
n       c(n-1)  ...     c0 > mpc.gencost = [ >  2       0               0       
              2 1           0; >        2       0               0               
      2 1           0; >        2       0               0                     2 
1           0; > ];  >  > However, in FAQs of website it is mentioned that for 
loss minimization >  "Assign positive, constant, equal costs to all generators" 
> which  means I think:  >  >"
 generator cost data
> %     1       startup shutdown                n       x1      y1      ...     
> xn      yn
> %     2       startup shutdown        n       c(n-1)  ...     c0
> mpc.gencost = [
>       2       0               0                     2 0           1;
>       2       0               0                     2 0           1;
>       2       0               0                     2 0           1;
> ]; 
> 
> In this case my results are different.
> 
> I think costs should not be constant. It should be linear and P dependent 
> like :
>  
> C(P1) = P1
> C(P2) = P2
> C(P3) = P3
> 
> So Objective function becomes :
> 
> Objective_costfcn =  P1+P2+P3 = ∑Pg
> 
> Can anyone help me to understand this problem and fix my own program?
> 
> 
> Best Wishes,
> Ehsan
> 
> 

Reply via email to