Search found 217 matches

by abhosekar
16 hours ago
Forum: Tools
Topic: Importing data from GMAS to MATLAB
Replies: 5
Views: 2252

Re: Importing data from GMAS to MATLAB

please take a look at GDXXRW tool. https://www.gams.com/latest/docs/T_GDXXRW.html There are many examples in the documentation on how to use it for several different cases. GDXXRW creates gdx from your excel data. You can then use $gdxin to load data from the GDX file You can look at the following e...
by abhosekar
3 days ago
Forum: Modeling
Topic: Problem adding constraints
Replies: 5
Views: 649

Re: Problem adding constraints

The model you attach is "proven infeasible" if you check the process log. Therefore, the solution reported is not feasible and is not supposed to make any sense. You have to first make it feasible, get a feasible solution and then check the solution. The constraints you have for selecting only one o...
by abhosekar
4 days ago
Forum: Modeling
Topic: Problem adding constraints
Replies: 5
Views: 649

Re: Problem adding constraints

.lo, .up, and .fx are better ways to write such constraints than writing them as equations =l=, =g= etc.. In your case, first you want to make sure Bfr is 0 when Dfr is 0. Bfr.fx(f, r, t)$(Dfr(f,r) = 0) = 0 You also want to make sure that Bfr is 0 if Dfr is greater than 85 Bfr.fx(f,r,t)$(Dfr(f,r) > ...
by abhosekar
4 days ago
Forum: Modeling
Topic: Problem adding constraints
Replies: 5
Views: 649

Re: Problem adding constraints

You define distances in tables, also used them in calculating transportation cost(i guess) but you do not explicitly bound your variables with the help of these distances. It is slightly confusing to me whether the distances are maximum distances to which a farm can deliver or they are just distance...
by abhosekar
4 days ago
Forum: Solvers
Topic: solve using MINLP but results come non integer
Replies: 3
Views: 656

Re: solve using MINLP but results come non integer

Hi, It is absolutely wrong. Simply defining model as MINLP does not make all variables integers. If that was true you wouldn’t be able to include continuous variables in an MINLP model, which is certainly not the case.
- Atharv
by abhosekar
5 days ago
Forum: Solvers
Topic: solve using MINLP but results come non integer
Replies: 3
Views: 656

Re: solve using MINLP but results come non integer

Hi, Are the variables shown in this screen shot defined as integer variables? I would check this to start with. It is also important to know how the run termianted, solver status, if a feasible solution was found etc.. Even if they are integers/binary, it is possible that you see a non-integer value...
by abhosekar
5 days ago
Forum: Modeling
Topic: Please help: error(s): vcPower: FUNC DOMAIN: x**c, x=0, c<0 (RETURNED 0)
Replies: 2
Views: 696

Re: Please help: error(s): vcPower: FUNC DOMAIN: x**c, x=0, c<0 (RETURNED 0)

Hi, The error says you cannot have x=0 and c < 0. You correctly point out that c < 0 but the real problem here is that x "can be" 0 i.e., 0 is in the domain of x. Are you defining paj2 and pbj2 as positive variables? If yes, then 0 is in the domain and since 0**negative power is not defined you get ...
by abhosekar
1 week ago
Forum: Syntax
Topic: Problem solving error 149
Replies: 4
Views: 457

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
1 week ago
Forum: Syntax
Topic: Problem solving error 149
Replies: 4
Views: 457

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
1 week ago
Forum: Syntax
Topic: Equating two sets of variables
Replies: 3
Views: 353

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)....