Search found 181 matches

by abhosekar
6 hours ago
Forum: Modeling
Topic: Error message
Replies: 1
Views: 82

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...
by abhosekar
6 hours ago
Forum: Modeling
Topic: Network design with GAMS
Replies: 1
Views: 62

Re: Network design with GAMS

Please take a look at alias. https://www.gams.com/latest/docs/UG_Set ... mesForASet

set t/t1*t10/;
alias(t, tt);

constraint(k, p, h, t, tt) $(ord(t) < ord(tt)).. A(k,h,p,t,tt) =e= B(p,h,t,tt-1) + ...

Hope this helps.
by abhosekar
6 hours ago
Forum: Modeling
Topic: reference tracker modeling
Replies: 1
Views: 56

Re: reference tracker modeling

It depends on the structure of your problem. Your constraints are right but they essentially say that K_down > max(0, -k + K_old) and so on. You expect K_down = max(0, -k + K_old). This will be true if no other constraints affect the values of K and if the problem is solved to optimality. You say K_...
by abhosekar
1 day ago
Forum: GAMS-FAQ
Topic: enumerate all subsets of a set
Replies: 0
Views: 30

enumerate all subsets of a set

An easy way to get this is using powerset system attribute. Here, we want all subsets of the set i. We know that there are 2**card(i) subsets of the set i. We use a set j containing two elements and system.powersetright to create a set IJ0. Any column of IJ0 is a powerset IJ as shown by display stat...
by abhosekar
2 days ago
Forum: GAMS-FAQ
Topic: Academic Programs by Solver Partners
Replies: 0
Views: 22

Academic Programs by Solver Partners

The vendors for CPLEX, GUROBI, MOSEK and XPRESS all have academic programs that may be able to provide you with a free license for their respective solver libraries. There are two ways in which you can use these free solver licenses within GAMS: Members of these programs can either purchase a GAMS l...
by abhosekar
1 week ago
Forum: Syntax
Topic: Minimise value of variables in MINLP solution
Replies: 1
Views: 143

Re: Minimise value of variables in MINLP solution

You are minimizing your objective function which contains P_size and that is what you tell the solver to minimize. To satisfy the constraint, P_size ~ P is enough (it can very well give you the maximum P that satisfies the constraint. It has no incentive to do better). You are not telling the solver...
by abhosekar
3 weeks ago
Forum: Modeling
Topic: Disjunctive programming with Big M approach
Replies: 2
Views: 200

Re: Disjunctive programming with Big M approach

Your exact question is not clear. Please clarify.

Is there any specific constraint that you find difficult to model? Is there a logical condition that is causing issues?
You are more likely to get help if you are specific in your question.

- Atharv
by abhosekar
3 weeks ago
Forum: Modeling
Topic: Multiple allocation p hub median with lots of error
Replies: 2
Views: 186

Re: Multiple allocation p hub median with lots of error

1. It is not clear what you are trying to achieve with this line. c(i,j,k,m) /c(i,k)+c(m,j)+(a*c(k,m))/ First of all, it is not executed while declaring parameters. But even if it is, GAMS does not know what is c(i, k) etc. 2. It is not a good practice to have the same symbol (x) as binary as well a...
by abhosekar
3 weeks ago
Forum: Solvers
Topic: Getting wrong answer for an MINLP
Replies: 3
Views: 147

Re: Getting wrong answer for an MINLP

You are using the default solver but you can choose the solver by using option minlp = <solver_name>; You are using DICOPT which can handle nonconvexities but does not necessarily find the global optimum. Based on your license, you can try a solver such as baron. For more details on solvers and thei...
by abhosekar
3 weeks ago
Forum: Syntax
Topic: Require a linear function
Replies: 2
Views: 138

Re: Require a linear function

First of all, you can model your integer variable as binary variables. set i/1*3/ x = sum(i, i*xb(i)); sum(i, xb(i)) =e= 1; The idea is that since x can take values 1,2,3, you can declare 3 binary variables xb('1'),xb('2'), and xb('3'). If x is 1, xb('1') is 1 and the rest are zero and so on. You ca...