Matrix Form of Input for the GlobalOptimization Package

This help page describes the Matrix 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.


Using Matrix Form


•

The solvers perform most efficiently when given problems in Matrix form, with all the input specified as Vectors or procedures taking Vector parameters. Matrix form requires the least amount of preprocessing because it is most similar to the format used by the internal solvers. This leads to reduced storage needs and faster computation.

•

Consider an optimization problem in the form:


minimize


(nonlinear inequality constraints)


(nonlinear equality constraints)


(bounds)



Constraints


•

Procedures created for the Optimization package using the needc parameter, as described in Optimization/MatrixForm, are accepted by the GlobalSolve command, but the needc parameter is not used. For best performance, construct the pcons procedure without it.



Bounds


•

Bounds on the problem variables are required by the GlobalSolve command. They are provided as a list [bl, bu] containing lower bounds followed by upper bounds. Bounds must evaluate to finite numeric values.

•

The bounds bl and bu can be specified as Vectors of dimension n or as numeric values. If a numeric value is provided, it is interpreted as a Vector of dimension n in which each element is equal to that value.

•

Because finite bounds are required, the assume=nonnegative option, available in the Optimization package, is not accepted by GlobalOptimization commands.



Initial Values


•

The GlobalSolve command accepts initial values. Initial values are specified using the option initialpoint=p, where p is a Vector of dimension . For more information on the initialpoint option, see the GlobalOptimization/Options help page.



Solution


•

The solution is a list where objval is a floatingpoint number representing the final minimum (or maximum) value and solpt is a Vector representing a point (the computed extremum).



Additional Requirements


•

For best performance, the components described previously must satisfy the following additional conditions.


All Vector arguments must be constructed with datatype=float. Otherwise, the solvers must perform conversions.


When possible, input procedures must be created so that they can be evaluated by the evalhf command. Otherwise, the solvers cannot take advantage of the more efficient evalhf mode of computation.


Procedures returning a scalar result must return a floatingpoint value in all cases, not simply an expression that evaluates to a float.

•

The following additional condition must be met. If a procedure returns a Vector result using an output parameter, only floatingpoint values can be assigned to the parameter. Otherwise, an error is issued.



Examples


>


Minimize the objective function with constraints and over the region .
The objective function is a procedure taking as input a Vector containing the and values.
>

p := proc (V)
(V[1]1)^2+(V[2]2)^2
end proc:

The constraints are specified as a procedure that accepts a Vector containing the and values as input and returns a Vector containing the constraint values.
>

nlc := proc(V, W)
W[1] := V[1]^21:
W[2] := V[1]+V[2]1/2
end proc:

The bounds are specified as Vectors of dimension 2.
>


>


>


Find the global solution to the problem.
>


 (1) 

