Deprecated as of Analytica 4.3 -- use OptSolution
Solves and returns the solution to an optimization problem, either a linear program defined using LpDefine, a Quadratic or QCP problem defined using QpDefine, or a constrained non-linear optimization problem defined with NlpDefine.
If the problem has already been solved as a result of calling a related function, such as LpStatusText, the solution is obtained immediately. If it hasn't been solved yet (functions like LpDefine define the problem but don't solve it), then it launches the search for the solution.
The value returned is only valid when the solver believes that an optimal, or likely optimal solution has been found. You should always check LpStatusText or LpStatusNum to validate that a feasible and optimal solution has been found. It is entirely possible that there is no solution, or that the solver could not find a feasible solution, in which cases the values returned by LpSolution are arbitrary.
In release 4.2, you may notice an optional parameter, «variable». This is a placeholder for a feature that will be introduced in an upcoming release. For now, just ignore it.