Untitled_1.gms (5.04 KB)
Hello,
I have a problem programming a CCR model with inputs and outputs. I need to extract the values to be used as input and output from a normal distribution. For this, I thought of creating two vectors of random variables (a and b) by extracting the values (through the normal function) from a normal distribution with mean and standard deviation which are inserted in two different tables. With the current setting (which you find in the attachment) the software gives me error 149.

or study the error message “149 Uncontrolled set entered as constant”.

You define a parameter over the sets i and j, but on the right-hand side you use another set (p). Either your parameter is defined over all three sets, or you do something with the set p on the RHS (e.g. sum(p, …)).

In fact, in the results (you find a screen in the attachments) I get 3 values of “p” for each “i” and for each “j”.

I have to get a value extracted from the normal distribution for each “i” and for each “j” but the mean and standard deviation are inserted in two different tables.
I don’t find how the “sum” function can help.
Thanks so much

Hi Diana
If I understand you correctly, the table t contains several variables and you want to use the mean of these values for j.
You can then just sum over p and divide by the rank of p (which gives you the number of elements of p):