## Search found 19 matches

- 1 week ago
- Forum: Modeling
- Topic: Modeling the absolute value
- Replies:
**21** - Views:
**583**

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

- 2 weeks ago
- Forum: Modeling
- Topic: Modeling the absolute value
- Replies:
**21** - Views:
**583**

### 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 month ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**20** - Views:
**392**

### 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 month ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**20** - Views:
**392**

### 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 ha...

- 1 month ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**20** - Views:
**392**

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

- 1 month ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**20** - Views:
**392**

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

Hi Manassaldi, Thank you for your answers I still have questions: 1) In your first formulation I think you have to insert equations for all timeslots and the number of time in which x is has to be know in advance. Is that correct? eqfirstx(t).. 1 - x(t) + sum(tp$(ord(tp) lt ord(t)),x(tp)) + xfirst(t...

- 1 month ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**20** - Views:
**392**

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

Thanks Manassaldi for your answer, but I do nor understand your code: set t /1*1440/ ; alias(t,tp,tpp); binary variable x(t) y(t) ; variable z ; equation eq1,eq2,eq3,eq4,eq5,eq6,eqobj ; eq1(t,tp).. sum(tpp$(ord(tpp) le ord(t)),x(tpp)) =l= ord(tp) + (1-xpos(tp,t))*1440; eq2(t,tp).. sum(tpp$(ord(tpp) ...

- 1 month ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**20** - Views:
**392**

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

Thanks Manassaldi for your answer (and your general great effort :) ), I have to admit that I do not really understand the things you said. What is meant by: I think you must to propose the maximum time in which x(t) = 1 and y(t) =1 before, but you have to modifies some restriction. As I said in the...

- 1 month ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**20** - Views:
**392**

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

Thanks once again Manassaldi for your good answer, Now I understood how your concept works. You said that I'll have to do this for every occurence of x(t)=1 and y(t)=1 I have to comments/questions regarding this: 1) The number of timeslots, inwhich x(t) = 1and y(t) =1 is not known in advance and has...

- 1 month ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**20** - Views:
**392**

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

Hi Manassaldi, thank you for your answer. Unfortunately I'm having a hard time understading what you posted. Even the first equation is not understandable for me (I have not tried to understand the other equations yet, because I am struggeling even with the first one): eqfirstx(t).. 1 - x(t) + sum(t...