Search found 190 matches

by abhosekar
5 days ago
Forum: Syntax
Topic: gdxxrw.exe is not recognized as an internal or external command
Replies: 1
Views: 81

Re: gdxxrw.exe is not recognized as an internal or external command

Please close and reopen your terminal/command prompt/Studio/IDE after you add GAMS System directory to your environment variable PATH. After you do this, you should be open command prompt and use gdxxrw and it should identify. Similarly, the command gams should be identified as well. If it isn't you...
by abhosekar
5 days ago
Forum: Modeling
Topic: Presolve eliminates most of rows and cols
Replies: 1
Views: 61

Re: Presolve eliminates most of rows and cols

Let me clarify a few things: Pre-solve can potentially eliminate all your constraints if they are redundant (if it thinks they are unnecessary). So there is nothing wrong with 90%. It also does not mean in any way that you have made "mistakes". The number of constraints/variables removed by presolve...
by abhosekar
1 week ago
Forum: Syntax
Topic: Set is under control already
Replies: 2
Views: 94

Re: Set is under control already

You are writing this statement for each J2 (there is a J2 on the left hand side). When you write sum(J2,..) there is no way to distinguish between the J2 that you are using in sum and the one on the left hand side. Therefore you get this error. You can use alias. alias(j2, j2p); you can then use DAT...
by abhosekar
3 weeks ago
Forum: GAMS-FAQ
Topic: how to use .lp file with GAMS?
Replies: 0
Views: 213

how to use .lp file with GAMS?

To generate lp file from GAMS, you can use writelp option. An example is shown here using the rotdk model from GAMS model library where the lines before the solve statement demonstrate how to use the option writelp. $title Robust Optimization (ROTDK,SEQ=185) $onText Robust Optimization. Laguna, M, A...
by abhosekar
3 weeks ago
Forum: Syntax
Topic: Using conopt:Lspret=False option
Replies: 6
Views: 255

Re: Using conopt:Lspret=False option

This means that some of your constraints are linearly dependent (or jacobian is singular) and there is no search direction for conopt to proceed. Try changing initial point (or obtain it by fixing some variables and using CNS) You can find more details in the GAMS documentation. https://www.gams.com...
by abhosekar
4 weeks ago
Forum: Syntax
Topic: Using conopt:Lspret=False option
Replies: 6
Views: 255

Re: Using conopt:Lspret=False option

I meant modelname.optfile

In your case, MCGEM1.optfile=1; (without <>)

- Atharv
by abhosekar
4 weeks ago
Forum: Modeling
Topic: Domain error
Replies: 5
Views: 183

Re: Domain error

Fair question. You say that y(j) can take same "values" as set i. However, it should be noted that set i need not contain values. Set i could be /i1,i2,..i10/ for example. Sets are more like strings than values. Think in terms of writing equations over a subset of j. The order of equation doesn't ma...
by abhosekar
1 month ago
Forum: Syntax
Topic: Using conopt:Lspret=False option
Replies: 6
Views: 255

Re: Using conopt:Lspret=False option

You have to use it using CONOPT options file. You can create this file externally or if you don't want to carry multiple files around, you can add the following lines to your GAMS code (before solve statement) $onecho > conopt.opt lspret = false $offecho You have to tell GAMS to use options file. Yo...
by abhosekar
1 month ago
Forum: Modeling
Topic: Domain error
Replies: 5
Views: 183

Re: Domain error

If you define two different sets i and j, there is no way to use them interchangeably. But if you define one set and declare the other as an alias, you can do it For example set i; alias (i, j); For your second question, what does it mean when you say x(y(j))? May be you are thinking in the wrong di...
by abhosekar
1 month ago
Forum: Modeling
Topic: Error message
Replies: 1
Views: 157

Re: Error message

bunch of issues. You are missing semicolon on line 70. in probcons(t) you are summing over t but t is already under control. Looks to me like you only need probcons. (i.e., without t). Is the constraint for all t? If not, the constraint should not be indexed with t. on line 13, you should define par...