2 Global Optimization Toolbox - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Manuals : Getting Started with Maple Toolboxes : 2 Global Optimization Toolbox

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

(1.2.1.1)

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

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

OptimizationMinimizelnxsinx, x=1..50

−3.39618690740209,x=29.8549920107437

(1.3.1)

 

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:

GlobalSolvelnxsinx, x=1..50

−3.88562416790700960,x=48.6999273727307

(1.3.2)

 

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.

infolevelGlobalOptimization3:

GlobalSolvelnxsinx, x=1..50

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

−3.88562416790700960,x=48.6999273727307

(1.3.3)

Typically, the infolevel is set to 0, the default.

infolevelGlobalOptimization0:

 

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.

eq1x2+y4+ⅇxy2+5 sin2 x4 x y12 cosx y:

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

objfeq12+eq22:

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

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

solGlobalSolveobjf, eq1=0, eq2=0, x=1..2, y=2..1:sol1; sol2

6.31088724176809444×10−30

x=−0.558972497939247,y=−1.58234523718254

(1.3.1.1)

 

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

(1.3.1.2)

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.

 

Contents     Previous     Next