Thanks for this!
My actual problem is slightly more complicated though, and I am not sure how to resolve it using your trick above. I have two variables to be optimised, say x and y. The variable x is constrained to [0,1], while both the left and right limits of y depend on x; y is defined on [x, min(x/f,1)] for some fraction f. So...
y=a*x for a>1 and
y=b*min(x/f,1) for b<1
Hence a=b*min(x/f,1)/x > 1 while b < 1
I thought about optimising b :< 1 and setting a := Max(b*Min(x/f,1)/x, 1) but I'm sure this isn't correct since I am not actually optimising b such that a is appropriately constrained too (the Max command is just a fix for when the optimised value of b fails to satisfy the constraint on a).
Code: global x = 0.5; x :> 0; x :< 1;
global b = 0.5; b:<1;
global y := Max((b/x)*Min(x/f__,1),1)*x;
Any suggestions?
Thanks in advance!
Miguel