Thanks for the suggestion. The best way to register this sort of suggestion in 
a way that I won’t lose track of it is to submit it as a new issue 
here<https://github.com/MATPOWER/matpower-extras/issues>.

   Ray


On Sep 24, 2023, at 6:04 AM, Ігор Ткач <ig0r-1...@ukr.net> wrote:

checklimits is a very useful feature.
For ease of transition from text to numbers, I humbly suggest the following 
addition to the checklimits function for a future version of Matpower.
Indexes for out of limits :

[check_index.]=checklimits

where [check_index = 0 - all o'key
check_index=1 - Pgen out limit
check_index=2 - Qgen out limit
check_index=3 - VG out limit
check_index=4 -.........
..............................................

22 вересня 2023, 22:02:25, від "Ray Daniel Zimmerman" 
<r...@cornell.edu<mailto:r...@cornell.edu>>:

I assume you are asking whether it’s possible to have checklimits() return a 0 
or 1 depending on whether or not there are limit violations.

I don’t really have the time to work on this now, but I shouldn’t be too hard 
to add. You’d simply check to see if all of the following outputs are empty (no 
violations) or not: Fv.i, Pv.i, Pv.I, Qv.i, Qv.I, Vv.i, Vv.I.

Feel free to enhance this function to make it more useful and submit your 
updates as a pull request 
here<https://github.com/MATPOWER/matpower-extras/pulls>.

Hope this helps,

   Ray



On Sep 22, 2023, at 12:32 AM, Ігор Ткач 
<ig0r-1...@ukr.net<mailto:ig0r-1...@ukr.net>> wrote:

Is it possible to [Index_check]=checklimits(results, 1) output Index_check = 1 
or 0 when there is an output of constrains or not out of limits?

20 вересня 2023, 16:45:03, від "Ігор Ткач" 
<ig0r-1...@ukr.net<mailto:ig0r-1...@ukr.net>>:

Dear all,
Question. how do I find the constraint. which removes my cost calculation when 
calculating the runopf cost?
For case30, I study the dependence of cost when adjusting the voltage of  
generators.
For example, I change the voltage of the 4th generator:
cost=function('VM')  ==  cost=function(mpc10.gen(4,6))
The skript  runopf is closed and this dependency cannot be seen.
Test network case30 has an optimal value runopf() of  f= 576.8923

My first  calculation.
My changes to the input data - pasted the results :
mpc10.gen(:,6)=resopf.gen(:,6)     -  'VM'
mpc10.gen(4,6)=resopf.gen(4,6)-0.025  - new  ' VM'  4-th gen
rez10=runopf(mpc10)
f=576.8923 - the cost hasn't changed since we went down to the minimum.
O'Key, runopf found a minimum calculated with the constraints.
Next I'll show that in my example cost smaller  cost=576.661  -
I'm assuming that my initial conditions went out of bounds and were discarded

I am assuming that my initial conditions (-0.025 p.u.)  give the best cost  
576.661  , but go beyond the some constraints. My cost was rejected by runopf. 
I need to make sure of this

Dear all,
My calculation.
I calculated runopf.
I took the results  runopf for PG and VG  to new_mpc   and calculated the 
runpf(new_mpc).
After the runpf calculation, all datasets matched with runopf , in particular 
the cost.
Сosts runpf are runopf the same 576.8923. My runpf option works correctly.
Then I slightly reduce the voltage on the 4-th generator "-0.025  p.u. " and 
calculate the cost by runpf.
I got less, better cost  f=576.661
I emphasize,  the active power of generators 2-6 and the voltage on the buses 
of generators 1-6 are the same  for runpf and runopf, there is only an addition 
of 0.01 voltage on generator 4.
I emphasize that for the case of the test runopf and my runpf, the calculation 
results in the active power of generators 2-6 and the voltage on the buses of 
generators 1-6 are the same, there is only an addition of -0.025 voltage on 
generator 4.( see line 42 in the attached script. )
I have checked that the voltages on all nodes are within the constrains range.
I've attached a program to tesе.
Question. how do I find the constraint. which removes my cost calculation when 
calculating the runopf cost?

Igor.




Reply via email to