## Search found 61 matches

- 11 months ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**2763**

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

- 11 months ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**2763**

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

- 11 months ago
- Forum: Modeling
- Topic: Maximizing the difference in the order of binary variables
- Replies:
**28** - Views:
**2763**

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

- 11 months ago
- Forum: Modeling
- Topic: Ensuring realations between decision variables
- Replies:
**6** - Views:
**943**

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

- 11 months ago
- Forum: Modeling
- Topic: Modeling the absolute value
- Replies:
**21** - Views:
**3517**

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

- 11 months ago
- Forum: Modeling
- Topic: Modeling the absolute value
- Replies:
**21** - Views:
**3517**

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

- 11 months ago
- Forum: Modeling
- Topic: Ensuring realations between decision variables
- Replies:
**6** - Views:
**943**

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

- 11 months ago
- Forum: Modeling
- Topic: Modeling the absolute value
- Replies:
**21** - Views:
**3517**

### Re: Modeling the absolute value

Hi, I inserted following equations: eq_z_firstCondition(t).. z(t) =l= 2 - x(t) - y(t); eq_z_secondCondition(t).. z(t) =l= x (t) + y(t); ... u =e= sum((t), z(t)); ... Solve model using mip maximizing u; z(t) is an auxilliary variable I think that this might be same as in your example, doesn't it?

- 11 months ago
- Forum: Modeling
- Topic: Modeling the absolute value
- Replies:
**21** - Views:
**3517**

### Re: Modeling the absolute value

Hi, Sorry that I have not written anything since a fairly long time. But I do not really understand the approach form Manassaldi and my objective has slightly changed. So I want to maximize the difference: max: SUM(t=0 to T) {abs(x_t - y_t)} where x_t is a binary decision variable and y_t is also a ...

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

### Re: Modeling the absolute value

Sorry it has been a while since I posted this question. Nonetheless I unforunately have not solved this problem. Basically my problem has slightly changend. Now I want to solve the following prolbem: max: SUM(t=0 to T) {abs(x_t - y_t)} where x_t is a binary decision variable and y_t is also a binary...