input weights display

Hello,

I would appreciate your help with my problem. I have a standard DEA model and my intention is to display input weights in the summary report. The command “display v.l” works fine and the code looks like this:

set headers / modelstat, solvestat, objval /;
parameter rep(k,headers) solution report summary;
option limrow=0, limcol=0, solprint=silent,
solvelink=%Solvelink.LoadLibrary%;
loop(k,
slice(j) = data(k,j);
solve dea using lp max eff;
rep(k,‘modelstat’) = dea.modelstat;
rep(k,‘solvestat’) = dea.solvestat;
rep(k,‘objval’ ) = dea.objval;
display v.l;
);
display rep;

However, this format is not convenient for further work with the data, that’s why I want to introduce additional columns into the summary report in order to link the input weights to relevant units. The code is:

set headers / modelstat, solvestat, objval, inputweights /;
parameter rep(k,headers) solution report summary;
option limrow=0, limcol=0, solprint=silent,
solvelink=%Solvelink.LoadLibrary%;
loop(k,
slice(j) = data(k,j);
solve dea using lp max eff;
rep(k,‘modelstat’) = dea.modelstat;
rep(k,‘solvestat’) = dea.solvestat;
rep(k,‘objval’ ) = dea.objval;
rep (k, ‘inputweights’)= v.l;
);
display rep;

and GAMS reports the error 148 “Dimension different - The symbol is referenced with more/less
indices as declared”.

What is wrong here? The GAMS file is attached.

Thank you in advance,
Olena.


Untitled_3.gms (1.08 KB)

Hi Olena



The variable v is defined over j (and not over k), so you should have something like V.L(j) in your code, but as you loop over k, this will not work.

You can do this as follows (and extend the set with the headers accordingly):



rep (k, ‘inputweights_stock’)= v.l(“stock”);

rep (k, ‘inputweights_wages’)= v.l(“wages”);





Cheers

Renger



Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von Olena Kalinichenko
Gesendet: Samstag, 27. Juni 2015 21:30
An: gamsworld@googlegroups.com
Betreff: input weights display



Hello,



I would appreciate your help with my problem. I have a standard DEA model and my intention is to display input weights in the summary report. The command “display v.l” works fine and the code looks like this:



set headers / modelstat, solvestat, objval /;

parameter rep(k,headers) solution report summary;

option limrow=0, limcol=0, solprint=silent,

solvelink=%Solvelink.LoadLibrary%;

loop(k,

slice(j) = data(k,j);

solve dea using lp max eff;

rep(k,‘modelstat’) = dea.modelstat;

rep(k,‘solvestat’) = dea.solvestat;

rep(k,‘objval’ ) = dea.objval;

display v.l;

);

display rep;



However, this format is not convenient for further work with the data, that’s why I want to introduce additional columns into the summary report in order to link the input weights to relevant units. The code is:



set headers / modelstat, solvestat, objval, inputweights /;

parameter rep(k,headers) solution report summary;

option limrow=0, limcol=0, solprint=silent,

solvelink=%Solvelink.LoadLibrary%;

loop(k,

slice(j) = data(k,j);

solve dea using lp max eff;

rep(k,‘modelstat’) = dea.modelstat;

rep(k,‘solvestat’) = dea.solvestat;

rep(k,‘objval’ ) = dea.objval;

rep (k, ‘inputweights’)= v.l;

);

display rep;



and GAMS reports the error 148 "Dimension different - The symbol is referenced with more/less

indices as declared".



What is wrong here? The GAMS file is attached.



Thank you in advance,

Olena.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Dear Renger,

Thank you for your help, it has worked out.

Regards,
Olena


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.