Optimization Options
This help page describes the options common to the solvers in the Optimization package.
Description of OptionsNotes
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk0">Description of Options</Text-field>
assume = nonnegative, integer, binary or nonnegint
Specify that all problem variables take non-negative, 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 non-negativity 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
Provide a procedure to compute the Jacobian matrix of the constraints. This option is only applicable to the Matrix form of the NLPSolve and LSSolve commands, as described in the Optimization[NLPSolve] (MatrixForm) and Optimization[LSSolve] (MatrixForm) help pages. The form required for the procedure is described in the Nonlinear Constraints section of the Optimization/MatrixForm help page. See the following Notes section for more information about this option.
depthlimit = posint
Set the maximum depth of the branch-and-bound tree. This option is only used by the Optimization[LPSolve] command for integer programs. The default is the maximum of 2 and NiMtSSVjZWlsRzYiNiMsJEkibkdGJSMiIiQiIiM=.
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.
evaluationlimit = posint
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 NiMvSSdvdXRwdXRHNiJJL3NvbHV0aW9ubW9kdWxlR0Yl 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 NiMkIiM1IiM+. 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 NiMvSSh2YXJuYW1lRzYiSSZ2YWx1ZUc2JEkqcHJvdGVjdGVkR0YoSShfc3lzbGliR0Yl 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 initial-point 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 NiMkIiM1ISIn.
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.
iterationlimit = posint
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 NiMvSSdvdXRwdXRHNiJJL3NvbHV0aW9ubW9kdWxlR0Yl 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.
method = name
Specify the method. This option is available for the Optimization[LPSolve], Optimization[NLPSolve] and Optimization[LSSolve] commands only. See the Optimization/General/Methods help page for information about the methods that are available for each command.
nodelimit = nonnegint
Set the maximum number of nodes searched in the branch-and-bound tree. This option is only used by the Optimization[LPSolve] command for integer programs and the Optimization[NLPSolve] command with the NiMvSSdtZXRob2RHNiJJL2JyYW5jaGFuZGJvdW5kR0Yl option. The default for LPSolve is 0, which means all nodes are searched. The NLPSolve command does not accept the value 0 and uses a default value of 50.
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 Least-Squares 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 NiMvSSdtZXRob2RHNiJJL2JyYW5jaGFuZGJvdW5kR0Yl 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 NiMkIiM1ISIn 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.
output = solutionmodule
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.
useunits = list(name::unit) or list(unit)
Specify the units for the problem variables. When the objective function is in algebraic form, variables are associated to units using the double colon operator. Otherwise units are given as list of units. This option is useful for overriding the default units deduced by the unit handling or for explicitly specifying units in cases where the deduction fails or units are not detected at all (e.g. operator form when the operators can return quantities involving units). See Optimization/General/Units for more details on using units.
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.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk1">Notes</Text-field>
The objectivegradient, objectivejacobian, and constraintjacobian options are applicable when Matrix-form 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 user-provided 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 Matrix-form input are then lost.
Setting infolevel[Optimization] to 3 or higher produces messages showing the settings for the various options.
See AlsoDigitsOptimizationOptimization/AlgebraicFormOptimization/ComputationOptimization/MatrixFormOptimization/OperatorFormOptimization/SolutionUseHardwareFloats