Help me Please . **** Equation infeasible due to rhs value****

Hallo to everyone,
i code my model in gams but error *** Equation infeasible due to rhs value **** in line 92 occured.
please help me to correct it.
my code is following :

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 z1 total present value
13 z2 total cost of resource ;
14 binary variables x ;
15 integer variables sr, fr ;
16 parameters
17 c(k) unit cost of resource types per unit time
18 / k1 14
19 k2 23
20 k3 17 /
21 a(k) constant availability of renewable resource type k
22 / k1 30
23 k2 40
24 k3 50 /
25 r(j,k,m) resource requirement of activity j in mode m for resource type k
26 / a2. k1. m1 = 9
27 a2. k1. m2 = 6
28 a3. k1. m1 = 12
29 a3. k1. m2 = 6
30 a3. k3. m1 = 11
31 a3. k3. m2 = 6
32 a4. k1. m1 = 3
33 a4. k1. m2 = 1
34 a4. k2. m1 = 4
35 a4. k2. m2 = 1
36 a4. k3. m1 = 3
37 a4. k3. m2 = 2
38 a5. k2. m1 = 3
39 a5. k2. m2 = 2
40 a5. k3. m1 = 4
41 a5. k3. m2 = 3
42 a6. k1. m1 = 9
43 a6. k1. m2 = 6
44 a6. k2. m1 = 4
45 a6. k2. m2 = 2 /
46 ES(j) earliest start time of activity j
47 /a2 1
48 a3 1
49 a4 5
50 a5 5
51 a6 4
52 a7 20/
53 LS(j) latest start time of activity j
54 /a2 7
55 a3 7
56 a4 17
57 a5 13
58 a6 16
59 a7 20/ ;
60 table d(j,m) duration of activity j in mode m
61 m1 m2
62 a1 0 0
63 a2 4 7
64 a3 3 7
65 a4 2 4
66 a5 6 8
67 a6 3 5
68 a7 0 0 ;
69 table cf(j,m) cashflow of activity j in mode m
70 m1 m2
71 a1 0 0
72 a2 100 200
73 a3 300 400
74 a4 500 600
75 a5 700 800
76 a6 900 1000
77 a7 0 0 ;
78 scalar w deadline of the project /20/ ;
79 scalar v discount rate /0.05/ ;
80 equations
81 value define objective function 1
82 cost define objective function 2
83 precedence(i,j) precedence constraint
84 execution(j) start time in one execution mode
85 resources(k,t) renewable resources limitations
86 recruitment(j,k) recruitment dates for resources
87 release(j,k) release dates for resources
88 deadline(j,m) project deadline is not violated ;
89 value… z1 =e= sum((j,m,t)(ord(t)>= ES(j)and ord(t)= ES(j)and ord(t)= ES(i)and ord(t)= ES(j)and ord(t)=(ord(t)-d(j,m)+1)),r(j,k,m)*x(j,m,u) )=l= a(K) ; 94 recruitment(j,k).. sr(k)=l= sum((t,m)(ord(t)>= ES(j)and ord(t)= ES(j)and ord(t)= ES(j)and ord(t)<= LS(j)),ord(t)*x(j,m,t))=
l= w ;
97 model MRCPSP /all/ ;
98 solve MRCPSP using mip maximizing z1 ;
99 solve MRCPSP using mip minimizing z2 ;
100 display x.l,sr.l,fr.l,z1.l,z2.l ;

Error Message :
**** Exec Error at line 92: Equation infeasible due to rhs value

**** INFEASIBLE EQUATIONS …

---- execution =E= start time in one execution mode

execution(a1)… 0 =E= 1 ; (LHS = 0, INFES = 1 ****)

REMAINING 6 ENTRIES SKIPPED

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/d/optout.

Hi Vahid

just check your .lst file (the extended model, equation listing), you can, not easily maybe, figure out where did you make a mistake.

best,


On Thu, Jun 19, 2014 at 8:44 AM, Vahid reza Mohammadi wrote:

Hallo to everyone,
i code my model in gams but error *** Equation infeasible due to rhs value **** in line 92 occured.
please help me to correct it.
my code is following :

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 z1 total present value
13 z2 total cost of resource ;
14 binary variables x ;
15 integer variables sr, fr ;
16 parameters
17 c(k) unit cost of resource types per unit time
18 / k1 14
19 k2 23
20 k3 17 /
21 a(k) constant availability of renewable resource type k
22 / k1 30
23 k2 40
24 k3 50 /
25 r(j,k,m) resource requirement of activity j in mode m for resource type k
26 / a2. k1. m1 = 9
27 a2. k1. m2 = 6
28 a3. k1. m1 = 12
29 a3. k1. m2 = 6
30 a3. k3. m1 = 11
31 a3. k3. m2 = 6
32 a4. k1. m1 = 3
33 a4. k1. m2 = 1
34 a4. k2. m1 = 4
35 a4. k2. m2 = 1
36 a4. k3. m1 = 3
37 a4. k3. m2 = 2
38 a5. k2. m1 = 3
39 a5. k2. m2 = 2
40 a5. k3. m1 = 4
41 a5. k3. m2 = 3
42 a6. k1. m1 = 9
43 a6. k1. m2 = 6
44 a6. k2. m1 = 4
45 a6. k2. m2 = 2 /
46 ES(j) earliest start time of activity j
47 /a2 1
48 a3 1
49 a4 5
50 a5 5
51 a6 4
52 a7 20/
53 LS(j) latest start time of activity j
54 /a2 7
55 a3 7
56 a4 17
57 a5 13
58 a6 16
59 a7 20/ ;
60 table d(j,m) duration of activity j in mode m
61 m1 m2
62 a1 0 0
63 a2 4 7
64 a3 3 7
65 a4 2 4
66 a5 6 8
67 a6 3 5
68 a7 0 0 ;
69 table cf(j,m) cashflow of activity j in mode m
70 m1 m2
71 a1 0 0
72 a2 100 200
73 a3 300 400
74 a4 500 600
75 a5 700 800
76 a6 900 1000
77 a7 0 0 ;
78 scalar w deadline of the project /20/ ;
79 scalar v discount rate /0.05/ ;
80 equations
81 value define objective function 1
82 cost define objective function 2
83 precedence(i,j) precedence constraint
84 execution(j) start time in one execution mode
85 resources(k,t) renewable resources limitations
86 recruitment(j,k) recruitment dates for resources
87 release(j,k) release dates for resources
88 deadline(j,m) project deadline is not violated ;
89 value… z1 =e= sum((j,m,t)(ord(t)>= ES(j)and ord(t)= ES(j)and ord(t)= ES(i)and ord(t)= ES(j)and ord(t)=(ord(t)-d(j,m)+1)),r(j,k,m)*x(j,m,u) )=l= a(K) ; 94 recruitment(j,k).. sr(k)=l= sum((t,m)(ord(t)>= ES(j)and ord(t)= ES(j)and ord(t)= ES(j)and ord(t)<= LS(j)),ord(t)*x(j,m,t))=
l= w ;
97 model MRCPSP /all/ ;
98 solve MRCPSP using mip maximizing z1 ;
99 solve MRCPSP using mip minimizing z2 ;
100 display x.l,sr.l,fr.l,z1.l,z2.l ;

Error Message :
**** Exec Error at line 92: Equation infeasible due to rhs value

**** INFEASIBLE EQUATIONS …

---- execution =E= start time in one execution mode

execution(a1)… 0 =E= 1 ; (LHS = 0, INFES = 1 ****)

REMAINING 6 ENTRIES SKIPPED

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/d/optout.



\

Babak Saleck Pay
Ph.D Student of Systems Modeling and Analysis
Department of Statistical Sciences and Operations Research
Virginia Commonwealth University
4156 Grace Harris Hall
1015 Floyd Ave.
Richmond, VA

\

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.

On Thursday, June 19, 2014 5:14:45 PM UTC+4:30, Vahid reza Mohammadi wrote:

Hallo to everyone,
i code my model in gams but error *** Equation infeasible due to rhs value **** in line 92 occured.
please help me to correct it.
my code is following :

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 z1 total present value
13 z2 total cost of resource ;
14 binary variables x ;
15 integer variables sr, fr ;
16 parameters
17 c(k) unit cost of resource types per unit time
18 / k1 14
19 k2 23
20 k3 17 /
21 a(k) constant availability of renewable resource type k
22 / k1 30
23 k2 40
24 k3 50 /
25 r(j,k,m) resource requirement of activity j in mode m for resource type k
26 / a2. k1. m1 = 9
27 a2. k1. m2 = 6
28 a3. k1. m1 = 12
29 a3. k1. m2 = 6
30 a3. k3. m1 = 11
31 a3. k3. m2 = 6
32 a4. k1. m1 = 3
33 a4. k1. m2 = 1
34 a4. k2. m1 = 4
35 a4. k2. m2 = 1
36 a4. k3. m1 = 3
37 a4. k3. m2 = 2
38 a5. k2. m1 = 3
39 a5. k2. m2 = 2
40 a5. k3. m1 = 4
41 a5. k3. m2 = 3
42 a6. k1. m1 = 9
43 a6. k1. m2 = 6
44 a6. k2. m1 = 4
45 a6. k2. m2 = 2 /
46 ES(j) earliest start time of activity j
47 /a2 1
48 a3 1
49 a4 5
50 a5 5
51 a6 4
52 a7 20/
53 LS(j) latest start time of activity j
54 /a2 7
55 a3 7
56 a4 17
57 a5 13
58 a6 16
59 a7 20/ ;
60 table d(j,m) duration of activity j in mode m
61 m1 m2
62 a1 0 0
63 a2 4 7
64 a3 3 7
65 a4 2 4
66 a5 6 8
67 a6 3 5
68 a7 0 0 ;
69 table cf(j,m) cashflow of activity j in mode m
70 m1 m2
71 a1 0 0
72 a2 100 200
73 a3 300 400
74 a4 500 600
75 a5 700 800
76 a6 900 1000
77 a7 0 0 ;
78 scalar w deadline of the project /20/ ;
79 scalar v discount rate /0.05/ ;
80 equations
81 value define objective function 1
82 cost define objective function 2
83 precedence(i,j) precedence constraint
84 execution(j) start time in one execution mode
85 resources(k,t) renewable resources limitations
86 recruitment(j,k) recruitment dates for resources
87 release(j,k) release dates for resources
88 deadline(j,m) project deadline is not violated ;
89 value… z1 =e= sum((j,m,t)(ord(t)>= ES(j)and ord(t)= ES(j)and ord(t)= ES(i)and ord(t)= ES(j)and ord(t)=(ord(t)-d(j,m)+1)),r(j,k,m)*x(j,m,u) )=l= a(K) ; 94 recruitment(j,k).. sr(k)=l= sum((t,m)(ord(t)>= ES(j)and ord(t)= ES(j)and ord(t)= ES(j)and ord(t)<= LS(j)),ord(t)*x(j,m,t))=
l= w ;
97 model MRCPSP /all/ ;
98 solve MRCPSP using mip maximizing z1 ;
99 solve MRCPSP using mip minimizing z2 ;
100 display x.l,sr.l,fr.l,z1.l,z2.l ;

Error Message :
**** Exec Error at line 92: Equation infeasible due to rhs value

**** INFEASIBLE EQUATIONS …

---- execution =E= start time in one execution mode

execution(a1)… 0 =E= 1 ; (LHS = 0, INFES = 1 ****)

REMAINING 6 ENTRIES SKIPPED

thanks.


Hi Dear Babak
thanks for your attention i checked the .lst file but confused. i attach my model please review my model and put your suggestion.

thanks











\

Untitled_2.gms (2.81 KB)