1 SETS
2 i nakit ihtiyaci kuru /15/
3 j karsilanacak kur /15/;
4
5 TABLE
6 a(i,j) doviz kuru
7 1 2 3 4 5
8 1 1.00000 0.69980 8.07800 2.62700 224.700
9 2 1.42500 1.00000 11.55000 3.75400 320.700
10 3 0.12340 0.08647 1.00000 0.32500 27.760
11 4 0.37930 0.26620 3.07300 1.00000 85.510
12 5 0.00443 0.00310 0.03586 0.01163 1.00000;
13
14 PARAMETER c(i,j) komisyon;
15 c(i,j)= 1 - a(i,j) * a(j,i);
**** $171,171
16 POSITIVE VARIABLES
17 x(i,j);
18 VARIABLES
19 z;
20 EQUATIONS
21 frankKisidi Karsilanmasi gereken Frank miktari
22 yenKisidi Karsilanmasi gereken Yen miktari
23 dolarKisidi eldeki dolar fazlasi kisidi
24 poundKisidi eldeki pound fazlasi kisidi
25 markKisidi eldeki mark fazlasi kisidi
26
27 amac komisyon maliyeti;
28
29
30 amac… z =e= c(‘3’,‘1’)*x(‘3’,‘1’)+c(‘3’,‘2’)*x(‘3’,‘2’)+c(‘3’,‘4’)*x(’
3’,‘4’)+c(‘5’,‘1’)*x(‘5’,‘1’)+c(‘5’,‘2’)*x(‘5’,‘2’)+c(‘5’,‘4’)*x(‘5’,‘4’);
31 frankKisidi… a(‘1’,‘3’)*x(‘3’,‘1’)+a(‘2’,‘3’)*x(‘3’,‘2’)+a(‘4’,‘3’)*x(
‘3’,‘4’) =g= 8;
32 yenKisidi… a(‘1’,‘5’)*x(‘5’,‘1’)+a(‘2’,‘5’)*x(‘5’,‘2’)+a(‘4’,‘5’)*x(
‘5’,‘4’) =g= 1280;
33 dolarKisidi… x(‘3’,‘1’)+x(‘5’,‘1’) =l= 2;
34 poundKisidi… x(‘3’,‘2’)+x(‘5’,‘2’) =l= 5;
35 markKisidi… x(‘3’,‘4’)+x(‘5’,‘4’) =l= 3;
36
37 MODEL doviz /all/;
38 SOLVE doviz using lp min z;
**** $257
GAMS 24.3.3 r48116 Released Sep 19, 2014 WEX-WEI x86 64bit/MS Windows 10/29/14 15:27:51 Page 2
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Error Messages
171 Domain violation for set
257 Solve statement not checked because of previous errors
I have almost no experience. I get error on line 15. What is the way that multiply a(i,j) and a(j,i)?
Please help me
–
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/d/optout.