index of summation in earliest start time and latest start time

Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


10.1016-j.apm.2014.04.009.pdf (453 KB)

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch







From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gamsworld@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


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.


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.

hi Renger

i coded it in gams but my issue is how to define sets that are in index summation , because earliest start and latest start time of each activity is different from another activity

On Friday, May 23, 2014 12:40:04 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gams...@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


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.

Then show your code…

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 11:18 AM
To: gamsworld@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



hi Renger

i coded it in gams but my issue is how to define sets that are in index summation , because earliest start and latest start time of each activity is different from another activity

On Friday, May 23, 2014 12:40:04 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gams...@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


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.


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.

my code is in first post

On Friday, May 23, 2014 3:40:51 PM UTC+4:30, Renger van Nieuwkoop wrote:

Then show your code…

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 11:18 AM
To: gams...@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



hi Renger

i coded it in gams but my issue is how to define sets that are in index summation , because earliest start and latest start time of each activity is different from another activity

On Friday, May 23, 2014 12:40:04 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gams...@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


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.

my code is first post. please help me

On Friday, May 23, 2014 3:40:51 PM UTC+4:30, Renger van Nieuwkoop wrote:

Then show your code…

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 11:18 AM
To: gams...@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



hi Renger

i coded it in gams but my issue is how to define sets that are in index summation , because earliest start and latest start time of each activity is different from another activity

On Friday, May 23, 2014 12:40:04 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gams...@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


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.

my code is in first post

On Friday, May 23, 2014 3:40:51 PM UTC+4:30, Renger van Nieuwkoop wrote:

Then show your code…

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 11:18 AM
To: gams...@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



hi Renger

i coded it in gams but my issue is how to define sets that are in index summation , because earliest start and latest start time of each activity is different from another activity

On Friday, May 23, 2014 12:40:04 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gams...@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


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.

Hi Vahid

What I meant is, that you show the code you tried, not just the sets.

You better take a look at the examples that come with Gams. I suppose the flowshop might be of interest.

Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Saturday, May 24, 2014 1:40 PM
To: gamsworld@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



my code is first post. please help me

On Friday, May 23, 2014 3:40:51 PM UTC+4:30, Renger van Nieuwkoop wrote:

Then show your code…

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 11:18 AM
To: gams...@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



hi Renger

i coded it in gams but my issue is how to define sets that are in index summation , because earliest start and latest start time of each activity is different from another activity

On Friday, May 23, 2014 12:40:04 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gams...@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


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.


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.

hi renger

my code my mode and the following error are in my mode please help:

1 sets
2 j activity / a1a7 /
3 k resource type / k1
k3 /
4 t time period / 120 /
5 m mode /m1
m2 / ;
6 alias(i,j) ;
7 alias(u,t);
8 variables
9 x(j,m,t) activity j in mode m in time t
10 sr(k) recruitment date of resource type k
11 fr(k) release date of resource type k ;
12 binary variables x ;
13 integer variables sr, fr ;
14 parameters
15 c(k) unit cost of resource types per unit time
16 / k1 14
17 k2 23
18 k3 17 /
19 d(j,m) duration of activity j in mode m
20 / a2. m1 = 4
21 a2. m2 = 7
22 a3. m1 = 3
23 a3. m2 = 7
24 a4. m1 = 2
25 a4. m2 = 4
26 a5. m1 = 6
27 a5. m2 = 8
28 a6. m1 = 3
29 a6. m2 = 5 /
30 cf(j,m) cashflow of activity j in mode m
31 / a2. m1 = 100
32 a2. m2 = 200
33 a3. m1 = 300
34 a3. m2 = 400
35 a4. m1 = 500
36 a4. m2 = 600
37 a5. m1 = 700
38 a5. m2 = 800
39 a6. m1 = 900
40 a6. m2 = 1000 /
41 r(j,k,m) resource requirement of activity j in mode m for resource type k
42 / a2. k1. m1 = 9
43 a2. k1. m2 = 6
44 a3. k1. m1 = 12
45 a3. k1. m2 = 6
46 a3. k3. m1 = 11
47 a3. k3. m2 = 6
48 a4. k1. m1 = 3
49 a4. k1. m2 = 1
50 a4. k2. m1 = 4
51 a4. k2. m2 = 1
52 a4. k3. m1 = 3
53 a4. k3. m2 = 2
54 a5. k2. m1 = 3
55 a5. k2. m2 = 2
56 a5. k3. m1 = 4
57 a5. k3. m2 = 3
58 a6. k1. m1 = 9
59 a6. k1. m2 = 6
60 a6. k2. m1 = 4
61 a6. k2. m2 = 2 /
62 a(k) constant availability of renewable resource type k
63 / k1 30
64 k2 40
65 k3 50 /
66 ES(j) earliest start time of activity j
67 /a2 1
68 a3 1
69 a4 5
70 a5 5
71 a6 4
72 a7 20/
73 LS(j)
74 /a2 7
75 a3 7
76 a4 17
77 a5 13
78 a6 16
79 a7 20/ ;
80 scalar w deadline of the project /20/ ;
81 scalar v discount rate /0.05/ ;
82 equations
83 value net present value
84 cost resource cost
85 precedence(i,j) precedence constraint
86 execution start time in one execution mode
87 resources renewable resources limitations
88 recruitment recruitment dates for resources
89 release release dates for resources
90 deadline project deadline is not violated ;
91 value… sum((j,m,t),$ord(t)>= ES(j)and ord(t)<= LS(j),cf(j,m))exp(-vt)*x
**** $119 $8,37,409
(j,m,t) ;
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
GAMS 24.1.2 r40979 Released Jun 16, 2013 WEX-WEI x86_64/MS Windows 05/26/14 02:45:06 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


8 ‘)’ expected
37 ‘=l=’ or ‘=e=’ or ‘=g=’ operator expected
119 Number (primary) expected
409 Unrecognizable item - skip to find a new statement
looking for a ‘;’ or a key word to get started again

**** 4 ERROR(S) 0 WARNING(S)


On Saturdhay, May 24, 2014 7:47:41 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid

What I meant is, that you show the code you tried, not just the sets.

You better take a look at the examples that come with Gams. I suppose the flowshop might be of interest.

Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Saturday, May 24, 2014 1:40 PM
To: gams...@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



my code is first post. please help me

On Friday, May 23, 2014 3:40:51 PM UTC+4:30, Renger van Nieuwkoop wrote:

Then show your code…

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 11:18 AM
To: gams...@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



hi Renger

i coded it in gams but my issue is how to define sets that are in index summation , because earliest start and latest start time of each activity is different from another activity

On Friday, May 23, 2014 12:40:04 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

In…@modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gams...@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


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.

HI

This is something I already answered. You can’t use a set element as a number (Gams error code is quite clear about that: 119 Number (primary) expected

The error sign appears directly under the error itself.

So use, in this case ord(t) instead of t.

Renger

From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Montag, 26. Mai 2014 00:21
To: gamsworld@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



hi renger

my code my mode and the following error are in my mode please help:

1 sets
2 j activity / a1a7 /
3 k resource type / k1
k3 /
4 t time period / 120 /
5 m mode /m1
m2 / ;
6 alias(i,j) ;
7 alias(u,t);
8 variables
9 x(j,m,t) activity j in mode m in time t
10 sr(k) recruitment date of resource type k
11 fr(k) release date of resource type k ;
12 binary variables x ;
13 integer variables sr, fr ;
14 parameters
15 c(k) unit cost of resource types per unit time
16 / k1 14
17 k2 23
18 k3 17 /
19 d(j,m) duration of activity j in mode m
20 / a2. m1 = 4
21 a2. m2 = 7
22 a3. m1 = 3
23 a3. m2 = 7
24 a4. m1 = 2
25 a4. m2 = 4
26 a5. m1 = 6
27 a5. m2 = 8
28 a6. m1 = 3
29 a6. m2 = 5 /
30 cf(j,m) cashflow of activity j in mode m
31 / a2. m1 = 100
32 a2. m2 = 200
33 a3. m1 = 300
34 a3. m2 = 400
35 a4. m1 = 500
36 a4. m2 = 600
37 a5. m1 = 700
38 a5. m2 = 800
39 a6. m1 = 900
40 a6. m2 = 1000 /
41 r(j,k,m) resource requirement of activity j in mode m for resource type k
42 / a2. k1. m1 = 9
43 a2. k1. m2 = 6
44 a3. k1. m1 = 12
45 a3. k1. m2 = 6
46 a3. k3. m1 = 11
47 a3. k3. m2 = 6
48 a4. k1. m1 = 3
49 a4. k1. m2 = 1
50 a4. k2. m1 = 4
51 a4. k2. m2 = 1
52 a4. k3. m1 = 3
53 a4. k3. m2 = 2
54 a5. k2. m1 = 3
55 a5. k2. m2 = 2
56 a5. k3. m1 = 4
57 a5. k3. m2 = 3
58 a6. k1. m1 = 9
59 a6. k1. m2 = 6
60 a6. k2. m1 = 4
61 a6. k2. m2 = 2 /
62 a(k) constant availability of renewable resource type k
63 / k1 30
64 k2 40
65 k3 50 /
66 ES(j) earliest start time of activity j
67 /a2 1
68 a3 1
69 a4 5
70 a5 5
71 a6 4
72 a7 20/
73 LS(j)
74 /a2 7
75 a3 7
76 a4 17
77 a5 13
78 a6 16
79 a7 20/ ;
80 scalar w deadline of the project /20/ ;
81 scalar v discount rate /0.05/ ;
82 equations
83 value net present value
84 cost resource cost
85 precedence(i,j) precedence constraint
86 execution start time in one execution mode
87 resources renewable resources limitations
88 recruitment recruitment dates for resources
89 release release dates for resources
90 deadline project deadline is not violated ;
91 value… sum((j,m,t),$ord(t)>= ES(j)and ord(t)<= LS(j),cf(j,m))exp(-vt)*x
**** $119 $8,37,409
(j,m,t) ;
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

GAMS 24.1.2 r40979 Released Jun 16, 2013 WEX-WEI x86_64/MS Windows 05/26/14 02:45:06 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


8 ‘)’ expected
37 ‘=l=’ or ‘=e=’ or ‘=g=’ operator expected
119 Number (primary) expected
409 Unrecognizable item - skip to find a new statement
looking for a ‘;’ or a key word to get started again

**** 4 ERROR(S) 0 WARNING(S)


On Saturdhay, May 24, 2014 7:47:41 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid

What I meant is, that you show the code you tried, not just the sets.

You better take a look at the examples that come with Gams. I suppose the flowshop might be of interest.

Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Saturday, May 24, 2014 1:40 PM
To: gams...@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



my code is first post. please help me

On Friday, May 23, 2014 3:40:51 PM UTC+4:30, Renger van Nieuwkoop wrote:

Then show your code…

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 11:18 AM
To: gams...@googlegroups.com
Subject: Re: index of summation in earliest start time and latest start time



hi Renger

i coded it in gams but my issue is how to define sets that are in index summation , because earliest start and latest start time of each activity is different from another activity

On Friday, May 23, 2014 12:40:04 PM UTC+4:30, Renger van Nieuwkoop wrote:

Hi Vahid



People gladly help, but sending a paper with the request to send the code back hardly is the way to go. Read the guidelines for this group carefully and then repost your questions after trying to code yourself.

Most people in this list, don’t have the time to read through papers and guess what your question exactly is.



Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

In…@modelworks.ch







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Vahid reza Mohammadi
Sent: Friday, May 23, 2014 9:57 AM
To: gams...@googlegroups.com
Subject: index of summation in earliest start time and latest start time



[ ]Hi, I am a new user of GAMS
. Now I have an issue with esj and lsj in index of summation , i have attach article that mathematical mode include ; page “page 6”.

please help me to code it in gams. my model is code as follows:

sets
j activity / a1a7 /
k resource type / k1
k3 /
t time period / 120 /
m mode /m1
m2 / ;
variables
x(j,m,t) activity j in mode m in time t
sr(k) recruitment date of resource type k
fr(k) release date of resource type k ;
binary variables x ;
integer variables sr, fr ;
parameters
c(k) unit cost of resource types per unit time
/ k1 14
k2 23
k3 17 /
d(j,m) duration of activity j in mode m
/ a2. m1 = 4
a2. m2 = 7
a3. m1 = 3
a3. m2 = 7
a4. m1 = 2
a4. m2 = 4
a5. m1 = 6
a5. m2 = 8
a6. m1 = 3
a6. m2 = 5 /
cf(j,m) cashflow of activity j in mode m
/ a2. m1 = 100
a2. m2 = 200
a3. m1 = 300
a3. m2 = 400
a4. m1 = 500
a4. m2 = 600
a5. m1 = 700
a5. m2 = 800
a6. m1 = 900
a6. m2 = 1000 /
r(j,k,m) resource requirement of activity j in mode m for resource type k
/ a2. k1. m1 = 9
a2. k1. m2 = 6
a3. k1. m1 = 12
a3. k1. m2 = 6
a3. k3. m1 = 11
a3. k3. m2 = 6
a4. k1. m1 = 3
a4. k1. m2 = 1
a4. k2. m1 = 4
a4. k2. m2 = 1
a4. k3. m1 = 3
a4. k3. m2 = 2
a5. k2. m1 = 3
a5. k2. m2 = 2
a5. k3. m1 = 4
a5. k3. m2 = 3
a6. k1. m1 = 9
a6. k1. m2 = 6
a6. k2. m1 = 4
a6. k2. m2 = 2 /
a(k) constant availability of renewable resource type k
/ k1 30
k2 40
k3 50 / ;
scalar w deadline of the project /20/ ;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


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.


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.