You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It says that it is an alias, but displays the values all the same.
---- 5 SET foo
1, 2
---- 5 SET bar Aliased with foo
1, 2
But reading an alias with readGDX() does not return the values of the set:
> str(readGDX('foobar.gdx', 'foo'))
chr [1:2] "1" "2"
- attr(*, "gdxdata")=List of 5
..$ name : chr "foo"
..$ type : chr "set"
..$ form : chr "sparse"
..$ domains: chr "*"
..$ domInfo: chr "none"
- attr(*, "description")= chr ""
> str(readGDX('foobar.gdx', 'bar'))
List of 3
$ name : chr "bar"
$ type : chr "alias"
$ aliasFor: chr "foo"
So users cannot simply look up (something that looks like) a set in GAMS (say in the definition of an equation) and use that with readGDX(). They have to first check if that is an alias.
Since this is an deliberate choice (followAlias = FALSE is not the default), I wonder why that is.
gdx/R/readGDX.R
Line 221 in 6a32a33
What is the rationale for this? Sets and their aliases are used transparently in GAMS, why not here?
The text was updated successfully, but these errors were encountered: