## Search found 17 matches

1 month ago
Forum: Solvers
Topic: Solving an MILP (MIP) problem within MIP problem
Replies: 1
Views: 455

### 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 follows: vari...
1 month ago
Forum: Syntax
Topic: Require a linear function
Replies: 2
Views: 184

### Re: Require a linear function

It seems that linearization is more of an art and less of a science.
1 month ago
Forum: Solvers
Topic: Getting wrong answer for an MINLP
Replies: 3
Views: 231

### 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...
1 month ago
Forum: Solvers
Topic: Getting wrong answer for an MINLP
Replies: 3
Views: 231

### 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...
1 month ago
Forum: Syntax
Topic: Require a linear function
Replies: 2
Views: 184

### 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...
1 month ago
Forum: Modeling
Topic: save variables as parameters
Replies: 2
Views: 238

### Re: save variables as parameters

Hi,

1 month ago
Forum: Modeling
Topic: save variables as parameters
Replies: 2
Views: 238

### 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?
2 months ago
Forum: Syntax
Topic: Problem with decision variable and cost function
Replies: 4
Views: 310

### Re: Problem with decision variable and cost function

Yes. You are correct.

I tried with it. And indeed it is like using \$ over variables.

Thanks for your advice. I have to use the condition , which you have provided.

Thanks alot again.
2 months ago
Forum: Syntax
Topic: Problem with decision variable and cost function
Replies: 4
Views: 310

### Re: Problem with decision variable and cost function

Hi Atharv, Thanks for your answer. Your answer is absolutely what I needed. Yes, I wrote it by mistake (repeared Y), thanks that you have corrected it. Meanwhile, before your answer was being posted , I thought the following : y(t) =e= [{[sum(X,Y(X,t)) = 0 ] AND 0} AND 0 ] Can you please see if it m...
2 months ago
Forum: Syntax
Topic: Problem with decision variable and cost function
Replies: 4
Views: 310

### Problem with decision variable and cost function

Dear all, I have a binary decision variable, y(X,t) as follows: sets t /t1*t5/ X /X1*X2/ ; binary variable y(X,t); As it can be seen, the variable y(X,t) can take 1 or 0 value for all X set. In other words: y(X,t) can take as follows (an example): X1 X2 t1 0 0 t2 1 0 t3 0 1 t4 1 1 t5 1 1 I want to ...