-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of Timeslices is critical for TIMES, but not respected by xl2times #270
Comments
Thanks @Antti-L! @siddharth-krishna what kind of a test could we do for this? I am almost 100% sure that at least at some point the order was preserved, but since we don't test for this, it must have got broken with other improvements. |
@Antti-L I've opened a PR preventing |
That's great.
I don't think so. As far as I know, all other ordered sets in TIMES are system sets, and not user-defined. |
Thanks, Olex, for the quick fix. You're right Antti, If you don't mind, I'll keep this issue open to remind myself to make a test for this. One option could be for us to modify the comparison code similar to Olex's fix in #272, so that it doesn't sort |
No, there is no GAMS keyword to indicate that the set is ordered. See: https://www.gams.com/latest/docs/UG_OrderedSets.html
Not really by default. In general, sets in GAMS are regarded as unordered collections of labels. However, as described in the GAMS documentation, all set elements of all sets are included in the so-called universal set, in the order of data entry. And only if the elements of a set are defined in an order consistent with that entry order, the set is considered to be ordered. Example:
The set
But yes, what I mentioned above about all other ordered sets (apart from |
Now that I recalled it, I added |
While I have just made my first simple tests with
xl2times
, out of curiosity I also tested whetherxl2times
respects the Timeslice order, which is a fundamental basic requirement, and critical for correct model behaviour. Timeslices are an ordered set, which is an important feature of GAMS. So, for example, if I define the SEASON timeslices to represent months, I should be able to define them simply as follows in Excel:I just tested that, but to my surprise and dismay, it did not work!
Xl2times
wrote the timeslices out in the alphabetic order instead of the correct monthly sequence. In my view, this is a critical oversight, which I guess cannot even be seen with gdxdiff. Arranging the monthly timeslices in an alphabetic order does not make sense, and because of that, GAMS will neither get the correct order. VEDA does respect the order, as defined by the user, and so shouldxl2times
.The text was updated successfully, but these errors were encountered: