Re: Question regarding adding cost function

2020-03-18 Thread Ray Daniel Zimmerman
; Sent: Tuesday, March 17, 2020 9:55 AM To: MATPOWER-L mailto:matpowe...@list.cornell.edu>> Subject: Re: Question regarding adding cost function I don’t think your N matrix is what you want … it looks like the number of columns would be correct for a 48-bus system, but the first row would appear

Re: Question regarding adding cost function

2020-03-17 Thread Ali Mohammadi
=0> From: bounce-124463678-85971...@list.cornell.edu<mailto:bounce-124463678-85971...@list.cornell.edu> mailto:bounce-124463678-85971...@list.cornell.edu>> on behalf of Ray Daniel Zimmerman mailto:r...@cornell.edu>> Sent: Monday, Mar

Re: Question regarding adding cost function

2020-03-17 Thread Ray Daniel Zimmerman
__ From: bounce-124463678-85971...@list.cornell.edu<mailto:bounce-124463678-85971...@list.cornell.edu> mailto:bounce-124463678-85971...@list.cornell.edu>> on behalf of Ray Daniel Zimmerman mailto:r...@cornell.edu>> Sent: Monday, March 16, 2020 10:45 AM To: MATPOWER-L m

Re: Question regarding adding cost function

2020-03-16 Thread Ali Mohammadi
behalf of Ray Daniel Zimmerman Sent: Monday, March 16, 2020 10:45 AM To: MATPOWER-L Subject: Re: Question regarding adding cost function The opf_model object (om) is created by opf_setup() which is called automatically when you execute runopf(). In order to modify it directly using om.add_qu

Re: Question regarding adding cost function

2020-03-16 Thread Ray Daniel Zimmerman
The opf_model object (om) is created by opf_setup() which is called automatically when you execute runopf(). In order to modify it directly using om.add_quad_cost(), you will need to define a callback function as described in Chapter 7 of the manual. For a simple addition like this, it may be ea

Question regarding adding cost function

2020-03-12 Thread Ali Mohammadi
Hi, I want to add a cost function in my objective function. I wrote the code as follows but I got error please correct me, If my code is wrong (this is just the code example). case_name='9'; mpc=loadcase(['case',case_name]); om=opt_model(mpc); % test = loadcase('t_case30_userfcns') % res=runopf