Contents Previous Next
2 Global Optimization Toolbox
2.1 Introduction to the Global Optimization Toolbox
Overview
The Global Optimization Toolbox, powered by Optimus technology from Noesis Solutions, provides world-class global optimization technology to return the best answer to your optimization model, robustly and efficiently.
Features of this toolbox include:
Several solver modules for nonlinear optimization problems, including branch-and-bound global search, global adaptive random search, multi-start based global random search, and a generalized reduced gradient local search.
The ability to solve models with thousands of variables and constraints, with Maple's arbitrary precision capabilities in their calculations, to greatly reduce numerical instability.
Support for arbitrary objective and constraint functions, including those defined in terms of special functions (for example, Bessel or hypergeometric), derivatives and integrals, piecewise functions, and Maple procedures.
The interactive GlobalOptimization Assistant, an easy-to-use interface for entering your problem and choosing the solving method.
Maple's built-in model visualization capabilities for viewing one- or two-dimensional subspace projections of the objective function, with visualization of the constraints as planes or lines on the objective surface.
Requirements
Before installing the Global Optimization Toolbox, you must install and activate Maple 2024. For details and installation instructions, see the Install.html file on the product disc.
You need a purchase code to activate the Global Optimization Toolbox. This code has been emailed to you. If you have not received your purchase code, contact Maplesoft Customer Service at custservice@maplesoft.com, or the Maplesoft office or reseller in your region (visit http://www.maplesoft.com/contact/).
After installation, enter ?GlobalOptimization in Maple to see an overview of the toolbox.
2.2 Getting Started with the Global Optimization Toolbox
Initialization
To start using the Global Optimization Toolbox, open a new Maple window and load the GlobalOptimization package by using the following command.
withGlobalOptimization;
GetLastSolution,GlobalSolve,Interactive
You can either use the commands to solve your pre-defined global optimization problem, or use the Global Optimization Assistant, shown below. The following examples demonstrate the use of the commands, but the assistant could also be used to solve any of the problems presented.
Help with the Global Optimization Toolbox
For help with the commands in the Global Optimization Toolbox, see the GlobalOptimization help page. You may also find the related commands in the built-in Optimization package helpful for solving optimization problems.
2.3 Working with the Global Optimization Toolbox
In many optimization problems, simple methods are not sufficient to find the best solution. They will only find a local optimum, usually the one closest to the search starting point, which is often given by the user. For example, consider the expression lnx⋅sinx.
plotlnx⋅sinx, x=1..50
You could likely approximate the global minimum in the given domain, and find that minimum easily, by simply looking at the plot. But if you were unable to properly approximate it, or if you approximated incorrectly, you would not find the global minimum by using the usual optimization techniques.
OptimizationMinimizelnx⋅sinx, x=1..50
−3.39618690740209,x=29.8549920107437
According to the Minimize command, the minimum is at approximately x = 30. However, you can see in the plot above that this is not the global minimum.
By using the global optimization equivalent of this command, you can be assured that you have found the global minimum in the specified interval.
withGlobalOptimization:
GlobalSolvelnx⋅sinx, x=1..50
−3.88562416790700960,x=48.6999273727307
To view the solving methods that were used to determine the global minimum, change the infolevel variable and re-execute the command. At infolevel = 3, the command displays the input model size and type, solver operational mode and parameter, and detailed runtime information.
infolevelGlobalOptimization≔3:
GlobalSolve: calling NLP solver
GlobalSolve: calling global optimization solver
GlobalSolve: number of problem variables 1
GlobalSolve: number of nonlinear inequality constraints 0
GlobalSolve: number of nonlinear equality constraints 0
GlobalSolve: method OptimusDEVOL
GlobalSolve: maximum iterations 80
GlobalSolve: population size 50
GlobalSolve: average stopping stepwidth 0.1e-3
GlobalSolve: time limit 100
GlobalSolve: trying evalhf mode
GlobalSolve: performing local refinement
Typically, the infolevel is set to 0, the default.
infolevelGlobalOptimization≔0:
The following is an example of a situation in which you cannot approximate the global minimum by using linear methods; however, the global solver finds the best solution.
Example
Consider a non-linear system of equations.
eq1≔x2+y4+ⅇx−y2+5 sin2 x−4 x y−12 cosx y:
eq2≔5 ln1+x2+ⅇ−y+x+5 sin6 x y:
The induced least-squares error function is highly multi-extremal, making it difficult to minimize the error of the least squares approximation.
plot3deq12+eq22,x=−2..2, y=−1..3, grid=30,30, lightmodel=light4, axes=boxed
To determine the global minimum of the least-squares error, define the objective function and constraints to be optimized.
objf≔eq12+eq22:
cons≔eq1, eq2:
First, try to find a local solution by using Maple's built-in Optimization package. This system is sufficiently complex that linear optimization solvers cannot find a feasible solution.
localsoln≔OptimizationMinimizeobjf, eq1=0, eq2=0, x=−1..2, y=−2..1
Error, (in Optimization:-NLPSolve) no improved point could be found
However, global optimization techniques can be used to find a global minimum.
sol≔GlobalSolveobjf, eq1=0, eq2=0, x=−1..2, y=−2..1:sol1; sol2
6.31088724176809444×10−30
x=−0.558972497939247,y=−1.58234523718254
Substitution into the constraints shows that the least squares approximation can be a fairly precise solution. That is, the error of the least squares approximation is very small at the minimum point.
evalcons,sol2
1.77635683940025×10−15
With the examples demonstrated here, you are now ready to use the Global Optimization Toolbox to solve many complex mathematical problems. See the Maple help system for more information about the commands used in this guide, or more ways in which the Global Optimization Toolbox can help you.
Download Help Document