## Search found 21 matches

1 week ago
Forum: Syntax
Topic: index of elements in GAMS
Replies: 4
Views: 243

### Re: index of elements in GAMS

Thanks a lot.
1 week ago
Forum: Syntax
Topic: index of elements in GAMS
Replies: 4
Views: 243

### Re: index of elements in GAMS

Thans for your response. But I can not do your approach because the order of elements in the set may change during each iteration of my algorithm.
1 month ago
Forum: Syntax
Topic: index of elements in GAMS
Replies: 4
Views: 243

### index of elements in GAMS

Hi, I have a set in MATLAB that I want to export it to GAMS and the order of elements in the set is important to me. As I know, the order that I define the set for the first time is the order that is defined for GAMS. As an example, I have the below code in MATLAB: Is.name='i'; Is.type='set'; Is.val...
1 month ago
Forum: Syntax
Topic: Refer to Special element of a set
Replies: 2
Views: 216

### Re: Refer to Special element of a set

1 month ago
Forum: Syntax
Topic: Refer to Special element of a set
Replies: 2
Views: 216

### Refer to Special element of a set

Hi,
Consider I have defined set i as /5,7,8,3,2,9/ in Gams and I want to define sub(i) such that contains the first element of i and define sub2(i) such that includes the last element of i. How shoud I do that?
It is notable that the set i is imported to Gams and I don't know its element in advance.
1 month ago
Forum: API
Topic: Exporting data from MATLAB to GAMS
Replies: 5
Views: 297

### Re: Exporting data from MATLAB to GAMS

Thanks for your reply. This is my code in MATLAB: ----------------------- Ps.name='p'; Ps.type='set'; Ps.val=[1:84]'; Ps.dim=1; Is.name='i'; Is.type='set'; Is.val=[1;9;6;15]; Is.dim=1; P8s.name='zb'; P8s.type='parameter'; P8s.form='full'; P8s.val=[0 1 0 0;0 0 1 0;0 0 0 1;0 0 0 0]; P8s.dim=2; wgdx('d...
1 month ago
Forum: API
Topic: Exporting data from MATLAB to GAMS
Replies: 5
Views: 297

### Re: Exporting data from MATLAB to GAMS

How should I use the second approach?
When I add the set order(i<), I get errors 10,185,492,649.
1 month ago
Forum: API
Topic: Exporting data from MATLAB to GAMS
Replies: 5
Views: 297

### Exporting data from MATLAB to GAMS

Dear all, I am trying to import data from MATLAB to GAMS. the sets and parameters result from a heuristic algorithm that I can not manipulate the values. Consider I have a set i as follows /10,5,2,9/. I need to define this set and some parameters on this set. bet the parameters which are defined on ...
2 months ago
Forum: API
Replies: 0
Views: 680