Hi Ahmad,
  If you are referring to cpf_default_callback.m then NO, you do need to modify 
it. The callback function(s) are basically “post-step” that do not alter the 
cpf. They are meant to be used for tracking system states for logging, 
visualization, or other similar needs.

Would you be willing to contribute your code to MATPOWER? I can work with you 
on cleaning up the code once it is ready.

Thanks,
Shri


From: Ahmad Sadiq Abubakar 
<[email protected]<mailto:[email protected]>>
Reply-To: MATPOWER discussion forum 
<[email protected]<mailto:[email protected]>>
Date: Wednesday, May 10, 2017 at 7:44 AM
To: MATPOWER discussion forum 
<[email protected]<mailto:[email protected]>>
Subject: Re: CPF termination

Hi Shrirang,

Thank you for the insight. I try to use cpf_target_lam_event as template, do I 
also need to write a callback function for my Vlimts and Llimits event? or 
modify the default callback function for cpf termination?

Kindly excuse my too basic questions, I am novice in coding.

In anticipation of your reply


On Apr 25, 2017 6:45 PM, "Abhyankar, Shrirang G." 
<[email protected]<mailto:[email protected]>> wrote:
Ahmad,
  You need to implement an event function (see section 5.5 of the manual) for 
cpf with logic on how you want cpf to terminate. There are a few event 
functions currently implemented — nose point detection, target limit, 
active/reactive power limits — but there is no user-defined event function 
support yet. So, here’s what you’ll need to do:

i) Use cpf_nose_event.m or cpf_target_lam_event as a template to write your own 
event function.
I) Modify runcpf code to register your event function (see lines 173-190 on how 
different event functions are registered).

Let us know if you need more help.

Shri

From: Ahmad Sadiq Abubakar 
<[email protected]<mailto:[email protected]>>
Reply-To: MATPOWER discussion forum 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, April 25, 2017 at 1:22 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: CPF termination

Hi,
I want to run cpf such that, it stops either at Vmax, Vmin, or ratedA, ratedB 
and ratedC. In other words, cpf termination should respect bus voltage limits 
and line thermal limit constraints.

Kindly assist on how to implement the codes.

Reply via email to