Hello all friends

Hello all friends
I want to do the following equations in the GAMS
Please help me.

  1. Yt=max(0,(kt-zt))

  2. Xt={max(((zt/kt)-1),Xmin)}*zt

Best regards,
Mehrdad


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Dear Mehrdad

Max and Min function turn the NLP problem into DNLP. Instead, you may like to consider this approach :

http://www.gams.com/docs/FAQ/MODELING.htm#n0004583

I hope it will help.
Regards

محمد صادق تولّلی
National University of Singapore

On Thu, Jul 28, 2011 at 11:24 PM, mehrdad bagheri wrote:


Hello all friends
I want to do the following equations in the GAMS
Please help me.

  1. Yt=max(0,(kt-zt))

  2. Xt={max(((zt/kt)-1),Xmin)}*zt

Best regards,
Mehrdad


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi
if your eqution is the form
Y(t)=…
you have to use the Smax and DNLP insted of max and NLP, respectively.
if not, you can do this by only turning the NLP problem to DNLP
problem
Alireza.b.1201@gmail.com

On Jul 28, 7:24 pm, mehrdad bagheri
wrote:

Hello all friends
I want to do the following equations in the GAMS
Please help me.

  1. Yt=max(0,(kt-zt))

  2. Xt={max(((zt/kt)-1),Xmin)}*zt

Best regards,
Mehrdad

\

HI!


Please, consider next


Y = (SQRT(SQR(X)) + X)/2
if X>0 Y=X
if X:

Hi
if your eqution is the form
Y(t)=…
you have to use the Smax and DNLP insted of max and NLP, respectively.
if not, you can do this by only turning the NLP problem to DNLP
problem
Alireza.b.1201@gmail.com

On Jul 28, 7:24 pm, mehrdad bagheri
wrote:

Hello all friends
I want to do the following equations in the GAMS
Please help me.

  1. Yt=max(0,(kt-zt))

  2. Xt={max(((zt/kt)-1),Xmin)}*zt

Best regards,
Mehrdad

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

– With kindly regards! Andre Savitsky

Andre,

There is a non-differentiability at x = 0 in your expression. I’ve been using the following expression to approximate the function f(x) = max(0,x):

f’(x,tau) = ( sqrt( sqr(x) + sqr(tau) ) + x ) / 2,

which is differentiable in all points. However, you have to care about the value for the parameter tau. An example of this approach can be find in the following work

XAVIER, A. E. . THE HYPERBOLIC SMOOTHING CLUSTERING METHOD. Pattern Recognition, v. 43, p. 731-737, 2010.

best regards,
Luiz Carlos.

On Sat, Jul 30, 2011 at 5:56 PM, Savitsky Andre wrote:

HI!


Please, consider next


Y = (SQRT(SQR(X)) + X)/2
if X>0 Y=X
if X:

Hi
if your eqution is the form
Y(t)=…
you have to use the Smax and DNLP insted of max and NLP, respectively.
if not, you can do this by only turning the NLP problem to DNLP
problem
Alireza.b.1201@gmail.com

On Jul 28, 7:24 pm, mehrdad bagheri
wrote:

Hello all friends
I want to do the following equations in the GAMS
Please help me.

  1. Yt=max(0,(kt-zt))

  2. Xt={max(((zt/kt)-1),Xmin)}*zt

Best regards,
Mehrdad

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


With kindly regards!
Andre Savitsky


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

you must set a very small lower boun for x to overcome this
problem(for examole X.lo=1E-5)
best

On 7/31/11, Luiz Carlos Sousa wrote:

Andre,

There is a non-differentiability at x = 0 in your expression. I’ve been
using the following expression to approximate the function f(x) = max(0,x):

f’(x,tau) = ( sqrt( sqr(x) + sqr(tau) ) + x ) / 2,

which is differentiable in all points. However, you have to care about the
value for the parameter tau. An example of this approach can be find in the
following work

XAVIER, A. E. . THE HYPERBOLIC SMOOTHING CLUSTERING METHOD. Pattern
Recognition, v. 43, p. 731-737, 2010.

best regards,
Luiz Carlos.

On Sat, Jul 30, 2011 at 5:56 PM, Savitsky Andre wrote:

HI!

Please, consider next

Y = (SQRT(SQR(X)) + X)/2
if X>0 Y=X
if X> >> This is the same like
Y=max(0,X)

Andre

30.07.2011, 12:22, “Alireza Bahari” :

Hi
if your eqution is the form
Y(t)=…
you have to use the Smax and DNLP insted of max and NLP, respectively.
if not, you can do this by only turning the NLP problem to DNLP
problem
Alireza.b.1201@gmail.com

On Jul 28, 7:24 pm, mehrdad bagheri
wrote:

Hello all friends
I want to do the following equations in the GAMS
Please help me.

  1. Yt=max(0,(kt-zt))

  2. Xt={max(((zt/kt)-1),Xmin)}*zt

Best regards,
Mehrdad

You received this message because you are subscribed to the Google
Groups
“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


With kindly regards!
Andre Savitsky


“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


\