iterator
Class TwoStageOptimizer<T extends OptimizationProblem,V extends AbstractOptimizer<? extends BoundConstrainedProblem>>

java.lang.Object
  extended by iterator.AbstractIterator
      extended by iterator.AbstractOptimizer<T>
          extended by iterator.AbstractPointOptimizer<T>
              extended by iterator.TwoStageOptimizer<T,V>
Type Parameters:
T - the type of optimization problem being solved.
All Implemented Interfaces:
DataListener, InitialSamplesSettable, Iterable, LoggableIterator
Direct Known Subclasses:
TwoStageRiskPerfOptimizer

public class TwoStageOptimizer<T extends OptimizationProblem,V extends AbstractOptimizer<? extends BoundConstrainedProblem>>
extends AbstractPointOptimizer<T>
implements InitialSamplesSettable

An optimization algorithm that proceeds by first building approximation models of the objective and constraints, and then solving an auxiliary optimization problem whose objective is to find the point that holds the most promise.

Author:
dgorur

Field Summary
 
Fields inherited from class iterator.AbstractOptimizer
doubleFormat, funEvalCount, logWriter
 
Fields inherited from class iterator.AbstractIterator
diagnosticString, iter
 
Constructor Summary
TwoStageOptimizer()
           
 
Method Summary
protected  double[] computeNextPoint()
          Computes the next design to be evaluated.
 V getAuxiliaryOptimizer()
          Returns the auxiliary optimizer, which is typically some simple optimizer that can handle multi-modal functions, perhaps at the cost of function evaluations.
 int getInitialSampleCount()
          Returns the the number of initial samples.
 int getRandomSeed()
           
 void init()
          Initialization routine
 cern.colt.matrix.DoubleMatrix2D makeInitialSamples(int sampleCount)
          Makes the desired number of initial samples.
 void setAuxiliaryOptimizer(V auxiliaryOptimizer)
          Sets the auxiliary optimizer.
 void setInitialSampleCount(int initialSampleCount)
          Sets the number of initial samples.
 void setInitialSamples(DataBlock block)
          Sets the given block of samples as the set of initial samples.
 void setInitialSamples(cern.colt.matrix.DoubleMatrix2D initialSamples)
           
 void setInitialSamples(cern.colt.matrix.DoubleMatrix2D x, cern.colt.matrix.DoubleMatrix2D y)
          Sets the initial samples as per the given inputs and outputs.
 void setRandomSeed(int randomSeed)
          Sets the randomSeed.
protected  void updateDiagnostics()
          Provides access to the diagnosticString, so that the user has flexibility over multiple methods accessing this string at different times.
protected  void writeInitialRunLog()
           
 
Methods inherited from class iterator.AbstractPointOptimizer
singleIteration
 
Methods inherited from class iterator.AbstractOptimizer
clear, dataAdded, dataAdded, dataRemoved, dataRemoved, getDataHandler, getFunEvalCount, getLogFileName, getMaxFunEval, getProblem, isTerminated, iterate, setDataHandler, setFunEvalCount, setLogFileName, setMaxFunEval, setProblem
 
Methods inherited from class iterator.AbstractIterator
isVerbose, printDiagnostics, setVerbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoStageOptimizer

public TwoStageOptimizer()
Method Detail

getAuxiliaryOptimizer

public V getAuxiliaryOptimizer()
Returns the auxiliary optimizer, which is typically some simple optimizer that can handle multi-modal functions, perhaps at the cost of function evaluations.

Returns:
the auxiliary optimizer.

getInitialSampleCount

public int getInitialSampleCount()
Returns the the number of initial samples.

Returns:
the number of initial samples.

getRandomSeed

public int getRandomSeed()

init

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

Specified by:
init in interface Iterable
Overrides:
init in class AbstractOptimizer<T extends OptimizationProblem>

makeInitialSamples

public cern.colt.matrix.DoubleMatrix2D makeInitialSamples(int sampleCount)
Description copied from interface: InitialSamplesSettable
Makes the desired number of initial samples.

Specified by:
makeInitialSamples in interface InitialSamplesSettable
Returns:
a matrix containing the x-values of the desired number of initial samples.

setAuxiliaryOptimizer

public void setAuxiliaryOptimizer(V auxiliaryOptimizer)
Sets the auxiliary optimizer.

Parameters:
auxiliaryOptimizer - the given auxiliary optimizer.

setInitialSampleCount

public void setInitialSampleCount(int initialSampleCount)
Sets the number of initial samples.

Parameters:
initialSampleCount - the given number of initial samples.

setInitialSamples

public void setInitialSamples(DataBlock block)
Description copied from interface: InitialSamplesSettable
Sets the given block of samples as the set of initial samples. Note: this block contains inputs and outputs.

Specified by:
setInitialSamples in interface InitialSamplesSettable
Parameters:
block - the given DataBlock.

setInitialSamples

public void setInitialSamples(cern.colt.matrix.DoubleMatrix2D initialSamples)
Specified by:
setInitialSamples in interface InitialSamplesSettable
Parameters:
initialSamples - initial matrix of points, stored row-wise.

setInitialSamples

public void setInitialSamples(cern.colt.matrix.DoubleMatrix2D x,
                              cern.colt.matrix.DoubleMatrix2D y)
Description copied from interface: InitialSamplesSettable
Sets the initial samples as per the given inputs and outputs.

Specified by:
setInitialSamples in interface InitialSamplesSettable
Parameters:
x - the given set of inputs.
y - the given set of outputs.

setRandomSeed

public void setRandomSeed(int randomSeed)
Description copied from interface: InitialSamplesSettable
Sets the randomSeed.

Specified by:
setRandomSeed in interface InitialSamplesSettable
Parameters:
randomSeed - the given randomSeed.

computeNextPoint

protected double[] computeNextPoint()
Description copied from class: AbstractPointOptimizer
Computes the next design to be evaluated.

Specified by:
computeNextPoint in class AbstractPointOptimizer<T extends OptimizationProblem>
Returns:
the next design to be evaluated.

updateDiagnostics

protected void updateDiagnostics()
Description copied from class: AbstractIterator
Provides access to the diagnosticString, so that the user has flexibility over multiple methods accessing this string at different times.

Overrides:
updateDiagnostics in class AbstractOptimizer<T extends OptimizationProblem>

writeInitialRunLog

protected void writeInitialRunLog()
Overrides:
writeInitialRunLog in class AbstractOptimizer<T extends OptimizationProblem>