Optimization Options

This help page describes the options common to the solvers in the Optimization package.


Description of Options



assume = nonnegative, integer, binary or nonnegint


Specify that all problem variables take nonnegative, integer, or binary values. Using nonnegint is equivalent to using nonnegative and integer. To specify more than one property, include the names in a set or list. By default, variables are not assumed to have any of these properties. Bounds specified separately replace the nonnegativity constraint imposed by the assume = nonnegative option. The integer, nonnegint and binary values are only accepted by the Optimization[LPSolve] command. These are overridden by information provided through the integervariables or binaryvariables option; an error may be issued when ambiguous information is provided.


binaryvariables = list(name), set(name), list(posint), or set(posint)


Specify the problem variables that only take the values 0 or 1. When the problem is in algebraic form, provide a list or set of the variable names. When the problem is in Matrix form, provide a list or set of the variable positions in the problem Vector. This option is only accepted by the Optimization[LPSolve] command.


constraintjacobian = procedure


The internal workspace allocated by the integer programming solver depends on the value of depthlimit. If, during the computation, the workspace is found to be insufficient, an error is issued indicating that depthlimit must be increased.


Set the maximum number of objective function evaluations performed by the optimization algorithm. This option is available only for the Optimization[NLPSolve] command, with the method option set to branchandbound, modifiednewton, nonlinearsimplex or quadratic. See also the iterationlimit option described below.


By default, the evaluation limit is automatically computed by the internal solvers and varies according to the algorithm chosen and the problem parameters. Set infolevel[Optimization] to 2 or higher to see the limit and the final number of evaluations taken by the solver, or use the option to retrieve this information.


feasibilitytolerance = realcons(positive)


Set the maximum acceptable absolute violation in each constraint at a point that is considered to be
feasible
. For the interior point method of Optimization[LPSolve], set the tolerance for the sum of the relative constraint violation and relative duality gap. This option is only applicable to constrained problems.


The default value is based on current values of the environment variables Digits and UseHardwareFloats. If you provide a value that is too small or greater than 1 (for nonlinear problems only), the default value is used.


infinitebound = realcons(positive)


Set any value of a variable greater than the infinitebound value to be equivalent to infinity during the computation. The default value is . Note that this option only applies during the computation performed by the solvers in the external numeric optimization library. It does not apply to preprocessing of the problem data, postprocessing of the solution, or evaluation of the objective function and constraints within Maple. For more information about the external solvers, see the Optimization/Computation help page.


initialpoint = set(equation), list(equation), list(realcons), or 'Vector'(realcons)


Provide an initial point. Usually, the initial point is specified as a set or list of equalities when the most common form of input, algebraic form, is used. When operator form or Matrix form is used, the initial point is specified as a list or Vector of values.


Because the solvers in the Optimization package only compute local solutions, it is strongly recommended that you provide an appropriate initial point through this option. All solvers use initialpoint information, except the quadratic interpolation method of Optimization[NLPSolve]. The initial point is ignored in this case. For more information, see the Optimization/Methods help page.


integertolerance = realcons(positive)


Set the maximum acceptable absolute violation in a value for it to be considered an integer. This option is only used by the Optimization[LPSolve] command for
integer programs
. The default is .


integervariables = list(name), set(name), list(posint), or set(posint)


Specify the problem variables that only take integer values. When the problem is in algebraic form, provide a list or set of the variable names. When the problem is in Matrix form, provide a list or set of the variable positions in the problem Vector. This option is only accepted by the Optimization[LPSolve] command.


Set the maximum number of iterations performed by the optimization algorithm. This option is only applicable when the optimization solver uses an iterative algorithm. When the algorithm contains steps which are themselves iterative, this option refers to the number of major or outer iterations. See also the evaluationlimit option described above.


By default, the iteration limit is automatically computed by the internal solvers and varies according to the algorithm chosen and the problem parameters. Set infolevel[Optimization] to 2 or higher to see the limit and the final number of iterations taken by the solver, or use the option to retrieve this information.


maximize or maximize = truefalse


Maximize the objective function when the maximize or maximize = true option is provided and minimize when maximize = false is provided. This option is not available with the Optimization[LSSolve] command, and it is ignored by the Optimization[Maximize] command. The default is maximize = false.


objectivegradient = procedure


Provide a procedure to compute the
gradient
of the objective function. This option is only applicable to the Matrix form of the NLPSolve command, as described in the Optimization[NLPSolve] (MatrixForm) help page. The form required for the procedure is described in the Nonlinear Objective section of the Optimization/MatrixForm help page. See the following Notes section for more information about this option.


objectivejacobian = procedure


Provide a procedure to compute the
Jacobian matrix
of the objective function. This option is only applicable to the Matrix form of the LSSolve command, as described in the Optimization[LSSolve] (MatrixForm) help page. The form required for the procedure is described in the Nonlinear LeastSquares Objective section of the Optimization/MatrixForm help page. See the following Notes section for further information about this option.


objectivetarget = realcons


Set the acceptable target value for the objective function. This option is available only for the Optimization[NLPSolve] command with the option. If the objective function achieves this target value, the global search terminates. The default value is infinity.


optimalitytolerance = realcons(positive)


Set the tolerance that determines whether an optimal point has been found. This option is only used by the Optimization[NLPSolve] and Optimization[LSSolve] commands. In general, the option value indicates the number of correct digits desired in the solution. For example, a value of means that the final solution should have approximately six correct figures.


The tolerance value must be between 0.0 and 1.0. The default value is based on current values of the environment variables Digits and UseHardwareFloats. If you provide a value that is too small, the default value is used.


Instead of the default output, return a module with two exports, Settings and Results. Each export is a procedure that queries the values of the problem settings or solution. For more information, see the Optimization/Solution help page.


variables = list(name) or set(name)


Specify the problem variables when the objective function is in algebraic form. This option is useful when the objective function includes dummy variables that should not be treated as optimization variables.



Notes


•

The objectivegradient, objectivejacobian, and constraintjacobian options are applicable when Matrixform input is used with the NLPSolve and LSSolve commands.


When Matrix form is used with these commands, the default is to have no separate procedures for computing
gradients
and
Jacobian matrices
. In this case, the internal solvers attempt to either numerically compute the derivatives or use methods that do not require derivatives. The performance is generally much worse than with userprovided procedures and the solvers may be unsuccessful at computing a solution.


When algebraic or operator form is used, Maple automatically attempts to compute gradients and Jacobian matrices using its symbolic and automatic differentiation facilities. However, the efficiency advantages of using Matrixform input are then lost.

•

Setting infolevel[Optimization] to 3 or higher produces messages showing the settings for the various options.


