parameter index issue

Problems with syntax of GAMS
Post Reply
zhao32
User
User
Posts: 1
Joined: 5 years ago

parameter index issue

Post by zhao32 »

Dear friends,

I have a two dimensional parameter generated from MATLAB using iwgdx. The indices are ('1','1'),('1','2'),('1','3').

How can I change the indices using ('t0','s1'),('t0','s2'),('t0','s3') which can be manipulated in GAMS?

Thanks,
Zhao
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: parameter index issue

Post by Renger »

Hi
I would do this in matlab using wgdx as I assume that all information (e.g. t0, s1 to s3 are also defined in matlab):

Code: Select all

c.val = [1,2,3];
c.name = 'mypar';
c.type = 'parameter';
c.form = 'full';
c.ts = 'myparameter';
c.uels = {{'t0'}, {'s1', 's2', 's3'}};
wgdx('foo', c);
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Post Reply