Hi Guys
I have an objective function that must be defined by parts
Ex: f (x) = x +1 / x if x> 0;
f (x) = 0 if x = 0;
f (x) = x +1 / x if x <0;
And I want to minimize this function.
How can I do this in GAMS?
Thank you!
–
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\
I have an objective function that must be defined by parts
Ex: f (x) = x +1 / x if x> 0;
f (x) = 0 if x = 0;
f (x) = x +1 / x if x > And I want to minimize this function.
How can I do this in GAMS?
when you can use a binary variable B (B>1 when x>eps, B=0 when x0 f(x) = x+1/x >= sqrt(2)
for x<0 the lower limit of f(x) is -Inf
and when your interval includes 0, x should not appear as a divisor.
HTH,
Yan
\
Hi there,
if i were you , I would use F.fx(‘0’) =0 ;
and just write f(x) * x =e= x+1 ; in the equation.
you may try it to see whether your problem solved.
Hope it helps !
Regards
On Thursday, March 14, 2013 3:47:31 AM UTC+8, Ana Paula Mazzini wrote:
Hi Guys
I have an objective function that must be defined by parts
Ex: f (x) = x +1 / x if x> 0;
f (x) = 0 if x = 0;
f (x) = x +1 / x if x <0;
And I want to minimize this function.
How can I do this in GAMS?
Thank you!
–
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\