Search found 210 matches

by abhosekar
1 day ago
Forum: Syntax
Topic: Problem solving error 149
Replies: 4
Views: 99

Re: Problem solving error 149

Many errors. You have to define equations over sets such as rest1(i, j) etc. d1("b", j) doesn't exist because d1 is defined over (i, j) and i does not have any element named b. It has b1,b2,... The biggest problem in this formulation is funobj. In this equation you are using (i, j) but they are not ...
by abhosekar
3 days ago
Forum: Syntax
Topic: Problem solving error 149
Replies: 4
Views: 99

Re: Problem solving error 149

please follow the rules of this forum app.php/rules
and post your model in a code block so that other users can copy and run it. The way you have posted your model misaligns tables and makes it difficult for other users to run it.

- Atharv
by abhosekar
6 days ago
Forum: Syntax
Topic: Equating two sets of variables
Replies: 3
Views: 135

Re: Equating two sets of variables

You are almost in the right direction. What you are missing is a mapping set. When you say x(nn) = y(n2), you are creating a map that y(1) belongs to x(97).. y(2) belongs to x(98) and so on... I created a small example where n1 is of size 8 and n2 is of size 3. You want to equate x(4-6) with y(1-3)....
by abhosekar
3 weeks ago
Forum: GAMS-FAQ
Topic: Problem opening Excel: Cannot create an instance of Excel
Replies: 0
Views: 286

Problem opening Excel: Cannot create an instance of Excel

This errors will occur when Excel is not installed, or more likely, the wrong version of Excel is installed. According to Microsoft, there are two versions of Excel 2010; “Click to Run” and “Regular”. The “Click to Run” version does not install the necessary registry entries used by GDXXRW and thus ...
by abhosekar
1 month ago
Forum: Modeling
Topic: Issue of select members from sets
Replies: 2
Views: 281

Re: Issue of select members from sets

It is a good practice to index your equations but in your case, it needs some work. I can give you an outline on how to do it. The aim should be to write con(r); first let's look at the terms tds (in first equation, you have tds(5) and tds(1), in second you have 4,2 and in so on.... I don't see any ...
by abhosekar
1 month ago
Forum: Solvers
Topic: How do I view the complete equations without showing the first three equations only?
Replies: 1
Views: 276

Re: How do I view the complete equations without showing the first three equations only?

Before solve statement, type option limrow=100; will show you 100 equations. If that's not enough, set it to limrow=1e9; and you will see all your equations.

find in GAMS documentation: https://www.gams.com/latest/docs/UG_Gam ... MSAOlimrow
HTH
- Atharv
by abhosekar
1 month ago
Forum: Syntax
Topic: Conditional statement with variable
Replies: 5
Views: 495

Re: Conditional statement with variable

Francesca, Regarding the value of big-M, please read the following FAQ. https://forum.gamsworld.org/viewtopic.php?f=15&t=11430&p=27136&hilit=big#p27136 Regarding non-binary values of binary variables, please read the last three paragraphs of binary variables section in GAMS documentation https://www...
by abhosekar
1 month ago
Forum: Syntax
Topic: Conditional statement with variable
Replies: 5
Views: 495

Re: Conditional statement with variable

You can use big-M to declare another variable that is 1 if say SOC is greater than 0.95 or less than 0.05 based on your need. Let's say you want a binary variable to be 1 if SOC(t) is greater than 0.95. You can do the following: binary variable b(t); SOC(t) - 0.95 =l= M * b(t); The idea is that if s...
by abhosekar
1 month ago
Forum: Syntax
Topic: Conditional statement with variable
Replies: 5
Views: 495

Re: Conditional statement with variable

You can't use conditions on variables. Until you solve, variables don't have a value and using $ condition on variable while defining your constraint does not make much sense. Please refer to the following FAQ.

viewtopic.php?f=15&t=12108

Hope this helps.

- Atharv
by abhosekar
2 months ago
Forum: Archive Google Group
Topic: List cannot be ejected after a model is run
Replies: 1
Views: 1172

Re: List cannot be ejected after a model is run

Hi,

What platform are you using? How are you running it? If you are using studio, you can simply double click on any white space in the process log. Alternatively, you can also open it manually (it is usually in the same folder as your .gms and .log file)

- Atharv