drasys.or.opt.lp
Class DenseLPBase

java.lang.Object
  |
  +--drasys.or.opt.lp.DenseLPBase
Direct Known Subclasses:
DenseSimplex

public abstract class DenseLPBase
extends java.lang.Object
implements LinearProgrammingI, java.io.Serializable

The interface used by all algorithms to access linear programming models.

See Also:
Serialized Form

Field Summary
protected  boolean _autoScale
           
protected  double[][] _cof
           
protected  double _fuzz
           
protected  double _maxAbsVal
           
protected  int _maxIt
           
protected  double _maxRange
           
protected  int _maxRows
           
protected  double _minAbsVal
           
protected  double _minRange
           
protected  int _nonZeroCnt
           
protected  double[] _obj
           
protected  double[] _rhs
           
protected  int _sizeOfColumns
           
protected  int _sizeOfRows
           
protected  boolean _solved
           
protected  byte[] _typ
           
 
Fields inherited from interface drasys.or.opt.lp.LinearProgrammingI
EQUAL, GREATER, LESS
 
Constructor Summary
DenseLPBase()
           
DenseLPBase(int maxRows, int sizeOfColumns)
           
 
Method Summary
 void addConstraint(MatrixI coefficients, VectorI rightHandSides, byte[] type)
          Adds a set of constraints to the model.
 void addConstraint(VectorI coefficients, double rightHandSide, byte type)
          Adds a single constraint to the model.
 void ensureCapacity(int maxRows, int sizeOfColumns)
          Ensures the algorithm has room to hold this many rows.
 double getMaxAbsoluteValue()
          Gets largest absolute value in the equations.
 double getMinAbsoluteValue()
          Gets smallest absolute value in the equations.
 double getRangeMax()
          Gets smallest absolute value the algorithm will accept.
 double getRangeMin()
          Gets smallest absolute value the algorithm will accept.
 void removeAllElements()
          Removes all of the coefficients from the algorithm's data structures.
 void resize(int maxRows, int sizeOfColumns)
          Removes all the coefficients and changes the size of the model the algorithm can solve.
 void setAutomaticScaling(boolean automaticallyScale)
          Enables automatic scaling.
 void setEqualityFuzz(double fuzz)
          Sets the value that is used to relax equailty tests.
 void setMaxIterations(int maxIterations)
          Set the maximum number of iterations.
 void setObjective(VectorI objective)
          Sets the objective function for the model.
 void setRange(double minAbsoluteValue, double maxAbsoluteValue)
          Sets smallest and largest absolute value the algorithm will accept.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_maxRows

protected int _maxRows

_sizeOfRows

protected int _sizeOfRows

_sizeOfColumns

protected int _sizeOfColumns

_maxIt

protected int _maxIt

_nonZeroCnt

protected int _nonZeroCnt

_fuzz

protected double _fuzz

_minRange

protected double _minRange

_maxRange

protected double _maxRange

_minAbsVal

protected double _minAbsVal

_maxAbsVal

protected double _maxAbsVal

_typ

protected byte[] _typ

_obj

protected double[] _obj

_rhs

protected double[] _rhs

_cof

protected double[][] _cof

_solved

protected boolean _solved

_autoScale

protected boolean _autoScale
Constructor Detail

DenseLPBase

public DenseLPBase()

DenseLPBase

public DenseLPBase(int maxRows,
                   int sizeOfColumns)
Method Detail

removeAllElements

public void removeAllElements()
Removes all of the coefficients from the algorithm's data structures.
Specified by:
removeAllElements in interface LinearProgrammingI

resize

public void resize(int maxRows,
                   int sizeOfColumns)
Removes all the coefficients and changes the size of the model the algorithm can solve.
Specified by:
resize in interface LinearProgrammingI

setEqualityFuzz

public void setEqualityFuzz(double fuzz)
Sets the value that is used to relax equailty tests. This value may be updated each time a new constrtaint is added, so set this after the last constraint.
Specified by:
setEqualityFuzz in interface LinearProgrammingI

setMaxIterations

public void setMaxIterations(int maxIterations)
Set the maximum number of iterations.
Specified by:
setMaxIterations in interface LinearProgrammingI

setRange

public void setRange(double minAbsoluteValue,
                     double maxAbsoluteValue)
Sets smallest and largest absolute value the algorithm will accept.
Specified by:
setRange in interface LinearProgrammingI
Throws:
LPError - if the arguments are less then zero or maxAbsoluteValue <= minAbsoluteValue.

getRangeMin

public double getRangeMin()
Gets smallest absolute value the algorithm will accept.
Specified by:
getRangeMin in interface LinearProgrammingI

getRangeMax

public double getRangeMax()
Gets smallest absolute value the algorithm will accept.
Specified by:
getRangeMax in interface LinearProgrammingI

getMinAbsoluteValue

public double getMinAbsoluteValue()
Gets smallest absolute value in the equations.
Specified by:
getMinAbsoluteValue in interface LinearProgrammingI
Throws:
LPError - if there are no constraints

getMaxAbsoluteValue

public double getMaxAbsoluteValue()
Gets largest absolute value in the equations.
Specified by:
getMaxAbsoluteValue in interface LinearProgrammingI
Throws:
LPError - if there are no constraints

setAutomaticScaling

public void setAutomaticScaling(boolean automaticallyScale)
Enables automatic scaling. Automatic scaling is disabled by default.
Specified by:
setAutomaticScaling in interface LinearProgrammingI

ensureCapacity

public void ensureCapacity(int maxRows,
                           int sizeOfColumns)
Ensures the algorithm has room to hold this many rows.
Specified by:
ensureCapacity in interface LinearProgrammingI

addConstraint

public void addConstraint(VectorI coefficients,
                          double rightHandSide,
                          byte type)
Adds a single constraint to the model.
Specified by:
addConstraint in interface LinearProgrammingI

addConstraint

public void addConstraint(MatrixI coefficients,
                          VectorI rightHandSides,
                          byte[] type)
Adds a set of constraints to the model.
Specified by:
addConstraint in interface LinearProgrammingI

setObjective

public void setObjective(VectorI objective)
Sets the objective function for the model.
Specified by:
setObjective in interface LinearProgrammingI


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com