blob: 0c8a112342e82013a17ae158636af112e79061a8 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>SimplexSolver (Apache Commons Math 3.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SimplexSolver (Apache Commons Math 3.3 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SimplexSolver.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/Relationship.html" title="enum in org.apache.commons.math3.optim.linear"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/SolutionCallback.html" title="class in org.apache.commons.math3.optim.linear"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/commons/math3/optim/linear/SimplexSolver.html" target="_top">Frames</a></li>
<li><a href="SimplexSolver.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_org.apache.commons.math3.optim.BaseOptimizer">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.math3.optim.linear</div>
<h2 title="Class SimplexSolver" class="title">Class SimplexSolver</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html" title="class in org.apache.commons.math3.optim">org.apache.commons.math3.optim.BaseOptimizer</a>&lt;PAIR&gt;</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../org/apache/commons/math3/optim/BaseMultivariateOptimizer.html" title="class in org.apache.commons.math3.optim">org.apache.commons.math3.optim.BaseMultivariateOptimizer</a>&lt;<a href="../../../../../../org/apache/commons/math3/optim/PointValuePair.html" title="class in org.apache.commons.math3.optim">PointValuePair</a>&gt;</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/MultivariateOptimizer.html" title="class in org.apache.commons.math3.optim.nonlinear.scalar">org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html" title="class in org.apache.commons.math3.optim.linear">org.apache.commons.math3.optim.linear.LinearOptimizer</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.math3.optim.linear.SimplexSolver</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">SimplexSolver</span>
extends <a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html" title="class in org.apache.commons.math3.optim.linear">LinearOptimizer</a></pre>
<div class="block">Solves a linear problem using the "Two-Phase Simplex" method.
<p>
The <a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html" title="class in org.apache.commons.math3.optim.linear"><code>SimplexSolver</code></a> supports the following <a href="../../../../../../org/apache/commons/math3/optim/OptimizationData.html" title="interface in org.apache.commons.math3.optim"><code>OptimizationData</code></a> data provided
as arguments to <a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#optimize(org.apache.commons.math3.optim.OptimizationData...)"><code>optimize(OptimizationData...)</code></a>:
<ul>
<li>objective function: <a href="../../../../../../org/apache/commons/math3/optim/linear/LinearObjectiveFunction.html" title="class in org.apache.commons.math3.optim.linear"><code>LinearObjectiveFunction</code></a> - mandatory</li>
<li>linear constraints <a href="../../../../../../org/apache/commons/math3/optim/linear/LinearConstraintSet.html" title="class in org.apache.commons.math3.optim.linear"><code>LinearConstraintSet</code></a> - mandatory</li>
<li>type of optimization: <a href="../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/GoalType.html" title="enum in org.apache.commons.math3.optim.nonlinear.scalar"><code>GoalType</code></a>
- optional, default: <a href="../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/GoalType.html#MINIMIZE"><code>MINIMIZE</code></a></li>
<li>whether to allow negative values as solution: <a href="../../../../../../org/apache/commons/math3/optim/linear/NonNegativeConstraint.html" title="class in org.apache.commons.math3.optim.linear"><code>NonNegativeConstraint</code></a> - optional, default: true</li>
<li>pivot selection rule: <a href="../../../../../../org/apache/commons/math3/optim/linear/PivotSelectionRule.html" title="enum in org.apache.commons.math3.optim.linear"><code>PivotSelectionRule</code></a> - optional, default <a href="../../../../../../org/apache/commons/math3/optim/linear/PivotSelectionRule.html#DANTZIG"><code>PivotSelectionRule.DANTZIG</code></a></li>
<li>callback for the best solution: <a href="../../../../../../org/apache/commons/math3/optim/linear/SolutionCallback.html" title="class in org.apache.commons.math3.optim.linear"><code>SolutionCallback</code></a> - optional</li>
<li>maximum number of iterations: <a href="../../../../../../org/apache/commons/math3/optim/MaxIter.html" title="class in org.apache.commons.math3.optim"><code>MaxIter</code></a> - optional, default: <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><code>Integer.MAX_VALUE</code></a></li>
</ul>
<p>
<b>Note:</b> Depending on the problem definition, the default convergence criteria
may be too strict, resulting in <a href="../../../../../../org/apache/commons/math3/optim/linear/NoFeasibleSolutionException.html" title="class in org.apache.commons.math3.optim.linear"><code>NoFeasibleSolutionException</code></a> or
<a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception"><code>TooManyIterationsException</code></a>. In such a case it is advised to adjust these
criteria with more appropriate values, e.g. relaxing the epsilon value.
<p>
Default convergence criteria:
<ul>
<li>Algorithm convergence: 1e-6</li>
<li>Floating-point comparisons: 10 ulp</li>
<li>Cut-Off value: 1e-10</li>
</ul>
<p>
The cut-off value has been introduced to handle the case of very small pivot elements
in the Simplex tableau, as these may lead to numerical instabilities and degeneracy.
Potential pivot elements smaller than this value will be treated as if they were zero
and are thus not considered by the pivot selection mechanism. The default value is safe
for many problems, but may need to be adjusted in case of very small coefficients
used in either the <a href="../../../../../../org/apache/commons/math3/optim/linear/LinearConstraint.html" title="class in org.apache.commons.math3.optim.linear"><code>LinearConstraint</code></a> or <a href="../../../../../../org/apache/commons/math3/optim/linear/LinearObjectiveFunction.html" title="class in org.apache.commons.math3.optim.linear"><code>LinearObjectiveFunction</code></a>.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd>
<dt><span class="strong">Version:</span></dt>
<dd>$Id: SimplexSolver.java 1553855 2013-12-28 15:55:24Z erans $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_org.apache.commons.math3.optim.BaseOptimizer">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.commons.math3.optim.<a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html" title="class in org.apache.commons.math3.optim">BaseOptimizer</a></h3>
<code><a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#evaluations">evaluations</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#iterations">iterations</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#SimplexSolver()">SimplexSolver</a></strong>()</code>
<div class="block">Builds a simplex solver with default settings.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#SimplexSolver(double)">SimplexSolver</a></strong>(double&nbsp;epsilon)</code>
<div class="block">Builds a simplex solver with a specified accepted amount of error.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#SimplexSolver(double, int)">SimplexSolver</a></strong>(double&nbsp;epsilon,
int&nbsp;maxUlps)</code>
<div class="block">Builds a simplex solver with a specified accepted amount of error.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#SimplexSolver(double, int, double)">SimplexSolver</a></strong>(double&nbsp;epsilon,
int&nbsp;maxUlps,
double&nbsp;cutOff)</code>
<div class="block">Builds a simplex solver with a specified accepted amount of error.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#doIteration(org.apache.commons.math3.optim.linear.SimplexTableau)">doIteration</a></strong>(org.apache.commons.math3.optim.linear.SimplexTableau&nbsp;tableau)</code>
<div class="block">Runs one iteration of the Simplex method on the given model.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/optim/PointValuePair.html" title="class in org.apache.commons.math3.optim">PointValuePair</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#doOptimize()">doOptimize</a></strong>()</code>
<div class="block">Performs the bulk of the optimization algorithm.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/commons/math3/optim/PointValuePair.html" title="class in org.apache.commons.math3.optim">PointValuePair</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#optimize(org.apache.commons.math3.optim.OptimizationData...)">optimize</a></strong>(<a href="../../../../../../org/apache/commons/math3/optim/OptimizationData.html" title="interface in org.apache.commons.math3.optim">OptimizationData</a>...&nbsp;optData)</code>
<div class="block">Stores data and performs the optimization.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#parseOptimizationData(org.apache.commons.math3.optim.OptimizationData...)">parseOptimizationData</a></strong>(<a href="../../../../../../org/apache/commons/math3/optim/OptimizationData.html" title="interface in org.apache.commons.math3.optim">OptimizationData</a>...&nbsp;optData)</code>
<div class="block">Scans the list of (required and optional) optimization data that
characterize the problem.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/optim/linear/SimplexSolver.html#solvePhase1(org.apache.commons.math3.optim.linear.SimplexTableau)">solvePhase1</a></strong>(org.apache.commons.math3.optim.linear.SimplexTableau&nbsp;tableau)</code>
<div class="block">Solves Phase 1 of the Simplex method.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.optim.linear.LinearOptimizer">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.optim.linear.<a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html" title="class in org.apache.commons.math3.optim.linear">LinearOptimizer</a></h3>
<code><a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html#getConstraints()">getConstraints</a>, <a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html#getFunction()">getFunction</a>, <a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html#isRestrictedToNonNegative()">isRestrictedToNonNegative</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.optim.nonlinear.scalar.<a href="../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/MultivariateOptimizer.html" title="class in org.apache.commons.math3.optim.nonlinear.scalar">MultivariateOptimizer</a></h3>
<code><a href="../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/MultivariateOptimizer.html#computeObjectiveValue(double[])">computeObjectiveValue</a>, <a href="../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/MultivariateOptimizer.html#getGoalType()">getGoalType</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.optim.BaseMultivariateOptimizer">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.optim.<a href="../../../../../../org/apache/commons/math3/optim/BaseMultivariateOptimizer.html" title="class in org.apache.commons.math3.optim">BaseMultivariateOptimizer</a></h3>
<code><a href="../../../../../../org/apache/commons/math3/optim/BaseMultivariateOptimizer.html#getLowerBound()">getLowerBound</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseMultivariateOptimizer.html#getStartPoint()">getStartPoint</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseMultivariateOptimizer.html#getUpperBound()">getUpperBound</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.optim.BaseOptimizer">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.optim.<a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html" title="class in org.apache.commons.math3.optim">BaseOptimizer</a></h3>
<code><a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#getConvergenceChecker()">getConvergenceChecker</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#getEvaluations()">getEvaluations</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#getIterations()">getIterations</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#getMaxEvaluations()">getMaxEvaluations</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#getMaxIterations()">getMaxIterations</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#incrementEvaluationCount()">incrementEvaluationCount</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#incrementIterationCount()">incrementIterationCount</a>, <a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#optimize()">optimize</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="SimplexSolver()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimplexSolver</h4>
<pre>public&nbsp;SimplexSolver()</pre>
<div class="block">Builds a simplex solver with default settings.</div>
</li>
</ul>
<a name="SimplexSolver(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimplexSolver</h4>
<pre>public&nbsp;SimplexSolver(double&nbsp;epsilon)</pre>
<div class="block">Builds a simplex solver with a specified accepted amount of error.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>epsilon</code> - Amount of error to accept for algorithm convergence.</dd></dl>
</li>
</ul>
<a name="SimplexSolver(double, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SimplexSolver</h4>
<pre>public&nbsp;SimplexSolver(double&nbsp;epsilon,
int&nbsp;maxUlps)</pre>
<div class="block">Builds a simplex solver with a specified accepted amount of error.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>epsilon</code> - Amount of error to accept for algorithm convergence.</dd><dd><code>maxUlps</code> - Amount of error to accept in floating point comparisons.</dd></dl>
</li>
</ul>
<a name="SimplexSolver(double, int, double)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SimplexSolver</h4>
<pre>public&nbsp;SimplexSolver(double&nbsp;epsilon,
int&nbsp;maxUlps,
double&nbsp;cutOff)</pre>
<div class="block">Builds a simplex solver with a specified accepted amount of error.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>epsilon</code> - Amount of error to accept for algorithm convergence.</dd><dd><code>maxUlps</code> - Amount of error to accept in floating point comparisons.</dd><dd><code>cutOff</code> - Values smaller than the cutOff are treated as zero.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="optimize(org.apache.commons.math3.optim.OptimizationData...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>optimize</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/optim/PointValuePair.html" title="class in org.apache.commons.math3.optim">PointValuePair</a>&nbsp;optimize(<a href="../../../../../../org/apache/commons/math3/optim/OptimizationData.html" title="interface in org.apache.commons.math3.optim">OptimizationData</a>...&nbsp;optData)
throws <a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception">TooManyIterationsException</a></pre>
<div class="block">Stores data and performs the optimization.
<p>
The list of parameters is open-ended so that sub-classes can extend it
with arguments specific to their concrete implementations.
<p>
When the method is called multiple times, instance data is overwritten
only when actually present in the list of arguments: when not specified,
data set in a previous call is retained (and thus is optional in
subsequent calls).
<p>
Important note: Subclasses <em>must</em> override
<a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#parseOptimizationData(org.apache.commons.math3.optim.OptimizationData...)"><code>BaseOptimizer.parseOptimizationData(OptimizationData[])</code></a> if they need to register
their own options; but then, they <em>must</em> also call
<code>super.parseOptimizationData(optData)</code> within that method.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html#optimize(org.apache.commons.math3.optim.OptimizationData...)">optimize</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html" title="class in org.apache.commons.math3.optim.linear">LinearOptimizer</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>optData</code> - Optimization data. In addition to those documented in
<a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html#optimize(org.apache.commons.math3.optim.OptimizationData...)"><code>LinearOptimizer</code></a>, this method will register the following data:
<ul>
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/SolutionCallback.html" title="class in org.apache.commons.math3.optim.linear"><code>SolutionCallback</code></a></li>
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/PivotSelectionRule.html" title="enum in org.apache.commons.math3.optim.linear"><code>PivotSelectionRule</code></a></li>
</ul></dd>
<dt><span class="strong">Returns:</span></dt><dd>a point/value pair that satisfies the convergence criteria.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception">TooManyIterationsException</a></code> - if the maximal number of iterations is exceeded.</dd></dl>
</li>
</ul>
<a name="parseOptimizationData(org.apache.commons.math3.optim.OptimizationData...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseOptimizationData</h4>
<pre>protected&nbsp;void&nbsp;parseOptimizationData(<a href="../../../../../../org/apache/commons/math3/optim/OptimizationData.html" title="interface in org.apache.commons.math3.optim">OptimizationData</a>...&nbsp;optData)</pre>
<div class="block">Scans the list of (required and optional) optimization data that
characterize the problem.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html#parseOptimizationData(org.apache.commons.math3.optim.OptimizationData...)">parseOptimizationData</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html" title="class in org.apache.commons.math3.optim.linear">LinearOptimizer</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>optData</code> - Optimization data.
In addition to those documented in
<a href="../../../../../../org/apache/commons/math3/optim/linear/LinearOptimizer.html#parseOptimizationData(org.apache.commons.math3.optim.OptimizationData...)"><code>LinearOptimizer</code></a>, this method will register the following data:
<ul>
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/SolutionCallback.html" title="class in org.apache.commons.math3.optim.linear"><code>SolutionCallback</code></a></li>
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/PivotSelectionRule.html" title="enum in org.apache.commons.math3.optim.linear"><code>PivotSelectionRule</code></a></li>
</ul></dd></dl>
</li>
</ul>
<a name="doIteration(org.apache.commons.math3.optim.linear.SimplexTableau)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doIteration</h4>
<pre>protected&nbsp;void&nbsp;doIteration(org.apache.commons.math3.optim.linear.SimplexTableau&nbsp;tableau)
throws <a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception">TooManyIterationsException</a>,
<a href="../../../../../../org/apache/commons/math3/optim/linear/UnboundedSolutionException.html" title="class in org.apache.commons.math3.optim.linear">UnboundedSolutionException</a></pre>
<div class="block">Runs one iteration of the Simplex method on the given model.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tableau</code> - Simple tableau for the problem.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception">TooManyIterationsException</a></code> - if the allowed number of iterations has been exhausted.</dd>
<dd><code><a href="../../../../../../org/apache/commons/math3/optim/linear/UnboundedSolutionException.html" title="class in org.apache.commons.math3.optim.linear">UnboundedSolutionException</a></code> - if the model is found not to have a bounded solution.</dd></dl>
</li>
</ul>
<a name="solvePhase1(org.apache.commons.math3.optim.linear.SimplexTableau)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>solvePhase1</h4>
<pre>protected&nbsp;void&nbsp;solvePhase1(org.apache.commons.math3.optim.linear.SimplexTableau&nbsp;tableau)
throws <a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception">TooManyIterationsException</a>,
<a href="../../../../../../org/apache/commons/math3/optim/linear/UnboundedSolutionException.html" title="class in org.apache.commons.math3.optim.linear">UnboundedSolutionException</a>,
<a href="../../../../../../org/apache/commons/math3/optim/linear/NoFeasibleSolutionException.html" title="class in org.apache.commons.math3.optim.linear">NoFeasibleSolutionException</a></pre>
<div class="block">Solves Phase 1 of the Simplex method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tableau</code> - Simple tableau for the problem.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception">TooManyIterationsException</a></code> - if the allowed number of iterations has been exhausted.</dd>
<dd><code><a href="../../../../../../org/apache/commons/math3/optim/linear/UnboundedSolutionException.html" title="class in org.apache.commons.math3.optim.linear">UnboundedSolutionException</a></code> - if the model is found not to have a bounded solution.</dd>
<dd><code><a href="../../../../../../org/apache/commons/math3/optim/linear/NoFeasibleSolutionException.html" title="class in org.apache.commons.math3.optim.linear">NoFeasibleSolutionException</a></code> - if there is no feasible solution?</dd></dl>
</li>
</ul>
<a name="doOptimize()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>doOptimize</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/commons/math3/optim/PointValuePair.html" title="class in org.apache.commons.math3.optim">PointValuePair</a>&nbsp;doOptimize()
throws <a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception">TooManyIterationsException</a>,
<a href="../../../../../../org/apache/commons/math3/optim/linear/UnboundedSolutionException.html" title="class in org.apache.commons.math3.optim.linear">UnboundedSolutionException</a>,
<a href="../../../../../../org/apache/commons/math3/optim/linear/NoFeasibleSolutionException.html" title="class in org.apache.commons.math3.optim.linear">NoFeasibleSolutionException</a></pre>
<div class="block">Performs the bulk of the optimization algorithm.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html#doOptimize()">doOptimize</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../org/apache/commons/math3/optim/BaseOptimizer.html" title="class in org.apache.commons.math3.optim">BaseOptimizer</a>&lt;<a href="../../../../../../org/apache/commons/math3/optim/PointValuePair.html" title="class in org.apache.commons.math3.optim">PointValuePair</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the point/value pair giving the optimal value of the
objective function.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../org/apache/commons/math3/exception/TooManyIterationsException.html" title="class in org.apache.commons.math3.exception">TooManyIterationsException</a></code></dd>
<dd><code><a href="../../../../../../org/apache/commons/math3/optim/linear/UnboundedSolutionException.html" title="class in org.apache.commons.math3.optim.linear">UnboundedSolutionException</a></code></dd>
<dd><code><a href="../../../../../../org/apache/commons/math3/optim/linear/NoFeasibleSolutionException.html" title="class in org.apache.commons.math3.optim.linear">NoFeasibleSolutionException</a></code></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SimplexSolver.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/Relationship.html" title="enum in org.apache.commons.math3.optim.linear"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/commons/math3/optim/linear/SolutionCallback.html" title="class in org.apache.commons.math3.optim.linear"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/commons/math3/optim/linear/SimplexSolver.html" target="_top">Frames</a></li>
<li><a href="SimplexSolver.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_org.apache.commons.math3.optim.BaseOptimizer">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2003&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>