## Search found 64 matches

- 1 year ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**3474**

### Re: Maximizing the difference in the order of binary variables

So you canot thinkg about a way how to combine the inital BigM formulation with the "absoulte value" in the objective function? It ried to combine the two formulations but did not really know how to do that

- 1 year ago
- Forum: Solvers
- Topic: Computational time of model extremely increased
- Replies:
**9** - Views:
**2005**

### Computational time of model extremely increased

Hi guys, I am using GAMS with CPLEX as the solver. I have a really strange problem. I have a MIP model with many binary vairables which was solved within 5 minutes. All of a sudden - without having changed anything - the same model requires quite much time to be solved. I let the solver run for 5000...

- 1 year ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**3474**

### Re: Maximizing the difference in the order of binary variables

Thanks Manassaldi for your answer and your effort :-) Hi, x(tp) is the sum of the product between a binary variable and its position, so I suppose that is an integer variable (not binary). Anyway, I think it's better to define it as a continuous variable. I think I am getting confused. Let's have a ...

- 1 year ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**3474**

### Re: Maximizing the difference in the order of binary variables

Thanks for your answer Manassaldi eq01(tp).. x(tp) =e= sum(t,xpos(tp,t)*ord(tp)) eq02(tp).. c(tp) =e= sum(t,ypos(tp,t)*ord(tp))}); eq1(tp).. absvalue(tp) =l= x(tp) - c(tp) + (1-p(tp))*M; eq2(tp).. absvalue(tp) =g= x(tp) - c(tp) - (1-p(tp))*M; eq3(tp).. x(tp) - c(tp) =g= -(1-p(tp))*M eq4(tp).. absval...

- 1 year ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**3474**

### Re: Maximizing the difference in the order of binary variables

Hi I'm back again :-) and I have a question regarding the BigM formulation: The objective function looks like this : sum(tp, sum (t,xpos(tp,t)*ord(tp)) - sum(t,ypos(tp,t)*ord(tp))); How can I model the absolute value of the inner sum? Meaning: sum(tp, ABS{sum (t,xpos(tp,t)*ord(tp)) - sum(t,ypos(tp,t...

- 1 year ago
- Forum: Modeling
- Topic: Modeling the absolute value
- Replies:
**21** - Views:
**4455**

### Re: Modeling the absolute value

Hi guys, does nobody have a clue? I just want incoorporate the absolute value of: abs( (sum(t, x(t))) - (sum(t, y(t))) (with x(t) and y(t) being binary variables) Manassaldi suggest the following for binary variables: eq1(t).. 1 - x(t) + c(t) + absvalue(t) =g= 1; eq2(t).. 1 - x(t) + 1-c(t) + 1-absva...

- 1 year ago
- Forum: Modeling
- Topic: Modeling the absolute value
- Replies:
**21** - Views:
**4455**

### Re: Modeling the absolute value

Hi guys, I have a further question: I still have not fully understood how to modell the absolute value of a difference in GAMS. I have used the following equations for binary variables for modelling: abs(x(t) - y(t)): eq_z_firstCondition(t).. z(t) =l= 2 - x(t) - y(t); eq_z_secondCondition(t).. z(t) ...

- 1 year ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**3474**

### Re: Maximizing the difference in the order of binary variables

Yes, this BigM formulation generates a very large model... Two question regarding this: 1) Does the first approximation generate a smaller model which does not need to much memory? Or do you know any other way how to reduce the required memory size? 2) Is there a way to roughly estimate how much me...

- 1 year ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**3474**

### Re: Maximizing the difference in the order of binary variables

Hi Manassaldi, i tried to execute the BigM-Relaxation approach of my model. However my computer was out of memory. The workspace was more than 27.000 Mb and then GAMS stopped with the message "Out of memory". I think by memory GAMS is referring to RAM and not to harddrive. Because on my harddrive th...

- 1 year ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**3474**

### Re: Maximizing the difference in the order of binary variables

Hi Manassaldi, So, if this upper bound is equal to 50 you have to insert 50 equation for x and 50 for y. I don't really have an upper bound. The only upper bound I have is the number of timeslots,which is 1440. So I have to insert 1440 *2= 2880 equations when using the first approximation? What abou...