parameter index issue

Problems with syntax of GAMS
Post Reply
zhao32
User
User
Posts: 1
Joined: 2 months ago

parameter index issue

Post by zhao32 » 2 months ago

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: 161
Joined: 2 years ago

Re: parameter index issue

Post by Renger » 2 months ago

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

Post Reply