Items tagged with globaloptimization


I am trying to use global optimization to solve a problem, but get an error:

> GlobalOptimization:-GlobalSolve(R, {eq}, h = 50 .. 10000, R = 50 .. 10000, maximize);

Error, `GlobalOptimization` does not evaluate to a module

What is meant by this error?

Hi All,

I have problem how to formulate optimization problem with additional parameters.
For example let objective function is as follow:

    return sin(x) + cos(x) + Delta;
end proc;

In Matlab we can formulate the following optimization problem:

Delta = 10;
options = optimset('Algorithm','interior-point');
x = fmincon(f,0.1,[1;2],[],[],[],[],[],[],options);


function y = ObjF(x,Delta)
    y = sin(x) + cos(x) + Delta;

In above example I can pass additional parameters (Delta) to objective function an then I can start optimization
to find solution. How to define above problem in Maple ? How to pass additional  parameters  befor we starat the optymalization?



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 :

Do not hesitate to ask for any other explanations.

Any help is going to be appreciated.


I would like to pay attention to a series of applications by Samir Khan
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 gives rc=58.4005674790451137175957) in about one hour.
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.





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)


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.



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...

How to play the Maple worksheet Alkylation Process Model Using DirectSearch


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


Page 1 of 1