.Net API: GetSet and GetSymbol not working with aliases although it should since 24.0.1

I’m loading a Database from a GDX file, and I’m not being able to load sets using aliases.
I’m using Gams 24.1.3 x64, and The api file GAMS.net4.DLL version 24.1.0.38833

In the release notes from 24.0.1 it states:

Do not throw an exception when hitting an Alias with the GAMSDatabaseEnumerator or GetSymbol function but return the aliased GAMSSet

so maybe I’m missing something to make it work.
Noth with GetSymbol(“myAlias”) and with GetSet(“myAlias”), any time I want to load a Set using its alias I’m getting a GAMSException with the message

GAMSDatabase: Symbol myAlias is not a set



I’m sure that “myAlias” is an alias because I can see it when I open the GDX file with GAMS IDE, and also I can perfectly load the set with its original name using GetSet and GetSymbol.

Thanks a lot for your help.


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/groups/opt_out.

\

Fernando,

You aren’t missing anything. We introduced a bug with a recent release that caused throwing this exception again. Sorry that you ran into this!
Attached is a fixed version of the GAMS.net.dll. If you replace yours with that one, reading an Alias with GetSet should work.

Best regards,
Lutz


On 8/4/2013 10:15 PM, Fernando Consigli wrote:

I’m loading a Database from a GDX file, and I’m not being able to load
sets using aliases.
I’m using Gams 24.1.3 x64, and The api file GAMS.net4.DLL version
24.1.0.38833

In the release notes from 24.0.1 it states:

  * Do not throw an exception when hitting an Alias with the
    GAMSDatabaseEnumerator or GetSymbol function but return the
    aliased GAMSSet

so maybe I’m missing something to make it work.
Noth with GetSymbol(“myAlias”) and with GetSet(“myAlias”), any time I
want to load a Set using its alias I’m getting a GAMSException with the
message

GAMSDatabase: Symbol myAlias is not a set

I’m sure that “myAlias” is an alias because I can see it when I open the
GDX file with GAMS IDE, and also I can perfectly load the set with its
original name using GetSet and GetSymbol.

Thanks a lot for your help.


You received this message because you are subscribed to the Google
Groups “gamsworld” group.
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/groups/opt_out.


\

Lutz Westermann LWestermann@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW, P.O. Box 40 59
Washington DC, 20007, USA 50216 Frechen, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1
http://www.gams.com


GAMS.net4.rar (112 KB)

Thanks A LOT. It is working OK with that build you attached.
I’m also a developer and I know sometimes these things may happen :slight_smile:
Greetings,

Fernando

On Sunday, 4 August 2013 23:15:18 UTC-3, Fernando Consigli wrote:

I’m loading a Database from a GDX file, and I’m not being able to load sets using aliases.
I’m using Gams 24.1.3 x64, and The api file GAMS.net4.DLL version 24.1.0.38833

In the release notes from 24.0.1 it states:

Do not throw an exception when hitting an Alias with the GAMSDatabaseEnumerator or GetSymbol function but return the aliased GAMSSet

so maybe I’m missing something to make it work.
Noth with GetSymbol(“myAlias”) and with GetSet(“myAlias”), any time I want to load a Set using its alias I’m getting a GAMSException with the message

GAMSDatabase: Symbol myAlias is not a set



I’m sure that “myAlias” is an alias because I can see it when I open the GDX file with GAMS IDE, and also I can perfectly load the set with its original name using GetSet and GetSymbol.

Thanks a lot for your help.


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/groups/opt_out.

\