Solutions Returned by the Optimization Package - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Optimization : Optimization Package : General information : Optimization/General/Solution

Solutions Returned by the Optimization Package


This help page describes the forms of solutions returned by commands in the Optimization package.


The Default Solution

The Solution Module


The Default Solution


Each Optimization command that solves an optimization problem returns, by default, a list containing the final minimum (or maximum) value and a point (the extremum).  In situations where the solution point is not unique, the command returns only one of the possible solutions.  In general, only a local extremum is obtained.  Situations in which a global extremum can be computed are described in the help pages for the individual commands.


When the problem is in algebraic form, the solution point is a list containing elements of the form varname=value where varname is a problem variable and value is its final value.  When the problem is in Matrix or operator form, the solution point is a Vector of numeric values.

The Solution Module


Most of the commands in the Optimization package accept the output=solutionmodule option.  When this option is provided, a module is returned instead of the default output described in the previous section.


The returned module has two exports, Settings and Results. Each export is a procedure that accepts a single optional string or name argument.  When an argument is provided, the associated value is returned. For example, if the module is assigned to variable m, then the call m:Resultsobjectivevalue returns the final numeric objective function value. When no argument is provided, then all available information is returned as a list of equations.


The Settings procedure generally accepts any of the following names as an argument: depthlimit, evaluationlimit, feasibilitytolerance, infinitebound, initialpoint, integertolerance, iterationlimit, nodelimit, objectivetarget, or optimalitytolerance. These names correspond to the options of the same name described in the Optimization[Options] help page.  If the option is not applicable to the command used, or if the value is not available for some other reason, the Settings procedure issues an error.


The Results procedure accepts any of the following names as an argument: evaluations, iterations, objectivevalue, or solutionpoint. The arguments objectivevalue and solutionpoint correspond to the final objective function value and the solution point that are normally returned by default.  The arguments iterations and evaluations refer to the total numbers of iterations and evaluations performed. These values are not available for all methods.



Solve a linear program with the Optimization[LPSolve] command.  A list containing the final objective value and a point is returned.




Use the output=solutionmodule option to obtain a module and assign this result to the variable m.


mmoduleexportResults,Settings;end module


Display the results using the Results export.




Assign the initial point to the variable t.




See Also