Table

Dear GAMS users

I am beginner in GAMS could you please explain the following code based on the Table and sets:

beta(C,H) = CONSVAL(C,H)/SUM(CP, CONSVAL(CP,H));

TABLE CONSVAL(C,H)
HH-U HH-NONU
AGR-C 50 75
NAGR-C 100 50

Set

C commodities
/AGR-C agricultural commodity,
NAGR-C non-agricultural commodity
H households
/HH-U urban,
HH-NONU non urban/
;
ALIAS(C,CP),(H,HP);

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Dear George (unless you really are called Geroge, in that case: dear Geroge),

Well, then I’d like to welcome you here. Though, I am quite interested in how you came across this piece of code. It is clear to me that this piece is not yours, because then you would know what it does.
Anyway, I don’t want to change this discussion into an ethical one.

Your parameter beta is the value of consval scaled to its first index (its rows).
e.g. beta(agr-c,hh-nonu) = consval(agr-c,hh-nonu) / (consval(agr-c,hh-nonu)+consval(nagr-c,hh-nonu)) = 75/(75+50) = 75/125 = 0.6

Regards,
Henry


On Friday, February 22, 2013 11:43:10 AM UTC+1, Geroge wrote:

Dear GAMS users

I am beginner in GAMS could you please explain the following code based on the Table and sets:

beta(C,H) = CONSVAL(C,H)/SUM(CP, CONSVAL(CP,H));

TABLE CONSVAL(C,H)
HH-U HH-NONU
AGR-C 50 75
NAGR-C 100 50

Set

C commodities
/AGR-C agricultural commodity,
NAGR-C non-agricultural commodity
H households
/HH-U urban,
HH-NONU non urban/
;
ALIAS(C,CP),(H,HP);

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Thank you so much for your kind assistance.

I am reading the following e-book and that codes is from there. I know about plagiarism.

“key to exercises in CGE modeling using GAMS” by Lofgren.
it is free to download.
I hope to get the chance to learn from you much.

Best Regards

M


On Friday, February 22, 2013 1:04:38 PM UTC+1, Henry JW Vermue wrote:

Dear George (unless you really are called Geroge, in that case: dear Geroge),

Well, then I’d like to welcome you here. Though, I am quite interested in how you came across this piece of code. It is clear to me that this piece is not yours, because then you would know what it does.
Anyway, I don’t want to change this discussion into an ethical one.

Your parameter beta is the value of consval scaled to its first index (its rows).
e.g. beta(agr-c,hh-nonu) = consval(agr-c,hh-nonu) / (consval(agr-c,hh-nonu)+consval(nagr-c,hh-nonu)) = 75/(75+50) = 75/125 = 0.6

Regards,
Henry


On Friday, February 22, 2013 11:43:10 AM UTC+1, Geroge wrote:

Dear GAMS users

I am beginner in GAMS could you please explain the following code based on the Table and sets:

beta(C,H) = CONSVAL(C,H)/SUM(CP, CONSVAL(CP,H));

TABLE CONSVAL(C,H)
HH-U HH-NONU
AGR-C 50 75
NAGR-C 100 50

Set

C commodities
/AGR-C agricultural commodity,
NAGR-C non-agricultural commodity
H households
/HH-U urban,
HH-NONU non urban/
;
ALIAS(C,CP),(H,HP);

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Dear M,

It is considered common practice to explain an equation when it is written down.
And I was just curious, because I usually neglect books/papers that don’t even try to explain its equation: I was thaught that for each book which does not explain its equations, there are at least two with better applicable examples that do.

regards,
Henry


On Friday, February 22, 2013 10:37:47 PM UTC+1, Geroge wrote:

Thank you so much for your kind assistance.

I am reading the following e-book and that codes is from there. I know about plagiarism.

“key to exercises in CGE modeling using GAMS” by Lofgren.
it is free to download.
I hope to get the chance to learn from you much.

Best Regards

M


On Friday, February 22, 2013 1:04:38 PM UTC+1, Henry JW Vermue wrote:

Dear George (unless you really are called Geroge, in that case: dear Geroge),

Well, then I’d like to welcome you here. Though, I am quite interested in how you came across this piece of code. It is clear to me that this piece is not yours, because then you would know what it does.
Anyway, I don’t want to change this discussion into an ethical one.

Your parameter beta is the value of consval scaled to its first index (its rows).
e.g. beta(agr-c,hh-nonu) = consval(agr-c,hh-nonu) / (consval(agr-c,hh-nonu)+consval(nagr-c,hh-nonu)) = 75/(75+50) = 75/125 = 0.6

Regards,
Henry


On Friday, February 22, 2013 11:43:10 AM UTC+1, Geroge wrote:

Dear GAMS users

I am beginner in GAMS could you please explain the following code based on the Table and sets:

beta(C,H) = CONSVAL(C,H)/SUM(CP, CONSVAL(CP,H));

TABLE CONSVAL(C,H)
HH-U HH-NONU
AGR-C 50 75
NAGR-C 100 50

Set

C commodities
/AGR-C agricultural commodity,
NAGR-C non-agricultural commodity
H households
/HH-U urban,
HH-NONU non urban/
;
ALIAS(C,CP),(H,HP);

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hi Elahe



You have two errors:

First, the order of the indices in the declaration is not consistent with your sets (assuming the i,j, and k have elements starting with i, j, and k respectively). The rows are first, followed by the columns. So the declaration should be a(j,k,i).



Second, the row label “j1.k2,k4” is because of the comma read as two row labels, “j1.k2” and “k4” where the first row label is two-dimensional and the second is 1-dimensional. You need to tell that k2 and k4 both should be combined with j1 and this is done by adding a parenthesis around k2 and k4 as j1.(k2,k4). You could also add parenthesis in the last line, j3.(k4k5), to make the terms appear similar, but it is not necessary.



Your overall table should then look as follows:



table a(j,k,i) current availability of part-time employee i for shift j on day k



i1
i15 i16i30 i31i45 i46*i50

j1.(k1,k3,k5) 1 1

j1.(k2,k4) 1 1 1

j2.k1*k4 1 1 1

j2.k5 1 1

j3.k1*k3 1 1

j3.k4*k5 1 1 ;



Good luck.



Arne


Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Elahe
Sent: Wednesday, October 30, 2013 3:52 PM
To: gamsworld@googlegroups.com
Subject: table



hi, please help me, what is wrong about this table???

table a(i,j,k) current availability of part-time employee i for shift j on day k

i1i15 i16i30 i31i45 i46i50
j1.k1,k3,k5 1 1
j1.k2,k4 1 1 1
j2.k1k4 1 1 1
j2.k5 1 1
j3.k1
k3 1 1
j3.k4*k5 1 1 ;


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.

dear Arne
thanks a lot

On Wednesday, October 30, 2013 6:22:03 PM UTC+3:30, Ela wrote:

hi, please help me, what is wrong about this table???

table a(i,j,k) current availability of part-time employee i for shift j on day k

i1i15 i16i30 i31i45 i46i50
j1.k1,k3,k5 1 1
j1.k2,k4 1 1 1
j2.k1k4 1 1 1
j2.k5 1 1
j3.k1
k3 1 1
j3.k4*k5 1 1 ;


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.

The following will run fine, you had 2 issues. The first was your table was listed as (i,j,k) but your actual set order is j then k then i. The second issue was j1.k1,k3. You can use the k1k4 and GAMS has no trouble with that, but the “,” does is not accepted. The follows works fine with GAMS and you can see the first part of the display of a below and it



set i/i1
i50/;

set j/j1*j3/;

set k/k1k5/;



table a(j,k,i) current availability of part-time employee i for shift j on day k



i1
i5 i6i30 i31i45 i46*i50

j1.k1 1 1

j1.k3 1 1

j1.k5 1 1

j1.k2 1 1 1

j1.k4 1 1 1

j2.k1*k4 1 1 1

j2.k5 1 1

j3.k1*k3 1 1

j3.k4*k5 1 1

;



If you display a, this is the first part of the display table.







John



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Ela
Sent: Wednesday, October 30, 2013 2:27 PM
To: gamsworld@googlegroups.com
Subject: Re: table



dear Arne
thanks a lot

On Wednesday, October 30, 2013 6:22:03 PM UTC+3:30, Ela wrote:

hi, please help me, what is wrong about this table???

table a(i,j,k) current availability of part-time employee i for shift j on day k

i1i15 i16i30 i31i45 i46i50
j1.k1,k3,k5 1 1
j1.k2,k4 1 1 1
j2.k1k4 1 1 1
j2.k5 1 1
j3.k1
k3 1 1
j3.k4*k5 1 1 ;


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, please help me, what is wrong about this table?
table t(i,j,k) “zaman safar bein gereha”
1.1 1.2 2.1 2.2 3.1 3.2
1 8 9 12 10 9 6
2 15 8 10 8 11 9;


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, please help me, what is wrong about this table?
table t(i,j,k) "transport time "
1.1 1.2 2.1 2.2 3.1 3.2
1 8 9 12 10 9 6
2 15 8 10 8 11 9;


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 Marzie

Should we guess, what is wrong with this table? Please add error messages and the complete code.

If I add the following, the table is fine:

sets i /12/, j /13/, k /1*2/;

Cheers

Renger

On Saturday, November 2, 2013 12:07:33 PM UTC+1, Marzie Zaker wrote:

hi, please help me, what is wrong about this table?
table t(i,j,k) "transport time "
1.1 1.2 2.1 2.2 3.1 3.2
1 8 9 12 10 9 6
2 15 8 10 8 11 9;


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.

whit errors
1 sets
2 i tashil /12/
3 l,j moshtari /1
3/
4 k vasile naghlie /1*2/;
.
.
.

23 table t(i,j,k) "transport time "
**** $184,184,184 $194,166
24 1.1 1.2 2.1 2.2 3.1 3.2
25 1 8 9 12 10 9 6
26 2 15 8 10 8 11 9;
thanks


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.

Zaker



What happens between line 4 and 23? And have you read the text of the error message? The text says: “Domain list redefined”. Redefined indicates that something was defined before, which means that you have done something with t before, that is inconsistent with the table declaration. So your problem is in some of the text that you did not show us.



Debugging errors can be hard, especially with missing information.



Arne


Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Marzie Zaker
Sent: Monday, November 04, 2013 9:00 AM
To: gamsworld@googlegroups.com
Subject: Re: table



whit errors
1 sets
2 i tashil /12/
3 l,j moshtari /1
3/
4 k vasile naghlie /1*2/;
.
.
.

23 table t(i,j,k) "transport time "
**** $184,184,184 $194,166
24 1.1 1.2 2.1 2.2 3.1 3.2
25 1 8 9 12 10 9 6
26 2 15 8 10 8 11 9;
thanks


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.

Reply-to: gamsworld@googlegroups.com

complete text

1 sets
2 i tashil /12/
3 l,j custometr /1
3/
4 k vasile naghlie /1*2/;
5
6 parameters
7 N tedad moshtari /3/
8 d(j) taghazaye moshtari (j)
9 / 1 10,2 20,3 30/
10 Q(k) zarfiat vasile naghlie (k)
11 / 1 15,2 25/
12 V(i) max khoruji az tashil (i)
13 / 1 20,2 20/
14 T(k) max zaman
15 / 1 10,2 35/;
16
17 table t(j,k) “service time”
**** $184,184 $194,166
18 k-1 k-2 k-3
19 j-1 5 4 8
20 j-2 6 5 3 ;
21
22 table t(i,j,k) "transport time "
**** $184,184,184 $194,166
23 1.1 1.2 2.1 2.2 3.1 3.2
24 1 8 9 12 10 9 6
25 2 15 8 10 8 11 9;


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 Marzie



With this code it is easy to see, where things go wrong (instead of “What is wrong with my table” and that is why forum rules should be read…See how many people are willing to help and spoil time on asking for more information)

First of all, you use T(k) as a parameter and then t(j,k) as a table. Gams doesn’t make a distinction in capital or lower characters, so you redefined a parameter t.

Changing the table name to tt for example, solves the first problem. This also happens further below, where another table t is defined.

The second error happens because you use column and row names that are unknown to gams (j-1, k-1…).



Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Marzie Zaker
Sent: Dienstag, 5. November 2013 08:37
To: gamsworld@googlegroups.com
Cc: adrud@arki.dk
Subject: Re: table



complete text

1 sets
2 i tashil /12/
3 l,j custometr /1
3/
4 k vasile naghlie /1*2/;
5
6 parameters
7 N tedad moshtari /3/
8 d(j) taghazaye moshtari (j)
9 / 1 10,2 20,3 30/
10 Q(k) zarfiat vasile naghlie (k)
11 / 1 15,2 25/
12 V(i) max khoruji az tashil (i)
13 / 1 20,2 20/
14 T(k) max zaman
15 / 1 10,2 35/;
16
17 table t(j,k) “service time”

**** $184,184 $194,166
18 k-1 k-2 k-3
19 j-1 5 4 8
20 j-2 6 5 3 ;
21
22 table t(i,j,k) "transport time "
**** $184,184,184 $194,166
23 1.1 1.2 2.1 2.2 3.1 3.2
24 1 8 9 12 10 9 6
25 2 15 8 10 8 11 9;


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.

thanks alot for your guide
realy thank


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, please help me
how write this expression in gams?
my problems are 1 and 2 in picture
thanks


Untitled.jpg

Dear Marzie



People might be willing to help you, but usually only when you show that you tried a few things yourself and give enough information (like code, error messages, etc.)



Cheers



Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Marzie Zaker
Sent: Donnerstag, 7. November 2013 10:48
To: gamsworld@googlegroups.com
Subject: Re: table



hi, please help me
how write this expression in gams?
my problems are 1 and 2 in picture
thanks


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.

Marzie Zaker



Your formula depends on the union of the sets I and J. If you create a new set that holds this union, e.g. IJ, then your constraint should be straight forward.



And before you ask how this is done, check the documentation on how to work with and manipulate dynamic sets.



Arne Stolbjerg Drud


\

Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Marzie Zaker
Sent: Thursday, November 07, 2013 10:48 AM
To: gamsworld@googlegroups.com
Subject: Re: table



hi, please help me
how write this expression in gams?
my problems are 1 and 2 in picture
thanks


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.

Reply-to: gamsworld@googlegroups.com

hi, please help me
i dont know what is the problem (Except for line 51)


1 sets
2 i anbar /12/
3 j moshtari /1
3/
4 l /j/
5 o,m,h gere /i,j/
6 k vasile naghlie /1*2/;
7
8 parameters
9 N tedad moshtari /3/
10 d(j) taghazaye moshtari (j)
11 / 1 10,2 20,3 30/
12 Q(k) zarfiat vasile naghlie (k)
13 / 1 15,2 25/
14 V(i) max khoruji az tashil (i)
15 / 1 20,2 20/
16 T(k) max zaman
17 / 1 10,2 35/;
18
19 table t1(j,k) “zaman eraee khedmat-minute”
20 1 2
21 1 5 4
22 2 6 5
23 3 8 3;
24
25 table t2(i,j,k) "transport time "
26 1.1 1.2 2.1 2.2 3.1 3.2
27 1 8 9 12 10 9 6
28 2 15 8 10 8 11 9;
29
30 variables
31 x(i,j,k)
32 y(i)
33 z(i,j)
34 z
35 U(l,k);
36
37 binary variables x(i,j,k), y(i), z(i,j), z behine;
38 positive variables U(l,k);
39
40 equations
41 hadaf “hazine”
42 eq1(j)
43 eq2(k)
44 eq3(l,j,k)
45 eq4(k,o)
46 eq5(k)
47 eq6(i,j,k)
48 eq7(k)
49 eq8(i);
50
51 hadaf… z=e= ;
**** $148,119
52 eq1(j)… sum(k, sum(o, x(o,j,k)))=e=1;
**** $171
53 eq2(k)… sum(j, d(j)) * sum(o, x(o,j,k))=l=Q(k);
**** $171,149
54 eq3(l,j,k)… U(l,k) - U(j,k) + (N * x(l,j,k))=l= N - 1;
**** $171 $171
55 eq4(k,o)… sum(m, x(o,m,k)) - sum(m, x(m,o,k))=e=0;
**** $171,171 $171,171
56 eq5(k)… sum(i, sum(j, x(i,j,k)))=l=1;
57 eq6(i,j,k)… -z(i,j)+sum(l, x(i,l,k)+x(l,j,k))=l=T(k);
**** $171 $171
58 eq7(k)… sum(i, t1(i,k)) * sum(j, x(i,j,k)) + sum(i ,sum(j, t2(i,j,k)*x(i,
**** $171 $149
j,k)))=l=T(k);
59 eq8(i)… sum(j, d(j)*z(i,j))=l=V(i)*y(i);

thanks


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 Marzie



You have defined the variable z twice (z and z(i,j)).



Cheers



Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Marzie Zaker
Sent: Sunday, November 10, 2013 10:13 AM
To: gamsworld@googlegroups.com
Cc: adrud@arki.dk
Subject: Re: table



hi, please help me
i dont know what is the problem (Except for line 51)


1 sets
2 i anbar /12/
3 j moshtari /1
3/
4 l /j/
5 o,m,h gere /i,j/
6 k vasile naghlie /1*2/;
7
8 parameters
9 N tedad moshtari /3/
10 d(j) taghazaye moshtari (j)
11 / 1 10,2 20,3 30/
12 Q(k) zarfiat vasile naghlie (k)
13 / 1 15,2 25/
14 V(i) max khoruji az tashil (i)
15 / 1 20,2 20/
16 T(k) max zaman
17 / 1 10,2 35/;
18
19 table t1(j,k) “zaman eraee khedmat-minute”
20 1 2
21 1 5 4
22 2 6 5
23 3 8 3;
24
25 table t2(i,j,k) "transport time "
26 1.1 1.2 2.1 2.2 3.1 3.2
27 1 8 9 12 10 9 6
28 2 15 8 10 8 11 9;
29
30 variables
31 x(i,j,k)
32 y(i)
33 z(i,j)
34 z
35 U(l,k);
36
37 binary variables x(i,j,k), y(i), z(i,j), z behine;
38 positive variables U(l,k);
39
40 equations
41 hadaf “hazine”
42 eq1(j)
43 eq2(k)
44 eq3(l,j,k)
45 eq4(k,o)
46 eq5(k)
47 eq6(i,j,k)
48 eq7(k)
49 eq8(i);
50
51 hadaf… z=e= ;
**** $148,119
52 eq1(j)… sum(k, sum(o, x(o,j,k)))=e=1;
**** $171
53 eq2(k)… sum(j, d(j)) * sum(o, x(o,j,k))=l=Q(k);
**** $171,149
54 eq3(l,j,k)… U(l,k) - U(j,k) + (N * x(l,j,k))=l= N - 1;
**** $171 $171
55 eq4(k,o)… sum(m, x(o,m,k)) - sum(m, x(m,o,k))=e=0;
**** $171,171 $171,171
56 eq5(k)… sum(i, sum(j, x(i,j,k)))=l=1;
57 eq6(i,j,k)… -z(i,j)+sum(l, x(i,l,k)+x(l,j,k))=l=T(k);
**** $171 $171
58 eq7(k)… sum(i, t1(i,k)) * sum(j, x(i,j,k)) + sum(i ,sum(j, t2(i,j,k)*x(i,
**** $171 $149
j,k)))=l=T(k);
59 eq8(i)… sum(j, d(j)*z(i,j))=l=V(i)*y(i);

thanks


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.