Hi,
Recently I was digging through the extending OPF chapter of Matpower
manual, but I don't quite catch the process. Regarding the example given
there on 'Fixed zonal reserves' what I understand from my reading is, it is
required to write down a call back function for formulation along with some
call of callback functions. I have followed every steps mentioned there but
could not make the code run (I am using version 6.0). I am adding my code
snippet here for better conveying.
%%%
mpc=loadcase('case30.m');
mpopt = mpoption('out.all', 0, 'verbose', 0);
mpc=add_usefcn(mpc,'formulation',@userfcn_reserves_formulation);
mpc=ext2int(mpc,mpopt);
results=runopf(mpc);
results=int2ext;
%%%%
*Error message:*
*Access to an object's fields is only permitted within its methods.*
I have added the mpc.reserve data(cost, req, zones) posted in
't_case30_userfcns.m' file.
I have written the userfcn_reserves_formulation in a different script ,
but it is not working.
I didn't write the add_var and add_constraint explicitly since the
add_userfcn callback function already contains those.
Can you tell me what I am missing?
Regards,
Jubeyer