Items tagged with globaloptimization

Hi,

Ive been trying to use the global optimization toolbox to optimize a model I extract from the maplesim environment.
It works fine with the regular Optimization toolbox. but when I run the optimization on the Global toolbox I get this error:

Warning, Error at t=0.0000000000000000e+000: index-1 and derivative evaluation failure

to explain a little,
I use the getCompiledProc command to turn the maplesim model into a module to be used in maple.

pjf

The origin of this problem is that I want to bound a norm below. After som assigning of variables etc it boils down to minimizing;

S(x,y,z,w,A,B,E,F,G,H):=A*x^2+A*y^2+B*x^2+B*y^2+(-E*G+F*H+1)*x*z/(1-2*E*G+2*F*H+(F*H)^2+(E*G)^2+(E*H)^2+(F*G)^2-4*E*F*G*H)+(-E*G+F*H+1)*y*w/(1-2*E*G+2*F*H+(F*H)^2+(E*G)^2+(E*H)^2+(F*G)^2-4*E*F*G*H)-(-E*H+F*G)*y*z/(1-2*E*G+2*F*H+(F*H)^2+(E*G)^2+(E*H)^2+(F*G)^2-4*E*F*G*H)-(-E*H+F*G)*x*z/(1-2*E*G+2*F*H+(F*H)^2+(E*G)^2+(E*H)^2+(F*G)^2-4*E*F*G*H)-6*E*x+6*F*y-6*G*z+6*H*w

I first treat the x,y,z,w as coefficents and optimize over them( these are real and imaginary parts of complex parameters of my norm which on paper is a sum).
I use standard way to get the minia w.r.t these 4 variables via "solve". Then I put the solution into the a new function N(A,B,E,F,G,H) and try to optimize that with NLP and get one solution, but this is only local and it has the following message attached to it;

"Warning, no iterations performed as initial point satisfies first-order conditions"

I want a global minima for my polynomial N in 6 variables and I have some constarints on them aswell. Furthermore I put all variables to be real.

What command or package can I use to get this?

Hello everybody,

I am new on this forum, and please to join your community.
As part of a project related to Origami, I try to follow the paper entitled "Mathematical Approach to Model Foldable Conical Structures Using Conformal Mapping", in order to flat-fold a conical structure.

As described in the paper a non-linear system need to be solved in order to get a corrected angle beta... The paper advize the use of "fsolve" function in Matlab, but I did not manage to do it... So I tried with Maple, but I get an error using NLPSolve, and I do not understand why...

Here is the edited, withdrawn and finally back file : Angle.mw

Do not hesitate to ask for any other explanations.

Any help is going to be appreciated.

Cheers,

I would like to pay attention to a series of applications by Samir Khan
http://www.maplesoft.com/applications/view.aspx?SID=153600
http://www.maplesoft.com/applications/view.aspx?SID=153599
http://www.maplesoft.com/applications/view.aspx?SID=153596
http://www.maplesoft.com/applications/view.aspx?SID=153598
My congratulations to the author on his work well done. New capacities of Global Optimization Toolbox are spectacular. For example, in the first application  an optimization
problem in 101 variables under 5050 nonlinear  constraints
(other than 202 bounds) is solved.
I think it requires a very powerful comp and much time.
I tried that  problem for n=20 with the good old DirectSearch
on my comp (4 GB RAM, Pentium Dual-Core CPU E5700@3GHz) by

soln2 := DirectSearch:-GlobalSearch(rc, {cons1, cons2, rc >= 0,
seq(`and`(vars[i] >= -70, vars[i] <= 70), i = 1 .. 2*n), rc <= 70},
variables = vars, method = quadratic, number = 140, solutions = 1,
evaluationlimit = 20000)

and obtained not so bad rc=69.9609360106765 (whereas www.packomania.com gives rc=58.4005674790451137175957) in about one hour.

Packing_by_DS.mw
For n=50 the memory of my comp cannot allocate calculations or the obtained result by the Search command is far away from the one in packomania.

 

Data.xlsx

XY.mw

XYZ.mw

 

Hello,

I'm using the Global Optimization Toolbox to solve some examples and fit equations to a given data, finding "unknown" parameters. I generated the data on Excel, and I already know the values of these parameters.

The XY case is (there is no problem here, I just put as a example I follow):

> with(GlobalOptimization);
> with(plots);

> X := ExcelTools:-Import("F:\\Data.xlsx", "Plan1", "I5:I25");
> Y := ExcelTools:-Import("F:\\Data.xlsx", "Plan1", "J5:J25");

> XY := zip( (X, Y) -> [X, Y] , X, Y);
> fig1 := plot(XY, style = point, view = [.9 .. 3.1, 6 .. 40]);


> Model := A+B*x+C*x^2+D*cos(x)+E*exp(x):
> VarInterv := [A = 0 .. 10, B = 0 .. 10, C = -10 .. 10, D = 0 .. 10, E = 0 .. 10];

> ModelSubs := proc (x, val)

    subs({x = val}, Model)

    end proc;


> SqEr := expand(add((ModelSubs(x, X(i))-Y(i))^2, i = 1 .. 21));
> CoefList := GlobalSolve(SqEr, op(VarInterv), timelimit = 5000);

> Model := subs(CoefList[2], Model):

 

I could find the right values of A, B, C, D and E. 

 

My problem is in the XYZ case, where I don't know how to "write" the right instruction. My last attempt was:

> with(GlobalOptimization);
> with(plots);

> X := ExcelTools:-Import("F:\\Data.xlsx", "Plan1", "Q5:Q25"); X2 := convert(X, list);
> Y := ExcelTools:-Import("F:\\Data.xlsx", "Plan1", "R5:R25"); Y2 := convert(Y, list);
> Z := ExcelTools:-Import("F:\\Data.xlsx", "Plan1", "S5:S25"); Z2 := convert(Z, list);
> NElem := numelems(X);

> pointplot3d(X2, Y2, Z2, axes = normal, labels = ["X", "Y", "Z"], symbol = box, color = red);

 

> Model := A*x+B*y+C*sin(x*y)+D*exp(x/y);

> VarInterv := [A = 0 .. 10, B = 0 .. 10, C = 0 .. 10, D = 0 .. 10];

> ModelSubs:=proc({x,y},val)

subs({(x,y)=val},Model)

end proc:
Error, missing default value for option(s)

> SqEr := expand(add((ModelSubs(x, y, X(i), Y(i))-Z(i))^2, i = 1 .. NElem));
> CoefList := GlobalSolve(SqEr, op(Range), timelimit = 5000);
Error, (in GlobalOptimization:-GlobalSolve) finite bounds must be provided for all variables

 

My actual problem involves six equations, six parameters and four or five independent variables on each equation, but I alread developed a way to solve two or more equations simultaneously.

Thanks

Hello

I have an equation of power (P)with 3 variables. The variables are R (resistance), ω (frequency) and K (spring stifness);

I would like to find out the optimum value of R and K to maximize the comulutive value of power when the ω is varying from ω1 to ω2. To do so, I should do the following steps:

 Step 1: Calculate the integral of Power when ω is changing from ω1 to ω2 : U(R,K...

Hi,

   The error showed up whenever I tried to do the Maximum Likelihood Estimation with Global Optimization Toolbox.My objective (likelihood ) function f is defined as follows(A1 to A5 are intermediate variables; parameters  are x[1] to x[12]):

   f := 0;

   for j from 1 by 1 to 21 do

       A1 := exp(x[1]+x[2]*c[j]);

       A2 := exp(x[3]+x[4]*c[j]);

How to play the Maple worksheet Alkylation Process Model Using DirectSearch

(http://www.maplesoft.com/applications/view.aspx?SID=1675)

There is some equivalence between GlobalOptimization commands: GetLastSolution and GlovalSolve and DirectSearch commands?

Gracias

Page 1 of 1