Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Operator Form of Input for the GlobalOptimization Package
This help page describes the operator form of input for commands in the GlobalOptimization package. For general information on the input forms accepted by the GlobalOptimization package commands, see the GlobalOptimization/InputForms help page.
The descriptions of the various components below assume that the optimization problem involves minimizing or maximizing a function of the variables x1,x2,...,xn.
Objective Function
Constraints
Bounds
Initial Values
Solution
Notes
Examples
Specify the objective function as a procedure that accepts n floating-point parameters corresponding to the problem variables and returns a float.
Specify the inequality constraints as a set or list of procedures. A single constraint vx1,⁢x2,⁢...,⁢xn⁢≤⁢0 is specified as a procedure v of the same form as the objective function previously described and returning the left-hand side value of the constraint.
Specify the equality constraints also as a set or list of procedures. Each constraint wx1,⁢x2,⁢...,⁢xn⁢=⁢0 is specified as a procedure returning the left-hand side value of the constraint.
Specify bounds as a sequence of ranges. For example, the sequence −1.0..2.5,0.5..3.2 indicates that the first problem variable is constrained between −1.0 and 2.5, and the second is constrained between 0.5 and 3.2. There must be exactly one range for each problem variable and the endpoints of each range must evaluate to finite numeric values.
Because finite bounds are required, the assume=nonnegative option, available in the Optimization package, is not accepted by GlobalOptimization commands.
Specify the initial values using the option initialpoint=p, where p is a list of realcons. The list must contain one value for each problem variable. For more information on the initialpoint option, see the GlobalOptimization/Options help page.
Maple returns the solution as a list containing the final minimum (or maximum) value and a point (the computed extremum). The point is a Vector containing the values of the problem variables.
In general, the GlobalOptimization solvers attempt to evaluate procedures with the evalhf command, but this is not possible with operator form procedures. It is recommended that you do not use operator form unless ease-of-use is more important than efficiency. For more information on how to achieve efficient computation, see the GlobalOptimization/Computation help page.
with⁡GlobalOptimization:
Solve a minimization problem using operator form. The objective function x2−y is specified as a procedure taking two input parameters, corresponding to the problem variables, and returning a scalar.
GlobalSolve(proc(x,y) x^2-y end proc, -1..1, -1..1);
−1.,−1.65436122510606⁢10-241.
Solve a minimization problem with the objective function x−y and constraints x−y≤1 and y2−x≤2. Each constraint is specified in the same way as the objective function.
GlobalSolve⁡x,y→x−y,x,y→x−y−1,x,y→y2−x−2,0..3,0..3
−1.41421356237922335,0.1.41421356237922
Find the global minimum of a piecewise function.
p:= proc(x) piecewise(x < -1, x^4-x+2, x < 1, x^3+x^2+7, x < 3, x^2+3) end proc;
p:=procxpiecewise⁡x<−1,x^4 − x+2,x<1,x^3+x^2+7,x<3,x^2+3end proc
GlobalSolve⁡p,−2..2
4.00000005349798,−1.00000001069960
See Also
evalhf
GlobalOptimization
GlobalOptimization/Computation
GlobalOptimization/InputForms
GlobalOptimization/Options
GlobalOptimization[GlobalSolve]
Optimization
Download Help Document