I have a time series data set which is sparsely populated and inflection based. I would like to know the easiest and cleanest way of expanding this in GAMS.
Example:
I have a set called time /1*10/. The input data for a cost(time) parameter is in the following form:
cost(1) = 10
cost(5) = 20
cost(7) = 30
This should be interpreted in the model as:
cost(1) = 10
cost(2) = 10
cost(3) = 10
cost(4) = 10
cost(5) = 20
cost(6) = 20
cost(7) = 30
cost(8) = 30
cost(9) = 30
cost(10) = 30
What is the most effective way of doing this in GAMS? The example above is trivial, however, my input set is significantly larger. I would like to keep the input sparse, but need it expanded for the model.
Thank you!
–
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.
Jeff:
This should do the trick if manual delimitation and value assignment is not a problem for you.
parameter cost(time) /(14) 10, (56) 20, (7*10) 30/
I can devise more complex stuff if you want to programatically assign values and their boundaries.
Hope to help!
Claudio
On Fri, Sep 5, 2014 at 11:29 AM, Jeff Baker wrote:
I have a time series data set which is sparsely populated and inflection based. I would like to know the easiest and cleanest way of expanding this in GAMS.
Example:
I have a set called time /1*10/. The input data for a cost(time) parameter is in the following form:
cost(1) = 10
cost(5) = 20
cost(7) = 30
This should be interpreted in the model as:
cost(1) = 10
cost(2) = 10
cost(3) = 10
cost(4) = 10
cost(5) = 20
cost(6) = 20
cost(7) = 30
cost(8) = 30
cost(9) = 30
cost(10) = 30
What is the most effective way of doing this in GAMS? The example above is trivial, however, my input set is significantly larger. I would like to keep the input sparse, but need it expanded for the model.
Thank you!
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.