Oh, so you are not only planning to modify the formulation, but you also want 
to implement your own solver? I assumed you'd be using one of the existing 
solvers.  If you are going to implement your own solver, then there is a lot 
more work involved than the 3 steps I outlined. Unless you have good reasons 
that I'm not aware of, I would recommend sticking with the existing solvers.

If you modify opf_consfcn.m and opf_hessfcn.m as suggested, there are several 
existing solvers than can automatically be used, namely MIPS, fmincon, IPOPT, 
and KNITRO. With the proper options, I believe both fmincon and IPOPT can use 
methods that do not require a user-supplied Hessian, so they may work just fine 
without updating opf_hessfcn.m, but they will likely be slower than the methods 
that utilize a user-supplied Hessian.

-- 
Ray Zimmerman
Senior Research Associate
419A Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645




On Feb 17, 2012, at 5:29 AM, 델카스틸로 wrote:

> 
> 
> Professor Zimmerman:
> 
> Good day to you sir. Related to your response regarding my query in adding of 
> non-linear user defined constraints, you have given me three steps as 
> enumerated below:
> 
> 1. add a new set of nonlinear constraints in opf_setup.m around line 243.
> 2. add the implementation of the constraints and corresponding gradients to 
> opf_consfcn.m
> 3. modify the hessian accordingly in opf_hessfcn.m
> 
> I am planning to use Sequential Quadratic Programming for my Optimization 
> Method. Since this method does not require the hessian information, I may not 
> need to modify the hessian in opf_hessfcn.m. Is this right, sir?
> 
> Morever, I would appreciate it sir if you could suggest an optimization 
> method that best fit for non-linear user-defined constraints for OPF. Thank 
> you very much sir.
> 
> 
> Very Respectfully Yours,
> 
> Manuelito Y. Del Castillo, Jr.
> --- Original Message ---
> From : "Ray Zimmerman"<[email protected]>
> To : "MATPOWER discussion forum"<[email protected]>
> Date : 2012/02/16 Thursday PM 10:22:14
> Subject : Re: Non-Linear User-defined constraints
> 
> Unfortunately, as the manual states, the user-defined constraints included by 
> MATPOWER are only linear. If you want to include additional non-linear 
> constraints, you will need to get into the details of the OPF implementation 
> and modify the files that compute the constraints and their derivatives. It 
> is a non-trivial task. At a minimum, you will need to do the following ...
> 
> 1. add a new set of nonlinear constraints in opf_setup.m around line 243.
> 2. add the implementation of the constraints and corresponding gradients to 
> opf_consfcn.m
> 3. modify the hessian accordingly in opf_hessfcn.m
> 
> If you do end up doing this, I'd love to see the result. It would be nice to 
> make this process as easy as possible so your experience would be helpful.
> 
> -- 
> Ray Zimmerman
> Senior Research Associate
> 419A Warren Hall, Cornell University, Ithaca, NY 14853
> phone: (607) 255-9645
> 
> 
> 
> 
>>  
>> 
>> 

Reply via email to