Items tagged with maximize maximize Tagged Items Feed

Hi all

 

I am trying to maximize a function f(x,y,z,w) in terms of x. (Only x is treated as a variable, and the others are treated as parameters).

However, all I know is that y,z,w they are parameters and they are non-negative. I have already tried with the "optmization help page" from maplesoft's website, and it looks like it will search the range of x,y,z,w, and it will return numerical values at which this function is maximized. 

 

 

However, what I want is instead a close-form solution of x=g(y,z,w) that will maximize the function.   In other words, I would like to keep the parameter in symbolic forms. 

 

Can Maple do that?

Hi,

On page 32 (PDF)

 

Two different results were obtained using the Global optimization.

Log likelihood does not differ much. BUT the estimates vary a lot, such as mu[p].

tmp.mw

tmp.pdf

 

When I tried to use one of the answer from a particular run, I get the HFLOATING error, see picture.

So how reliable is this? Could there be a better way to optimize this ?

 

Thanks!

 

As an additional note, if I have Matlab R2014a, could I use Matlab to optimize the target function? DO I need to purchase a seperate addon?

 

what is the wrong with Pi set ::: in this function ::: Warning, no iterations performed as initial point satisfies first-order conditions

Optimization[Minimize](x^2 + y^2 + 25*(sin(x)^2+sin(y)^2), x=-2*Pi .. 2*Pi , y= -2*Pi .. 2*Pi);

Warning, no iterations performed as initial point satisfies first-order conditions
[0., [x = HFloat(0.0), y = HFloat(0.0)]]


Optimization[Maximize](x^2 + y^2 + 25*(sin(x)^2+sin(y)^2), x=-2*Pi .. 2*Pi , y= -2*Pi .. 2*Pi);

Warning, no iterations performed as initial point satisfies first-order conditions
[-0., [x = HFloat(0.0), y = HFloat(0.0)]]

--------------------------------

I got my good result when I apply it with this function :


f:= (x,y)->cos(x)*sin(y) -(x/(y^2+1));


Optimization[Maximize](f(x,y), x = -1 .. 2, y = -1 .. 1);


[0.994945017202501170,[x = HFloat(-0.6362676080636113), y = HFloat(1.0)]]

Optimization[Minimize](f(x,y), x = -1 .. 2, y = -1 .. 1);


[-2.02180678335978703,[x = HFloat(2.0), y = HFloat(0.10578346945175972)]]

I need to maximize two multivariate objective functions (f(x1,y1,z1,t1) and g(x2,y2,z2,t2)) with inequality and nonnegativity constraints (x1, x2>0 and y1, z1, t1, y2, z2, t2 >=0). I am looking for parametric not numerical solutions.


What is the best way to find the solution to such a problem using maple?

When using Maximize, is it possible to now what parameter settings that resulted in complex numbers?

KR Fredrik

 

Maximize(Eq1_new, {R_K*rho*`&sigma;_K`+R_S*`&sigma;_S` >= .38780613588076011954, r_K*rho*`&sigma;_K`+r_S*`&sigma;_S` >= .21290471165685214846, R_K*rho*`&sigma;_K`+R_S*`&sigma;_S` <= .38780613588076011954, r_K*rho*`&sigma;_K`+r_S*`&sigma;_S` <= .21290471165685214846});


Error, (in Optimization:-NLPSolve) complex value encountered

Hello everyone,

Jus started using Maple and I was wondering why maple doesn't execute the following function:

Thx,

 

Frank

Hi every one,

Q1:

I tried to get the max $ min of a following function:

 

l:=1:alpha:=1:b:=100:k:=20:

eq1 := (alpha+(l+alpha)*u+alpha*k*u^2)*a =
u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2))):

I did this code but it seems it didnt work for this equation

maximize(eq, u=1..12, location);

minimize(eq, u=1..12, location);

Also, I think about solving the cubic i feel i'm so close to the solve but couldn't

factor((rhs-lhs)(eq1));

eq:=collect(%,u);

Q:=(a,u)->eq;sol:=evalf(solve(Q(a,u),u)): S:=array([],1..3): S[1]:=sol[1]:S[2]:=sol[2]:S[3]:=sol[3]:

Q2:

the same thing wanted to get the maximum and the minimum of the function v

here the code

restart;
eq1:=(alpha+(l+alpha)*u+alpha*k*u^2)*a=
u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2)));
eq2:=v=alpha*b*(1+u+k*u^2)/(alpha+(l+alpha)*u+alpha*k*u^2);
factor((rhs-lhs)(eq1));
eq1:=collect(%,u);
params:={l=10,alpha=0.5,b=100,k=20};
U:=[solve(eval(eq1,params),u)]; #3 solutions for u
#plots:-complexplot(U,a=0..20,style=point); #plot in the complex u-plane
vua:=eval(solve(eq2,v),params): #v expressed in terms of u and a
V:=eval~(vua,u=~U): #the 3 solutions for v in terms of a

## PLOT the function V
plot(V,a=0..75,v=0..100,color=black,labels=[a,v],axes=boxed,numpoints=90,linestyle=1,font=[1,1,18],thickness=2,tickmarks=[4,4],view=[0..65,25..100]);

I do appricaited any advises

Hi;

Trying to find the maximum values of the implicit function.. I tree the following commands.

 

l:=1:alpha:=1:b:=100:k:=20:

(alpha+(l+alpha)*u+alpha*k*u^2)*a=u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2)));

with(plots):

implicitplot((alpha+(l+alpha)*u+alpha*k*u^2)*a=u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2))),a=0..100,u=0..20,numpoints=9000000,color=black,axes=boxed,font=[1,1,18],thickness=2,tickmarks=[3,3],view=[0..12,0..12],labels=[a,u]);

maximize((alpha+(l+alpha)*u+alpha*k*u^2)*a=u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2))), N=0.5..1, location);

Any help I'll appriciated 

 

Hello.
I'm new to Maple, so my question could appear idiotic. But, anyway. :-)

I want to understand the restrictions of code generation in Maple.
What functions could I convert to code?
Only listed in "Translation of Functions" block in this link?
http://www.maplesoft.com/support/help/MapleSim/view.aspx?path=CodeGeneration/General/TranslationDetails

For example, I've found this post - http://www.mapleprimes.com/posts/36616-Dynamic-Programming-In-Maple 

Could functions "Maximize" and "diff" be converted to Java, VB or something or not? If yes, how?

Thanks anyway. :-)

hi maplefriends, i´m trying to solve a piecewise funtion, and gold is find the maximum and  location, for that i use de package Maximize.unfortunately the result i have is the local maximum, can anyone show me, how can i do that? >  >  Download maximize_abs.mwbest regards

A contest is being held.  The three prizes are a $2000 vacation, 1 paid week off work and a $500 camera pack.

In order to enter 1 ticket in the draw you have to contribute $1 per paycheque for the year.  So since there's 26 pay periods in a year each ticket will cost you $26. You can contribute as much as you want.

Let's say there's about 1600 employees in the company. 

How many tickets should you buy to maximize your chances?

Hello,
I have a question concerning the change of the results of Maximization procedure and it will be much appreciated if you could help me.
The case is: I need to find the maximum of a function (call if f(t)) given a range of values of another function (call it g(t)).Both sets of parameters are the same. I use "Maximize" command, but I need to plot the the results on (f,g) plane afterwards. How could I change the Maximization output in order to have only objective function...

Dear members,

I am trying to solve a maximalization problem, but in stead of solving my problem Maple only displays the equation that I am trying to solve.

Example:

>  Sigma_max:= maximize(-N/(b*h)+(-EI*(diff(u(x),x,x)))*0.5*h/I, x=0..l = sigma_t;

sigma_max:=maximize(-0.400000cos(0.25pi)N+564e*N*x .....etc...., x = 0..250)=1.43 106

Hi, I need to maximize a quadratice function and I need to check if my variables are satisfying the Kuhn-Tucker conditions or not.

I defined the objective and I want to use the command

QPSolve(`&varphi;`, assume = nonnegative, maximize);

and the Kuhn-Tucker conditions that I want to apply are

(&PartialD;)/(&PartialD; x[i]) `&varphi;`=0 and x[i]>=0; or (&PartialD;)/(&PartialD; x[i]) `&varphi;`<=0 and x[i]=0

 

I have equations of the form x=max( f(x,u,E) ), where x is the unknown "variable" to solve for, where u is the "control" variable that can be selected to maximize f, and where E is a parameter. These are all real, positive scalars on [0,1].

One of my objectives is to plot x against E, for those values of u that solve the maximization. In my problem, the optimal values of u are expected to be unique for a given value of E.

My approach was to define...

1 2 Page 1 of 2