sorry for this post but I am trying for years to solve this problem and I am
getting really frustrated. I am a student and I need to solve some AMPL
problems. I already solved all of my AMPL problems except this. First of
all: I don't want you to do my homework, I just need some good hints and
tipps.
The problem it self doesn't sound very difficult, but I do not really know
how to do it with AMPL.
Here is my current model:
param U1=0.12;
param U2=0.14;
var x1 >= 0 ;
var x2 = 1 - x1;
var y1=(x1+x2)/2;
var y2=(x1-x2)/2;
subject to constraint1: x1*U1 + x2*U2 >= (1/7)*U1 + (4/7)*U2;
subject to x2_upperZero: x2>=0;
minimize function:(x1*x1)/2 + (y1*y1-y2*y2)/2+(x2*x2) ;
#minimize function:(x1*x1) + 1.5*x1+1;
The Minos solver can solve this objective function but my task is to
approximate x1 and x2 by piecewise linear approximation. Even with the AMPL
Book I don't have a clue how to do this. There are some examples in the AMPL
book, but I do not know how to use them in my case.
What I need a simple "how to do piecewise lienar approximation in ampl with
any non-linear function". This would be a very great help.
I would be very grateful for any help!
Greetings
Robert
--
View this message in context: http://old.nabble.com/Help-with-piecewise-linear-approximation-tp28063054p28063054.html
Sent from the AMPL mailing list archive at Nabble.com.
<< {k in 0.1..0.9 by 0.1} k;
{k in 0.0..0.9 by 0.1} ((k+0.1)*(k+0.1)/2-k*k/2)/0.1 >> x1
Here the breakpoints of the function are evenly spaced at intervals of 0.1
between zero and one, but I just chose them that way for the sake of
example. And of course other variables can be treated in the same way, as
long as each nonlinear function involves just one variable.
Bob Fourer
4...@ampl.com