Dear Stefanos,

Yes, it looks like you found a bug (and the fix). I'll be sure to include the 
fix in the next version.

Thanks for reporting this,

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




On Nov 15, 2011, at 3:27 PM, Stefanos Delikaraoglou wrote:

> Dear Sir/Madam,
> 
> I am trying to implement a simultaneous energy and reserve (regulation up and 
> down) dispatch model in Matpower.
> 
> Having as base the example provided in the manual, about the reserves 
> problem, I am trying to add a second variable representing the regulation 
> down service provided by each generator, as well as the corresponding 
> constraints. After providing all the necessary data for both reg-up/down in 
> the case file (I am using case9) and writing the rest callback functions in 
> get the following error message:
> 
> Error using ==> mtimes
> Inner matrix dimensions must agree.
> 
> Error in ==> opf_model.compute_cost at 107
> f = full((w' * H * w) / 2 + Cw' * w);
> 
> Doing some debugging in the code I have the impression that this error comes 
> up from the formulation of H matrix in the get_cost_params.m function. I 
> think that the proper formulation in order to calculate the H should be:
> 
> cp.H  = cp.H(idx,idx);
> 
> instead of :
> 
> cp.H  = cp.H(idx,:);
> 
> which is written in the code, since this function calculates  the individual 
> cost component of each user-defined cost.
> 
> Could you please have a look at this part. In any case I may do something 
> wrong with the formulation of the callbacks but using the proposed 
> modification the program runs normally.
> 
> Thank you for help.
> 
> Stefanos
> 
> 
> 

Reply via email to