org.apache.commons.math.optimization.linear
Class SimplexSolver

java.lang.Object
  extended by org.apache.commons.math.optimization.linear.AbstractLinearOptimizer
      extended by org.apache.commons.math.optimization.linear.SimplexSolver
All Implemented Interfaces:
LinearOptimizer

public class SimplexSolver
extends AbstractLinearOptimizer

Solves a linear problem using the Two-Phase Simplex Method.

Since:
2.0

Field Summary
 
Fields inherited from class org.apache.commons.math.optimization.linear.AbstractLinearOptimizer
DEFAULT_MAX_ITERATIONS
 
Constructor Summary
SimplexSolver()
          Build a simplex solver with default settings.
SimplexSolver(double epsilon)
          Build a simplex solver with a specified accepted amount of error
 
Method Summary
 RealPointValuePair doOptimize()
          Perform the bulk of optimization algorithm.
 
Methods inherited from class org.apache.commons.math.optimization.linear.AbstractLinearOptimizer
getIterations, getMaxIterations, optimize, setMaxIterations
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplexSolver

public SimplexSolver()
Build a simplex solver with default settings.


SimplexSolver

public SimplexSolver(double epsilon)
Build a simplex solver with a specified accepted amount of error

Parameters:
epsilon - the amount of error to accept in floating point comparisons
Method Detail

doOptimize

public RealPointValuePair doOptimize()
                              throws OptimizationException
Perform the bulk of optimization algorithm.

Returns:
the point/value pair giving the optimal value for objective function
Throws:
OptimizationException - if no solution fulfilling the constraints can be found in the allowed number of iterations


jHepWork 3.1 ©