reading the sets of a variable in GDX

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

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

hi Jaques
Why don’t you just display i and j and you can check for yourself?
Cheers
Renger

sent from my iPad

Am 14.01.2014 um 18:18 schrieb “Jacques” :

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i $GDXIN

but I’m not sure… What do you think ?

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


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.

Hi,

Because it doesn’t work… I have errors : “load types are different”, “symbol neither initialized nor assigned”.
This is my simple code :

set
i identifier /1*10/
j carac /E, F/;
parameters
N(i,j) ;
$Gdxin myGDX.gdx
$load N
$Gdxin
display N;

It works when N only depends on one parameter, but I can’t get it to work for several parameters for the above errors.
Thank you !

Jacques
Le mardi 14 janvier 2014 18:22:03 UTC+1, Renger van Nieuwkoop a écrit :

hi Jaques
Why don’t you just display i and j and you can check for yourself?
Cheers
Renger

sent from my iPad

Am 14.01.2014 um 18:18 schrieb “Jacques” :

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused...

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

--> this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i     $GDXIN

but I'm not sure... What do you think ?

Thank you !

--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.


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.

Hello again,
Thank you for your quick answer !

I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.
“Symbol not in GDX”
“load types are different”
“362 Values for domain 2 are unknown - no checking possible” for i and j
" Load/unload ident expected"


Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…

Thanks !
Jacques

Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.

Which gams version do you use?

Sent from my iPhone

Am 15.01.2014 um 16:56 schrieb “Jacques” :

Hello again,
Thank you for your quick answer !

I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.
“Symbol not in GDX”
“load types are different”
“362 Values for domain 2 are unknown - no checking possible” for i and j
" Load/unload ident expected"


Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…

Thanks !
Jacques

Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

*i identifier /1*10/

*j carac /E, F/;

*parameters  N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload "myGDX.gdx",  N;



set

    i identifier

   j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i
$Gdxin

display i,j,N;





Hope this helps



Cheers



Renger



____________________

Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

In...@modelworks.ch

blog.modelworks.ch





From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jacques
Sent: Mittwoch, 15. Januar 2014 16:12
To: gams...@googlegroups.com
Subject: Re: reading the sets of a variable in GDX



Hi,



Because it doesn't work... I have errors : "load types are different", "symbol neither initialized nor assigned".

This is my simple code :



set

i identifier /1*10/

j carac /E, F/;

parameters

N(i,j) ;

$Gdxin myGDX.gdx

$load N

$Gdxin

display N;



It works when N only depends on one parameter, but I can't get it to work for several parameters for the above errors.

Thank you !



Jacques
Le mardi 14 janvier 2014 18:22:03 UTC+1, Renger van Nieuwkoop a écrit :

    hi Jaques

    Why don't you just display i and j and you can check for yourself?

    Cheers

    Renger

    sent from my iPad


    Am 14.01.2014 um 18:18 schrieb "Jacques" :

        Hello,

        I am looking at a GDX file with a two-sets variable : A(i,j)

        I want to import i,j and A in GAMS.

        I am confused...

        $GDXIN mygdx.gdx
        $LOAD A
        $GDXIN

        --> this is OK. Now how can I retrieve i and j ? I tried :
        $GDXIN mygdx.gdx
        $LOAD i             $GDXIN

        but I'm not sure... What do you think ?

        Thank you !

        --
        To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
        To post to this group, send email to gams...@googlegroups.com.
        Visit this group at http://groups.google.com/group/gamsworld.
        For more options, visit https://groups.google.com/groups/opt_out.

--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.


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.

Hi,

Have you checked that the data type is consistent? For example, if the data is stored in *.gdx as set/variable and you are loading it as parameter then you will see the “load types are different” message.

It’s also a good idea to check the gdx file using GAMSIDE before using it.

Good luck,
Huibin


On Wed, Jan 15, 2014 at 10:55 AM, Jacques wrote:

Hello again,
Thank you for your quick answer !

I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.
“Symbol not in GDX”
“load types are different”
“362 Values for domain 2 are unknown - no checking possible” for i and j
" Load/unload ident expected"


Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…

Thanks !
Jacques

Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.



\

Huibin Chang
Department of Economics
State University of New York at Buffalo
Phone: (716)867 0292


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.

24.1
I think it is the most recent ?

Le mercredi 15 janvier 2014 17:04:59 UTC+1, Renger van Nieuwkoop a écrit :

Which gams version do you use?

Sent from my iPhone

Am 15.01.2014 um 16:56 schrieb “Jacques” :

Hello again,
Thank you for your quick answer !

I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.
"Symbol not in GDX"
"load types are different"
"362  Values for domain 2 are unknown - no checking possible" for i and j
" Load/unload ident expected"

...
Help ! Why wouldn't it work on my computer if it works on yours ?? Argh...

Thanks !
Jacques

Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

    Hi Jaques



    Here a working example (the first commented lines were used to generate the gdx file).



    *set

    *i identifier /1*10/

    *j carac /E, F/;

    *parameters  N(i,j) ;

    *N(i,j) = uniform(0,1);

    *$gdxout myGDX.gdx

    *execute_unload "myGDX.gdx",  N;



    set

        i identifier

       j carac;



    parameters N(i,j) ;



    $Gdxin myGDX.gdx



    $load i
    $Gdxin

    display i,j,N;





    Hope this helps



    Cheers



    Renger



    ____________________

    Modelworks

    Gewerbestrasse 15

    3600 Thun – Switzerland

    +41 79 818 53 73

    In...@modelworks.ch

    blog.modelworks.ch





    From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jacques
    Sent: Mittwoch, 15. Januar 2014 16:12
    To: gams...@googlegroups.com
    Subject: Re: reading the sets of a variable in GDX



    Hi,



    Because it doesn't work... I have errors : "load types are different", "symbol neither initialized nor assigned".

    This is my simple code :



    set

    i identifier /1*10/

    j carac /E, F/;

    parameters

    N(i,j) ;

    $Gdxin myGDX.gdx

    $load N

    $Gdxin

    display N;



    It works when N only depends on one parameter, but I can't get it to work for several parameters for the above errors.

    Thank you !



    Jacques
    Le mardi 14 janvier 2014 18:22:03 UTC+1, Renger van Nieuwkoop a écrit :

        hi Jaques

        Why don't you just display i and j and you can check for yourself?

        Cheers

        Renger

        sent from my iPad


        Am 14.01.2014 um 18:18 schrieb "Jacques" :

            Hello,

            I am looking at a GDX file with a two-sets variable : A(i,j)

            I want to import i,j and A in GAMS.

            I am confused...

            $GDXIN mygdx.gdx
            $LOAD A
            $GDXIN

            --> this is OK. Now how can I retrieve i and j ? I tried :
            $GDXIN mygdx.gdx
            $LOAD i                 $GDXIN

            but I'm not sure... What do you think ?

            Thank you !

            --
            To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
            To post to this group, send email to gams...@googlegroups.com.
            Visit this group at http://groups.google.com/group/gamsworld.
            For more options, visit https://groups.google.com/groups/opt_out.

    --
    To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
    To post to this group, send email to gams...@googlegroups.com.
    Visit this group at http://groups.google.com/group/gamsworld.
    For more options, visit https://groups.google.com/groups/opt_out.

--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.

Is N(i,j) in the gdx file? If you use the GAMSIDE and your file is not in the actual project directory, it might not find the gdx-file. Try to add the path to the name.

Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Jacques
Sent: Mittwoch, 15. Januar 2014 17:08
To: gamsworld@googlegroups.com
Subject: Re: reading the sets of a variable in GDX



24.1

I think it is the most recent ?

Le mercredi 15 janvier 2014 17:04:59 UTC+1, Renger van Nieuwkoop a écrit :

Which gams version do you use?

Sent from my iPhone


Am 15.01.2014 um 16:56 schrieb “Jacques” :

Hello again,

Thank you for your quick answer !



I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.

“Symbol not in GDX”

“load types are different”

“362 Values for domain 2 are unknown - no checking possible” for i and j

" Load/unload ident expected"



Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…



Thanks !

Jacques


Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.


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.

Yes I have. It was correct, and it is also in Renger’s example, which I stricly copied and pasted.

The “Load types are different” error also appears when I define i and j just as in the gdx ; I define the parameter N(i,j), and the $load N gives this error.

if N only had one set N(i), it would work only if I define i with /1*10/, but not if I try loading it ($load i wrote:

Hello again,
Thank you for your quick answer !

I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.
“Symbol not in GDX”
“load types are different”
“362 Values for domain 2 are unknown - no checking possible” for i and j
" Load/unload ident expected"


Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…

Thanks !
Jacques

Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.



\

Huibin Chang
Department of Economics
State University of New York at Buffalo
Phone: (716)867 0292


\

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.

Yes Renger, I can see N(i,j) in the GAMSIDE. The folder is OK.
Everything works when only reading N(i) from the gdx, i being defined in the code and not being read from the gdx.

Le mercredi 15 janvier 2014 17:21:08 UTC+1, Renger van Nieuwkoop a écrit :

Is N(i,j) in the gdx file? If you use the GAMSIDE and your file is not in the actual project directory, it might not find the gdx-file. Try to add the path to the name.

Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jacques
Sent: Mittwoch, 15. Januar 2014 17:08
To: gams...@googlegroups.com
Subject: Re: reading the sets of a variable in GDX



24.1

I think it is the most recent ?

Le mercredi 15 janvier 2014 17:04:59 UTC+1, Renger van Nieuwkoop a écrit :

Which gams version do you use?

Sent from my iPhone


Am 15.01.2014 um 16:56 schrieb “Jacques” :

Hello again,

Thank you for your quick answer !



I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.

“Symbol not in GDX”

“load types are different”

“362 Values for domain 2 are unknown - no checking possible” for i and j

" Load/unload ident expected"



Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…



Thanks !

Jacques


Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.

I am lost…

Ask Gams for help

Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Jacques
Sent: Mittwoch, 15. Januar 2014 17:24
To: gamsworld@googlegroups.com
Subject: Re: reading the sets of a variable in GDX



Yes I have. It was correct, and it is also in Renger’s example, which I stricly copied and pasted.



The “Load types are different” error also appears when I define i and j just as in the gdx ; I define the parameter N(i,j), and the $load N gives this error.



if N only had one set N(i), it would work only if I define i with /1*10/, but not if I try loading it ($load i wrote:

Hello again,

Thank you for your quick answer !



I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.

“Symbol not in GDX”

“load types are different”

“362 Values for domain 2 are unknown - no checking possible” for i and j

" Load/unload ident expected"



Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…



Thanks !

Jacques


Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.




\

Huibin Chang
Department of Economics
State University of New York at Buffalo
Phone: (716)867 0292


\

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.


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.

It works now, for the loading of N, when i and j are defined before in the gams code.

Le mercredi 15 janvier 2014 17:29:22 UTC+1, Jacques a écrit :

Yes Renger, I can see N(i,j) in the GAMSIDE. The folder is OK.
Everything works when only reading N(i) from the gdx, i being defined in the code and not being read from the gdx.

Le mercredi 15 janvier 2014 17:21:08 UTC+1, Renger van Nieuwkoop a écrit :

Is N(i,j) in the gdx file? If you use the GAMSIDE and your file is not in the actual project directory, it might not find the gdx-file. Try to add the path to the name.

Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jacques
Sent: Mittwoch, 15. Januar 2014 17:08
To: gams...@googlegroups.com
Subject: Re: reading the sets of a variable in GDX



24.1

I think it is the most recent ?

Le mercredi 15 janvier 2014 17:04:59 UTC+1, Renger van Nieuwkoop a écrit :

Which gams version do you use?

Sent from my iPhone


Am 15.01.2014 um 16:56 schrieb “Jacques” :

Hello again,

Thank you for your quick answer !



I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.

“Symbol not in GDX”

“load types are different”

“362 Values for domain 2 are unknown - no checking possible” for i and j

" Load/unload ident expected"



Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…



Thanks !

Jacques


Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.

Jaques,

The most recent GAMS version is 24.2.1 (http://www.gams.com/download/) and this is also the version that introduced the ’ 24.1

I think it is the most recent ?

Le mercredi 15 janvier 2014 17:04:59 UTC+1, Renger van Nieuwkoop a écrit :

Which gams version do you use?

Sent from my iPhone

Am 15.01.2014 um 16:56 schrieb "Jacques"      >:
Hello again,
Thank you for your quick answer !

I tried again, then I tried copying your code ; the creation of
the gdx works, but the second part still puts me the same errors.
"Symbol not in GDX"
"load types are different"
"362  Values for domain 2 are unknown - no checking possible" for
i and j
" Load/unload ident expected"

...
Help ! Why wouldn't it work on my computer if it works on yours ??
Argh...

Thanks !
Jacques

Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a
écrit :

    Hi Jaques

    Here a working example (the first commented lines were used to
    generate the gdx file).

    *set

    *i identifier /1*10/

    *j carac /E, F/;

    *parameters  N(i,j) ;

    *N(i,j) = uniform(0,1);

    *$gdxout myGDX.gdx

    *execute_unload "myGDX.gdx",  N;

    set

        i identifier

       j carac;

    parameters N(i,j) ;

    $Gdxin myGDX.gdx

    $load i>
    $Gdxin

    display i,j,N;

    Hope this helps

    Cheers

    Renger

    ____________________

    Modelworks

    Gewerbestrasse 15

    3600 Thun – Switzerland

    +41 79 818 53 73

    In...@modelworks.ch

    blog.modelworks.ch

    *From:*gams...@googlegroups.com
    [mailto:gams...@googlegroups.com] *On Behalf Of *Jacques
    *Sent:* Mittwoch, 15. Januar 2014 16:12
    *To:* gams...@googlegroups.com
    *Subject:* Re: reading the sets of a variable in GDX

    Hi,

    Because it doesn't work... I have errors : "load types are
    different", "symbol neither initialized nor assigned".

    This is my simple code :

    set

    i identifier /1*10/

    j carac /E, F/;

    parameters

    N(i,j) ;

    $Gdxin myGDX.gdx

    $load N

    $Gdxin

    display N;

    It works when N only depends on one parameter, but I can't get
    it to work for several parameters for the above errors.

    Thank you !

    Jacques
    Le mardi 14 janvier 2014 18:22:03 UTC+1, Renger van Nieuwkoop
    a écrit :

        hi Jaques

        Why don't you just display i and j and you can check for
        yourself?

        Cheers

        Renger

        sent from my iPad


        Am 14.01.2014 um 18:18 schrieb "Jacques" :

            Hello,

            I am looking at a GDX file with a two-sets variable :
            A(i,j)

            I want to import i,j and A in GAMS.

            I am confused...

            $GDXIN mygdx.gdx
            $LOAD A
            $GDXIN

            --> this is OK. Now how can I retrieve i and j ? I tried :
            $GDXIN mygdx.gdx
            $LOAD i>                 $GDXIN

            but I'm not sure... What do you think ?

            Thank you !

            --
            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+...@googlegroups.com.
            To post to this group, send email to
            gams...@googlegroups.com.
            Visit this group at
            http://groups.google.com/group/gamsworld
            .
            For more options, visit
            https://groups.google.com/groups/opt_out
            .

    --
    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+...@googlegroups.com.
    To post to this group, send email to gams...@googlegroups.com.
    Visit this group at http://groups.google.com/group/gamsworld
    .
    For more options, visit
    https://groups.google.com/groups/opt_out
    .

--
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+...@googlegroups.com .
To post to this group, send email to gams...@googlegroups.com
.
Visit this group at http://groups.google.com/group/gamsworld
.
For more options, visit https://groups.google.com/groups/opt_out
.


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


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.

OK, after many tries, the problem seems to come from the " wrote:

Hello again,

Thank you for your quick answer !



I tried again, then I tried copying your code ; the creation of the gdx works, but the second part still puts me the same errors.

“Symbol not in GDX”

“load types are different”

“362 Values for domain 2 are unknown - no checking possible” for i and j

" Load/unload ident expected"



Help ! Why wouldn’t it work on my computer if it works on yours ?? Argh…



Thanks !

Jacques


Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a écrit :

Hi Jaques



Here a working example (the first commented lines were used to generate the gdx file).



*set

i identifier /110/

*j carac /E, F/;

*parameters N(i,j) ;

*N(i,j) = uniform(0,1);

*$gdxout myGDX.gdx

*execute_unload “myGDX.gdx”, N;



set

i identifier

j carac;



parameters N(i,j) ;



$Gdxin myGDX.gdx



$load i:

Hello,

I am looking at a GDX file with a two-sets variable : A(i,j)

I want to import i,j and A in GAMS.

I am confused…

$GDXIN mygdx.gdx
$LOAD A
$GDXIN

→ this is OK. Now how can I retrieve i and j ? I tried :
$GDXIN mygdx.gdx
$LOAD i<A, j<=A, A
$GDXIN

but I’m not sure… What do you think ?

Thank you !


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.




\

Huibin Chang
Department of Economics
State University of New York at Buffalo
Phone: (716)867 0292


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


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.

THANK YOU !!!

It does work now !
Just a quick question : For my program to work I had to create a new file in the new directory. Copying still solves the program with the 24.1 version. How can I choose the version when running a program ?
Thanks a lot.

Le mercredi 15 janvier 2014 17:39:29 UTC+1, Lutz Westermann a écrit :

Jaques,

The most recent GAMS version is 24.2.1 (http://www.gams.com/download/)
and this is also the version that introduced the ’ 24.1

I think it is the most recent ?

Le mercredi 15 janvier 2014 17:04:59 UTC+1, Renger van Nieuwkoop a écrit :

Which gams version do you use?

Sent from my iPhone

Am 15.01.2014 um 16:56 schrieb "Jacques"      >:
Hello again,
Thank you for your quick answer !

I tried again, then I tried copying your code ; the creation of
the gdx works, but the second part still puts me the same errors.
"Symbol not in GDX"
"load types are different"
"362  Values for domain 2 are unknown - no checking possible" for
i and j
" Load/unload ident expected"

...
Help ! Why wouldn't it work on my computer if it works on yours ??
Argh...

Thanks !
Jacques

Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a
écrit :

    Hi Jaques

    Here a working example (the first commented lines were used to
    generate the gdx file).

    *set

    *i identifier /1*10/

    *j carac /E, F/;

    *parameters  N(i,j) ;

    *N(i,j) = uniform(0,1);

    *$gdxout myGDX.gdx

    *execute_unload "myGDX.gdx",  N;

    set

        i identifier

       j carac;

    parameters N(i,j) ;

    $Gdxin myGDX.gdx

    $load i>
    $Gdxin

    display i,j,N;

    Hope this helps

    Cheers

    Renger

    ____________________

    Modelworks

    Gewerbestrasse 15

    3600 Thun – Switzerland

    +41 79 818 53 73

    In...@modelworks.ch

    blog.modelworks.ch

    *From:*gams...@googlegroups.com
    [mailto:gams...@googlegroups.com] *On Behalf Of *Jacques
    *Sent:* Mittwoch, 15. Januar 2014 16:12
    *To:* gams...@googlegroups.com
    *Subject:* Re: reading the sets of a variable in GDX

    Hi,

    Because it doesn't work... I have errors : "load types are
    different", "symbol neither initialized nor assigned".

    This is my simple code :

    set

    i identifier /1*10/

    j carac /E, F/;

    parameters

    N(i,j) ;

    $Gdxin myGDX.gdx

    $load N

    $Gdxin

    display N;

    It works when N only depends on one parameter, but I can't get
    it to work for several parameters for the above errors.

    Thank you !

    Jacques
    Le mardi 14 janvier 2014 18:22:03 UTC+1, Renger van Nieuwkoop
    a écrit :

        hi Jaques

        Why don't you just display i and j and you can check for
        yourself?

        Cheers

        Renger

        sent from my iPad


        Am 14.01.2014 um 18:18 schrieb "Jacques" :

            Hello,

            I am looking at a GDX file with a two-sets variable :
            A(i,j)

            I want to import i,j and A in GAMS.

            I am confused...

            $GDXIN mygdx.gdx
            $LOAD A
            $GDXIN

            --> this is OK. Now how can I retrieve i and j ? I tried :
            $GDXIN mygdx.gdx
            $LOAD i>                 $GDXIN

            but I'm not sure... What do you think ?

            Thank you !

            --
            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+...@googlegroups.com.
            To post to this group, send email to
            gams...@googlegroups.com.
            Visit this group at
            http://groups.google.com/group/gamsworld
            .
            For more options, visit
            https://groups.google.com/groups/opt_out
            .

    --
    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+...@googlegroups.com.
    To post to this group, send email to gams...@googlegroups.com.
    Visit this group at http://groups.google.com/group/gamsworld
    .
    For more options, visit
    https://groups.google.com/groups/opt_out
    .

--
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+...@googlegroups.com .
To post to this group, send email to gams...@googlegroups.com
.
Visit this group at http://groups.google.com/group/gamsworld
.
For more options, visit https://groups.google.com/groups/opt_out
.


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+...@googlegroups.com.
To post to this group, send email to gams...@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 LWest...@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


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.

OK, everything works now, no problem.
Thanks everyone !

Le mercredi 15 janvier 2014 18:07:28 UTC+1, Jacques a écrit :

THANK YOU !!!

It does work now !
Just a quick question : For my program to work I had to create a new file in the new directory. Copying still solves the program with the 24.1 version. How can I choose the version when running a program ?
Thanks a lot.

Le mercredi 15 janvier 2014 17:39:29 UTC+1, Lutz Westermann a écrit :

Jaques,

The most recent GAMS version is 24.2.1 (http://www.gams.com/download/)
and this is also the version that introduced the ’ 24.1

I think it is the most recent ?

Le mercredi 15 janvier 2014 17:04:59 UTC+1, Renger van Nieuwkoop a écrit :

Which gams version do you use?

Sent from my iPhone

Am 15.01.2014 um 16:56 schrieb "Jacques"      >:
Hello again,
Thank you for your quick answer !

I tried again, then I tried copying your code ; the creation of
the gdx works, but the second part still puts me the same errors.
"Symbol not in GDX"
"load types are different"
"362  Values for domain 2 are unknown - no checking possible" for
i and j
" Load/unload ident expected"

...
Help ! Why wouldn't it work on my computer if it works on yours ??
Argh...

Thanks !
Jacques

Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van Nieuwkoop a
écrit :

    Hi Jaques

    Here a working example (the first commented lines were used to
    generate the gdx file).

    *set

    *i identifier /1*10/

    *j carac /E, F/;

    *parameters  N(i,j) ;

    *N(i,j) = uniform(0,1);

    *$gdxout myGDX.gdx

    *execute_unload "myGDX.gdx",  N;

    set

        i identifier

       j carac;

    parameters N(i,j) ;

    $Gdxin myGDX.gdx

    $load i>
    $Gdxin

    display i,j,N;

    Hope this helps

    Cheers

    Renger

    ____________________

    Modelworks

    Gewerbestrasse 15

    3600 Thun – Switzerland

    +41 79 818 53 73

    In...@modelworks.ch

    blog.modelworks.ch

    *From:*gams...@googlegroups.com
    [mailto:gams...@googlegroups.com] *On Behalf Of *Jacques
    *Sent:* Mittwoch, 15. Januar 2014 16:12
    *To:* gams...@googlegroups.com
    *Subject:* Re: reading the sets of a variable in GDX

    Hi,

    Because it doesn't work... I have errors : "load types are
    different", "symbol neither initialized nor assigned".

    This is my simple code :

    set

    i identifier /1*10/

    j carac /E, F/;

    parameters

    N(i,j) ;

    $Gdxin myGDX.gdx

    $load N

    $Gdxin

    display N;

    It works when N only depends on one parameter, but I can't get
    it to work for several parameters for the above errors.

    Thank you !

    Jacques
    Le mardi 14 janvier 2014 18:22:03 UTC+1, Renger van Nieuwkoop
    a écrit :

        hi Jaques

        Why don't you just display i and j and you can check for
        yourself?

        Cheers

        Renger

        sent from my iPad


        Am 14.01.2014 um 18:18 schrieb "Jacques" :

            Hello,

            I am looking at a GDX file with a two-sets variable :
            A(i,j)

            I want to import i,j and A in GAMS.

            I am confused...

            $GDXIN mygdx.gdx
            $LOAD A
            $GDXIN

            --> this is OK. Now how can I retrieve i and j ? I tried :
            $GDXIN mygdx.gdx
            $LOAD i>                 $GDXIN

            but I'm not sure... What do you think ?

            Thank you !

            --
            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+...@googlegroups.com.
            To post to this group, send email to
            gams...@googlegroups.com.
            Visit this group at
            http://groups.google.com/group/gamsworld
            .
            For more options, visit
            https://groups.google.com/groups/opt_out
            .

    --
    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+...@googlegroups.com.
    To post to this group, send email to gams...@googlegroups.com.
    Visit this group at http://groups.google.com/group/gamsworld
    .
    For more options, visit
    https://groups.google.com/groups/opt_out
    .

--
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+...@googlegroups.com .
To post to this group, send email to gams...@googlegroups.com
.
Visit this group at http://groups.google.com/group/gamsworld
.
For more options, visit https://groups.google.com/groups/opt_out
.


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+...@googlegroups.com.
To post to this group, send email to gams...@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 LWest...@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


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.

Good, that it works now!

Just a note: In the GAMS system there is a tool called “chk4upd”. It tells you if you are using the most recent system or if there is a newer version available. If you use the GAMSIDE you can find it at “Help” → “Check for GAMS Update”. In a console you can execute it by typing “chk4upd”. With GAMS 24.1 you will see something like this:

The version of your GAMS system is 24.1.3
There is an update available for this system
You can download and use the most recent version of GAMS (24.2.1)
Please visit http://www.gams.com/download/

With GAMS 24.2 you will see this:

Your system is up to date

Best regards,
Lutz



On 1/15/2014 12:15 PM, Jacques wrote:

OK, everything works now, no problem.
Thanks everyone !

Le mercredi 15 janvier 2014 18:07:28 UTC+1, Jacques a écrit :

THANK YOU !!!

It does work now !
Just a quick question : For my program to work I had to create a new
file in the new directory. Copying still solves the program with the
24.1 version. How can I choose the version when running a program ?
Thanks a lot.

Le mercredi 15 janvier 2014 17:39:29 UTC+1, Lutz Westermann a écrit :

    Jaques,

    The most recent GAMS version is 24.2.1
    (http://www.gams.com/download/)
    and this is also the version that introduced the '         $load
    (http://www.gams.com/docs/release/release.htm#gams24_2_1_gams
    ),
    so this
    cannot work with GAMS 24.1.

    Best regards,
    Lutz


    On 1/15/2014 11:07 AM, Jacques wrote:
     > 24.1
     > I think it is the most recent ?
     >
     > Le mercredi 15 janvier 2014 17:04:59 UTC+1, Renger van
    Nieuwkoop a écrit :
     >
     >     Which gams version do you use?
     >
     >     Sent from my iPhone
     >
     >     Am 15.01.2014 um 16:56 schrieb "Jacques"           >     >:
     >
     >>     Hello again,
     >>     Thank you for your quick answer !
     >>
     >>     I tried again, then I tried copying your code ; the
    creation of
     >>     the gdx works, but the second part still puts me the
    same errors.
     >>     "Symbol not in GDX"
     >>     "load types are different"
     >>     "362  Values for domain 2 are unknown - no checking
    possible" for
     >>     i and j
     >>     " Load/unload ident expected"
     >>
     >>     ...
     >>     Help ! Why wouldn't it work on my computer if it works
    on yours ??
     >>     Argh...
     >>
     >>     Thanks !
     >>     Jacques
     >>
     >>     Le mercredi 15 janvier 2014 16:45:06 UTC+1, Renger van
    Nieuwkoop a
     >>     écrit :
     >>
     >>         Hi Jaques
     >>
     >>         Here a working example (the first commented lines
    were used to
     >>         generate the gdx file).
     >>
     >>         *set
     >>
     >>         *i identifier /1*10/
     >>
     >>         *j carac /E, F/;
     >>
     >>         *parameters  N(i,j) ;
     >>
     >>         *N(i,j) = uniform(0,1);
     >>
     >>         *$gdxout myGDX.gdx
     >>
     >>         *execute_unload "myGDX.gdx",  N;
     >>
     >>         set
     >>
     >>             i identifier
     >>
     >>            j carac;
     >>
     >>         parameters N(i,j) ;
     >>
     >>         $Gdxin myGDX.gdx
     >>
     >>         $load i          >>
     >>         $Gdxin
     >>
     >>         display i,j,N;
     >>
     >>         Hope this helps
     >>
     >>         Cheers
     >>
     >>         Renger
     >>
     >>         ____________________
     >>
     >>         Modelworks
     >>
     >>         Gewerbestrasse 15
     >>
     >>         3600 Thun – Switzerland
     >>
     >>         +41 79 818 53 73
     >>
     >> In...@modelworks.ch
     >>
     >> blog.modelworks.ch

     >>
     >>         *From:*gams...@googlegroups.com
     >>         [mailto:gams...@googlegroups.com] *On Behalf Of
    *Jacques
     >>         *Sent:* Mittwoch, 15. Januar 2014 16:12
     >>         *To:* gams...@googlegroups.com
     >>         *Subject:* Re: reading the sets of a variable in GDX
     >>
     >>         Hi,
     >>
     >>         Because it doesn't work... I have errors : "load
    types are
     >>         different", "symbol neither initialized nor assigned".
     >>
     >>         This is my simple code :
     >>
     >>         set
     >>
     >>         i identifier /1*10/
     >>
     >>         j carac /E, F/;
     >>
     >>         parameters
     >>
     >>         N(i,j) ;
     >>
     >>         $Gdxin myGDX.gdx
     >>
     >>         $load N
     >>
     >>         $Gdxin
     >>
     >>         display N;
     >>
     >>         It works when N only depends on one parameter, but I
    can't get
     >>         it to work for several parameters for the above errors.
     >>
     >>         Thank you !
     >>
     >>         Jacques
     >>         Le mardi 14 janvier 2014 18:22:03 UTC+1, Renger van
    Nieuwkoop
     >>         a écrit :
     >>
     >>             hi Jaques
     >>
     >>             Why don't you just display i and j and you can
    check for
     >>             yourself?
     >>
     >>             Cheers
     >>
     >>             Renger
     >>
     >>             sent from my iPad
     >>
     >>
     >>             Am 14.01.2014 um 18:18 schrieb "Jacques"
    :
     >>
     >>                 Hello,
     >>
     >>                 I am looking at a GDX file with a two-sets
    variable :
     >>                 A(i,j)
     >>
     >>                 I want to import i,j and A in GAMS.
     >>
     >>                 I am confused...
     >>
     >>                 $GDXIN mygdx.gdx
     >>                 $LOAD A
     >>                 $GDXIN
     >>
     >>                 --> this is OK. Now how can I retrieve i and
    j ? I tried :
     >>                 $GDXIN mygdx.gdx
     >>                 $LOAD i          >>                 $GDXIN
     >>
     >>                 but I'm not sure... What do you think ?
     >>
     >>                 Thank you !
     >>
     >>                 --
     >>                 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+...@googlegroups.com.
     >>                 To post to this group, send email to
     >> gams...@googlegroups.com.
     >>                 Visit this group at
     >> http://groups.google.com/group/gamsworld

     >>                          >.
     >>                 For more options, visit
     >> https://groups.google.com/groups/opt_out

     >>                          >.
     >>
     >>         --
     >>         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+...@googlegroups.com.
     >>         To post to this group, send email to
    gams...@googlegroups.com.
     >>         Visit this group at
    http://groups.google.com/group/gamsworld

     >>                  >.
     >>         For more options, visit
     >> https://groups.google.com/groups/opt_out

     >>                  >.
     >>
     >>     --
     >>     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+...@googlegroups.com
    .
     >>     To post to this group, send email to
    gams...@googlegroups.com
     >>     .
     >>     Visit this group at
    http://groups.google.com/group/gamsworld

     >>              >.
     >>     For more options, visit
    https://groups.google.com/groups/opt_out

     >>              >.
     >
     > --
     > 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+...@googlegroups.com.
     > To post to this group, send email to gams...@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 LWest...@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


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


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.