mihal_t

4 Reputation

2 Badges

15 years, 182 days

MaplePrimes Activity


These are questions asked by mihal_t

Hi,

I need to maximize this function:

f := proc(x::Array)
>   if (x[1]^2+x[2]+x[3]+x[4] < 15 and x[1]^2+x[2]+x[3]+x[4] > 10) then
>      2*x[1]^2+3*x[2]+4*x[3]+2*x[4];
>   else
>      1/x[1]+x[2]^2+x[3]+x[4]^2;
>   end if;
> end proc:  

here is the constraint:

> b1:=add(x[i],i=1..4) <= 20;

and initial point:

> initPoint:=[seq(x[i]=1,i=1..4)]:

command for optimization:

Page 1 of 1