Minimum function

Hello all,


How can I fix a variable to be the minimum of two other variables in an equation?

ie,

x(i,j)=min(y(i),y(j))


is there anyway that I can do it in an equation?


Thanks


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

I have an answer but not necessarily correct.
If we assume the minimum of y(i) and y(j) is x(i,j) then:

x(i,j) wrote:

Hello all,


How can I fix a variable to be the minimum of two other variables in an equation?

ie,

x(i,j)=min(y(i),y(j))


is there anyway that I can do it in an equation?


Thanks


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Fateme,

I am not sure whether it can be accomplished in a single equation, but I think it can be realized by some inequalities.
It is easier if the x(i,j) is the target:

x(i,j) <= y(i)
x(i,j) <= y(j)

then maximize variable x(i,j).
If x(i,j) is not the target, the formulation would be a little bit complicated:

x(i,j)-y(i)<=M*(1-z(i,j))
y(i)-x(i,j)<=M*(1-z(i,j))
x(i,j)-y(j)<=Mz(i,j)
y(j)-x(i,j)<=M
z(i,j)
y(i)-y(j)<=M*(1-z(i,j))
y(j)-y(i)<=M*z(i,j)

where z(i,j) is binary variable and M is a sufficiently large parameter.

Regards,
Dylan

在 2013年12月6日星期五UTC+8上午1时49分00秒,Fateme Fotuhi写道:

Hello all,


How can I fix a variable to be the minimum of two other variables in an equation?

ie,

x(i,j)=min(y(i),y(j))


is there anyway that I can do it in an equation?


Thanks


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Fateme

Some solvers allow you to use the min-function (Path/Pathnlp for example).

Cheers

Renger




\


Modelworks

Gewerbestrasse 16

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch









From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Fateme Fotuhi
Sent: Thursday, December 5, 2013 6:49 PM
To: gamsworld@googlegroups.com
Subject: Minimum function



Hello all,





How can I fix a variable to be the minimum of two other variables in an equation?



ie,



x(i,j)=min(y(i),y(j))





is there anyway that I can do it in an equation?





Thanks


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.