Search found 295 matches
- 1 year ago
- Forum: API
- Topic: Gamstransfer not available for this version of R
- Replies: 2
- Views: 4899
Re: Gamstransfer not available for this version of R
Hi, Are you trying to use R console under RStudio? If you are, then can you try the same thing separately outside R studio (from command prompt -> R )? What happens if you try to install the binary package? install.packages("C:/GAMS/41/apifiles/R/gamstransfer/binary/gamstransfer.zip", type...
- 1 year ago
- Forum: Modeling
- Topic: Expanding Matrix Elements Depending on Values
- Replies: 1
- Views: 1323
Re: Expanding Matrix Elements Depending on Values
You can get this to work by using two loops in GAMS as follows: Sets j /1*5/ c /1*7/; Parameters UNIT(j) Number of Units / 1 1 2 3 3 2 4 0 5 1 / CAP(j) Capacities of Units / 1 200 2 450 3 500 4 1000 5 700 / VERTICAL(c); alias(j, jj); parameter cumsumj(j) cumulative summation; cumsumj(j) = sum(jj$(or...
- 1 year ago
- Forum: API
- Topic: No module named 'gamstransfer'
- Replies: 4
- Views: 4463
Re: No module named 'gamstransfer'
As Michael said, GAMS Transfer is available from GAMS 37. Please install the latest version of GAMS.
https://www.gams.com/download/
- Atharv
https://www.gams.com/download/
- Atharv
- 1 year ago
- Forum: Modeling
- Topic: Constrain Modeling with multidimensional binary variable
- Replies: 3
- Views: 1221
Re: Constrain Modeling with multidimensional binary variable
ahh. I see your point. The teacher assignment is free. Also you are right that i meant hh and not tt. There are many ways to approach such problems. For example, you can declare a variable u(c,r,t,s,h,d) which forces iboth x(c,r,t,s,h-1,d) and x(c,r,t,s,h,d) to be equal (1). x(c,r,t,s,h-1,d) =l= x(c...
- 1 year ago
- Forum: Modeling
- Topic: Constrain Modeling with multidimensional binary variable
- Replies: 3
- Views: 1221
Re: Constrain Modeling with multidimensional binary variable
2. you need another variable that is 1 if a subject is taught on a day x1(c,r,t,s,d) To say that when x1 is 1 x is greater than 0, you can use the following constraint. sum(h, x(c,r,t,s,h,d)) =l= M*(x1(c,r,t,s,d) ) 3. You need a constraint that says if x(c,r,t,s,h,d) is 1 then all x except for t-1 a...
- 1 year ago
- Forum: Syntax
- Topic: Fixing parts of multidimensional variable for another run
- Replies: 2
- Views: 1537
Re: Fixing parts of multidimensional variable for another run
You have a variable X(c, r, t, s, h, d). If you change t in this, you get a completely new time table. When you define X like this, it doesn't mean much to say "keeping everything else constant" and some teacher will come and teach at (c,r,s,h,d). Instead, you need another variable that is...
- 1 year ago
- Forum: Modeling
- Topic: Mathematical Expersion Explanation
- Replies: 3
- Views: 1266
Re: Mathematical Expersion Explanation
Once you have a 2D set, everything else follows. You can write sum over hlp(l, p) as follows.
sum((l, p)$hlp(l, p), ....)
will do the needful.
- Atharv
sum((l, p)$hlp(l, p), ....)
will do the needful.
- Atharv
- 1 year ago
- Forum: Syntax
- Topic: Writing Equations with varying index
- Replies: 1
- Views: 1276
Re: Writing Equations with varying index
Arvind, In such cases it helps to think in terms of indices and sets. For example, key question to ask here is how many equations do you need? for each i, you need i-1 equations (total i * (i-1) equations) This gives you a hint that your equation should be defined over 2 dimensions. However, in the ...
- 1 year ago
- Forum: Modeling
- Topic: Conditional Statment
- Replies: 2
- Views: 1169
Re: Conditional Statment
No. You also have to link binary variables with x.
I assume arc (i, j) is used means that x(i, j) > 0
similarly node i is used means either x(i, j) or x(j, i) is nonzero for all j that connect to node i.
You can do this using a big-M formulation.
- Atharv
I assume arc (i, j) is used means that x(i, j) > 0
similarly node i is used means either x(i, j) or x(j, i) is nonzero for all j that connect to node i.
You can do this using a big-M formulation.
- Atharv
- 1 year ago
- Forum: Modeling
- Topic: Mathematical Expersion Explanation
- Replies: 3
- Views: 1266
Re: Mathematical Expersion Explanation
There is h (one dimensional set) and there H (two dimensional set). Don't confuse the two. Since GAMS is case insensitive, declare another set hlp(l,p) set hlp(l,p); you can then assign elements to this set hlp("H1","NS") = yes; you can then use set hlp wherever you have H in you...