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
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.
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:−Results⁡objectivevalue 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.
m ≔ LPSolve⁡−4⁢x−5⁢y,x+2⁢y≤6,5⁢x+4⁢y≤20,0≤x,0≤y,output=solutionmodule
m ≔ moduleexportResults,Settings;end module
Display the results using the Results export.
Assign the initial point to the variable t.
t ≔ m:-Settings⁡initialpoint
Download Help Document