Hello, I have implemented the following relationship in GAMS, but after running it, I receive the error “Domain violation for set” for Pchp(k, t, r). where is the problem?

k is defined as a set as follow: /2.47, 0.0/ t represents a 24-hours time period. r has 12 elements.

Thank you. I also tried your method, but it didn’t work, and it gives an error for the symbol k in the new variable. Could it be because k is defined as a set?

It could be necessary to initialize the two variables. In that case you will need to create the corresponding parameter first that store the initial values.