Search found 66 matches

by PeterBe
6 years ago
Forum: Modeling
Topic: Maximizing the difference in the order of binary variables
Replies: 28
Views: 18749

Re: Maximizing the difference in the order of binary variables

Thanks a lot Manassaldi for your effort once again :-) My model is on the first page of the thread. Here you can see it again: 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(...
by PeterBe
6 years ago
Forum: Solvers
Topic: Computational time of model extremely increased
Replies: 9
Views: 9163

Re: Computational time of model extremely increased

Does nobody have a clue?

Do you think the I should let the model run for more than 5000 Seconds? The improvement for the last 3000 senconds were 0 % with regard to the gap (sett uploaded logfile). This is why I stronlgy doubt that a higher runtime will significantly improve the results.
by PeterBe
6 years ago
Forum: Modeling
Topic: Maximizing the difference in the order of binary variables
Replies: 28
Views: 18749

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 :-(
by PeterBe
6 years ago
Forum: Solvers
Topic: Computational time of model extremely increased
Replies: 9
Views: 9163

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...
by PeterBe
6 years ago
Forum: Modeling
Topic: Maximizing the difference in the order of binary variables
Replies: 28
Views: 18749

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 ...
by PeterBe
6 years ago
Forum: Modeling
Topic: Maximizing the difference in the order of binary variables
Replies: 28
Views: 18749

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...
by PeterBe
6 years ago
Forum: Modeling
Topic: Maximizing the difference in the order of binary variables
Replies: 28
Views: 18749

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...
by PeterBe
6 years ago
Forum: Modeling
Topic: Modeling the absolute value
Replies: 23
Views: 21771

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...
by PeterBe
6 years ago
Forum: Modeling
Topic: Modeling the absolute value
Replies: 23
Views: 21771

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) ...
by PeterBe
6 years ago
Forum: Modeling
Topic: Maximizing the difference in the order of binary variables
Replies: 28
Views: 18749

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