[MATH-930] Add info the class javadoc wrt convergence criteria, add another ctor to only adjust the epsilon value.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1435544 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-01-19 13:40:09 +00:00
parent 08e227ad3a
commit 95650f86eb
1 changed files with 26 additions and 0 deletions

View File

@ -24,6 +24,23 @@ import org.apache.commons.math3.util.Precision;
/**
* Solves a linear problem using the "Two-Phase Simplex" method.
* <p>
* <b>Note:</b> Depending on the problem definition, the default convergence criteria
* may be too strict, resulting in {@link NoFeasibleSolutionException} or
* {@link TooManyIterationsException}. 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>
* </ul>
* <p>
* It may also be counter-productive to provide a too large value for {@link MaxIter}
* as parameter in the call of {@link #optimize(org.apache.commons.math3.optim.OptimizationData...)},
* as the {@link SimplexSolver} will use different strategies depending on the current iteration
* count. After half of the allowed max iterations has already been reached, the strategy to select
* pivot rows will change in order to break possible cycles due to degenerate problems.
*
* @version $Id$
* @since 2.0
@ -48,6 +65,15 @@ public class SimplexSolver extends LinearOptimizer {
this(DEFAULT_EPSILON, DEFAULT_ULPS);
}
/**
* Builds a simplex solver with a specified accepted amount of error.
*
* @param epsilon Amount of error to accept for algorithm convergence.
*/
public SimplexSolver(final double epsilon) {
this(epsilon, DEFAULT_ULPS);
}
/**
* Builds a simplex solver with a specified accepted amount of error.
*