problem
Class BasicBoundConstrainedProblem

java.lang.Object
  extended by problem.BasicOptimizationProblem
      extended by problem.BasicBoundConstrainedProblem
All Implemented Interfaces:
BoundConstrainedProblem, OptimizationProblem
Direct Known Subclasses:
BasicInequalityConstrainedProblem, BasicMultiObjectiveProblem

public class BasicBoundConstrainedProblem
extends BasicOptimizationProblem
implements BoundConstrainedProblem

Basic implementation of methods in BoundConstrainedProblem. Note: Invoke the init() method before using.

Author:
dgorur

Field Summary
protected  cern.colt.list.DoubleArrayList constraintViolations
           
protected  double[] tmpArr
           
 
Fields inherited from class problem.BasicOptimizationProblem
formatter
 
Constructor Summary
BasicBoundConstrainedProblem()
          Default constructor.
BasicBoundConstrainedProblem(ScalarFunction objective)
          Constructs a BasicBoundConstrainedProblem using the given objective.
BasicBoundConstrainedProblem(ScalarFunction objective, Hypercube bounds)
          Constructs a BasicBoundConstrainedProblem using the given objective function and the given bounds.
 
Method Summary
protected  void addConstraintViolations()
          Adds bound constraint violation terms to the list of constraint violations.
protected  void computeConstraintViolations(double[] x)
          Computes the bound constraint violations at the given input
 Hypercube getBounds()
          Returns the bounds for this problem.
 double[] getConstraintViolations(double[] x)
          Returns the bound-constraint violations for a given input.
 void init()
          Initialization routine.
 DataPoint makeDataPoint(double[] x)
          Constructs and returns a DataPoint corresponding to a given input, containing the associated objective values and constraint violations.
protected  cern.colt.matrix.DoubleMatrix2D makeOutputs(cern.colt.matrix.DoubleMatrix2D X)
           
 void setBounds(Hypercube bounds)
          Sets the bounds for this problem.
 
Methods inherited from class problem.BasicOptimizationProblem
getInputDimension, getObjective, getOutputDimension, makeDataBlock, setInputDimension, setObjective, setOutputDimension, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface problem.OptimizationProblem
getInputDimension, getObjective, getOutputDimension, makeDataBlock, setObjective
 

Field Detail

constraintViolations

protected cern.colt.list.DoubleArrayList constraintViolations

tmpArr

protected double[] tmpArr
Constructor Detail

BasicBoundConstrainedProblem

public BasicBoundConstrainedProblem()
Default constructor. Creates an empty problem


BasicBoundConstrainedProblem

public BasicBoundConstrainedProblem(ScalarFunction objective)
Constructs a BasicBoundConstrainedProblem using the given objective.

Parameters:
objective - the given objective function.

BasicBoundConstrainedProblem

public BasicBoundConstrainedProblem(ScalarFunction objective,
                                    Hypercube bounds)
Constructs a BasicBoundConstrainedProblem using the given objective function and the given bounds.

Parameters:
objective - the given objective function.
bounds - the given bounds.
Method Detail

getBounds

public Hypercube getBounds()
Description copied from interface: OptimizationProblem
Returns the bounds for this problem.

Specified by:
getBounds in interface OptimizationProblem
Overrides:
getBounds in class BasicOptimizationProblem
Returns:
the bounds for this problem.

getConstraintViolations

public double[] getConstraintViolations(double[] x)
Description copied from interface: BoundConstrainedProblem
Returns the bound-constraint violations for a given input.

Specified by:
getConstraintViolations in interface BoundConstrainedProblem
Parameters:
x - the given input.
Returns:
an array of constraint violations.

init

public void init()
Description copied from interface: OptimizationProblem
Initialization routine.

Specified by:
init in interface OptimizationProblem
Overrides:
init in class BasicOptimizationProblem

makeDataPoint

public DataPoint makeDataPoint(double[] x)
Description copied from interface: OptimizationProblem
Constructs and returns a DataPoint corresponding to a given input, containing the associated objective values and constraint violations.

Specified by:
makeDataPoint in interface OptimizationProblem
Overrides:
makeDataPoint in class BasicOptimizationProblem
Parameters:
x - the given input.
Returns:
a DataPoint corresponding to this input.

setBounds

public void setBounds(Hypercube bounds)
Description copied from interface: BoundConstrainedProblem
Sets the bounds for this problem. Row 0 corresponds to the lower bound and row 1 corresponds to the upper bound.

Specified by:
setBounds in interface BoundConstrainedProblem
Parameters:
bounds - the given bounds.

addConstraintViolations

protected void addConstraintViolations()
Adds bound constraint violation terms to the list of constraint violations.


computeConstraintViolations

protected void computeConstraintViolations(double[] x)
Computes the bound constraint violations at the given input

Parameters:
x - the given input.

makeOutputs

protected cern.colt.matrix.DoubleMatrix2D makeOutputs(cern.colt.matrix.DoubleMatrix2D X)
Overrides:
makeOutputs in class BasicOptimizationProblem