## Search found 64 matches

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

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

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

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

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

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

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

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

Hi guys, the problem I am facing is going to be difficult to explain and I strongly question whether something like this is solvable with GAMS. But I'll try: Lets say we have two binary decision variables x(t) and y(t) and lets assume they have the following values: t: 0 1 2 3 4 x: 0 0 1 0 1 y: 1 0 ...

- 1 year ago
- Forum: Modeling
- Topic: Ensuring realations between decision variables
- Replies:
**6** - Views:
**1214**

### Re: Ensuring realations between decision variables

Hi Manassaldi,

it seems to work How did you derive those equations? Also with the basic steps?

Thanks a lot for your great help!

it seems to work How did you derive those equations? Also with the basic steps?

Thanks a lot for your great help!

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

### Re: Modeling the absolute value

Thanks again for the answers. Where can I read more about those basic steps? I typed it into google but somehow I could not find useful information about them.

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

### Re: Modeling the absolute value

Thanks Manassaldi for your answers and comments.

Would you mind telling me a little bit more about the "basic step". Is that a generall principle for modelling absolut values or what exactly does this method aim for?

Would you mind telling me a little bit more about the "basic step". Is that a generall principle for modelling absolut values or what exactly does this method aim for?

- 1 year ago
- Forum: Modeling
- Topic: Ensuring realations between decision variables
- Replies:
**6** - Views:
**1214**

### Ensuring realations between decision variables

Hi guys, I have a binary variable x(t) for every minute of a day (1440). This binary variable indicates if a heating device is on or off. Now I want to ensure that the device does not switch from on to off quite frequently. This is why I want to insert a restriction which ensures that if the heating...