Search found 30 matches
- 2 years ago
- Forum: Modeling
- Topic: Help in writing linear equations based on conditionality in GAMS (9 variables)
- Replies: 6
- Views: 4317
Help in writing linear equations based on conditionality in GAMS (9 variables)
I have tried following problem, but I could not solve it. Can you please help me in this? I have 8 binary variables : a,b,c,d,e,f,g,h I want to define a variable (x) with the help of linear equations with following conditions: x=0, if a+b+c+d+e+f+g+h≤1 x=1, if a+b+c+d+e+f+g+h>1 Further, in my proble...
- 2 years ago
- Forum: Modeling
- Topic: Model a equation for following condition
- Replies: 3
- Views: 2412
Re: Model a equation for following condition
Thank you for your reply.
But I only want a one set of equations which will satisfy the conditions
But I only want a one set of equations which will satisfy the conditions
- 2 years ago
- Forum: Modeling
- Topic: Model a equation for following condition
- Replies: 3
- Views: 2412
Model a equation for following condition
I have three variables : A, B, C.
I want to write a linear equation such that
X = 1 if atleast 2 of A,B,C are ones.
X= 0 if only one of A,B,C is one.
A,B and C are binary (0,1).
Kindly suggest a linear equation for this.
Thank you.
I want to write a linear equation such that
X = 1 if atleast 2 of A,B,C are ones.
X= 0 if only one of A,B,C is one.
A,B and C are binary (0,1).
Kindly suggest a linear equation for this.
Thank you.
- 2 years ago
- Forum: Solvers
- Topic: Solving an MILP (MIP) problem within MIP problem
- Replies: 1
- Views: 3596
Solving an MILP (MIP) problem within MIP problem
Dear all , I have following doubt: My problem is roughly of following nature: sets it "iter" /it1*it10/ ; variables x(it) ,y(it) loop (it, MIP_problem(it) ) For each iteration above, I solve MIP problem to get x(it) and y(it) Now, I have to solve another MIP problem, which should be as fol...
- 2 years ago
- Forum: Syntax
- Topic: Require a linear function
- Replies: 2
- Views: 2310
Re: Require a linear function
Thank you for your answer. Yes. I did the same.
It seems that linearization is more of an art and less of a science.
It seems that linearization is more of an art and less of a science.
- 2 years ago
- Forum: Solvers
- Topic: Getting wrong answer for an MINLP
- Replies: 3
- Views: 4389
Re: Getting wrong answer for an MINLP
Thank you for your answer. Indeed, I got global solution when I wrote, x.l = 3. But I did not understand two things: 1. What do you mean by 'local solver' ? I did not choose any. Meaning, I did not wrote any option. The solver is by default. --- DICOPT: Starting major iteration 1 --- DICOPT: Setting...
- 2 years ago
- Forum: Solvers
- Topic: Getting wrong answer for an MINLP
- Replies: 3
- Views: 4389
Getting wrong answer for an MINLP
I should get x = 3 ; but I am getting x = 1 as the answer for following MINLP. Can you please tell me, why is it so? integer variable x; x.lo = 1; x.up = 3; scalar p1 /5/ p2 /10/ p3 /15/; variable cost, y; equations con1_eqn; con1_eqn.. y =e= (x-1)*(x-2)*p3 + (x-2)*(x-3)*p1 + (x-3)*(x-1)*p2; model a...
- 2 years ago
- Forum: Syntax
- Topic: Require a linear function
- Replies: 2
- Views: 2310
Require a linear function
Dear all , I want to have a linear function , y = f(x,y1,y2,y3) The above function should give the following answers : y = y1 , if x = x1 y = y2 , if x = x2 y = y2 , if x = x3 The variable, x is an integer variable, which will only take values, x1, x2 and x3. I can do it when x is binary (0,1) as fo...
- 2 years ago
- Forum: Modeling
- Topic: save variables as parameters
- Replies: 2
- Views: 2340
Re: save variables as parameters
Hi,
Thank you for your reply.
Thank you for your reply.
- 2 years ago
- Forum: Modeling
- Topic: save variables as parameters
- Replies: 2
- Views: 2340
save variables as parameters
Dear all,
My problem setting is as follows:
1. I have set of linear equations, the variables obtained after solving these are X1,X2...,Xn and Y1,Y2...,Yn.
2. Once the above variables are obtained, these are required as parameters in the rest of the problem.
Can you please tell me how to do it?
My problem setting is as follows:
1. I have set of linear equations, the variables obtained after solving these are X1,X2...,Xn and Y1,Y2...,Yn.
2. Once the above variables are obtained, these are required as parameters in the rest of the problem.
Can you please tell me how to do it?