Thank you so much, Micheal. It works
I haven't been able to solve this problem for a while.
Thank you again
Search found 4 matches
- 1 year ago
- Forum: Modeling
- Topic: sum function problem
- Replies: 2
- Views: 2604
- 1 year ago
- Forum: Modeling
- Topic: sum function problem
- Replies: 2
- Views: 2604
sum function problem
Hi everybody, I want to solve inequality in the GAMS environment but I can't. The inequality that I want to solve is as follow: constraint (k4).jpg And, I coded the exact form of the constraint in GAMS as follows (Here, x(i,t) is binary variable, R and r(i) are parameters.) (Also, x(i,t) is written ...
- 2 years ago
- Forum: Modeling
- Topic: coefficient mismatch
- Replies: 2
- Views: 10825
Re: coefficient mismatch
Thank you, Michael. It works. As you said, I coded ord(t) as (ord(t)-1). Since I want t value, I need to start at zero. But I want to ask another question. I want to code an inequation (or constraint) with the same sets (t /0*15/ and i /0*5/). The constraint is as follows: constraint (k4).jpg And, I...
- 2 years ago
- Forum: Modeling
- Topic: coefficient mismatch
- Replies: 2
- Views: 10825
coefficient mismatch
Hi everybody, I have i and t sets as follows: Sets t /0*15/ i /0*5/; And, I have objective function as floows: obj(i)$(ord(i)=6).. Z =e= sum(t, x(i,t)*ord(t)); (x(i,t) is a binary variable) When I write the above objective function in its open form: obj =e= 0*x(5,0)+1*x(5,1)+2*x(5,2)+...+15*(5,15) B...