iterator
Class TwoStageAlgoBuilder<T extends OptimizationProblem,V extends BoundConstrainedDiviner,W extends AbstractOptimizer<BoundConstrainedProblem>>

java.lang.Object
  extended by iterator.AbstractIterator
      extended by iterator.AbstractOptimizer<T>
          extended by iterator.AbstractPointOptimizer<T>
              extended by iterator.TwoStageAlgoBuilder<T,V,W>
All Implemented Interfaces:
DataListener, Iterable, LoggableIterator, RepeatableLoggableIterator
Direct Known Subclasses:
ConstrainedTwoStageAlgoBuilder, ImprovementAlgoBuilder, PenaltyTwoStageAlgoBuilder

public class TwoStageAlgoBuilder<T extends OptimizationProblem,V extends BoundConstrainedDiviner,W extends AbstractOptimizer<BoundConstrainedProblem>>
extends AbstractPointOptimizer<T>
implements RepeatableLoggableIterator

Sets up a two-stage optimization algorithm and solves it. Might have multifidelity problems, constrained problems, various kinds of Diviners, etc., but the overall algorithm is the same. Uses the Java 'builder' pattern, which is standard for setting up a complex object and then using it. The best way to instantiate and use this class is by using the spring framework.

Author:
dgorur

Field Summary
 
Fields inherited from class iterator.AbstractOptimizer
doubleFormat, funEvalCount, logWriter
 
Fields inherited from class iterator.AbstractIterator
diagnosticString, iter
 
Constructor Summary
TwoStageAlgoBuilder()
           
 
Method Summary
protected  double[] computeNextPoint()
          Computes the next design to be evaluated.
 java.util.ArrayList<ApproxModel> getApproxModels()
          Returns the list of approximation models.
 W getAuxOptimizer()
          Returns the auxiliary optimizer.
 BoundConstrainedProblem getAuxProblem()
          Returns the auxiliary problem.
 int getCalibrationInterval()
           
 V getDiviner()
          Returns the diviner.
protected  int getFunEvalCount()
          Returns the number of function evaluations.
 TwoStageOptimizer<T,W> getMainOptimizer()
          Returns the main optimizer.
 T getProblem()
          Returns the main problem.
 int getRandomSeed()
          Returns the random seed.
 void init()
          Initialization routine
protected  BoundConstrainedProblem makeAuxProblem()
          Makes the auxiliary optimization problem.
protected  void printDiagnostics()
          Prints diagnostic output.
 void setApproxModels(java.util.ArrayList<ApproxModel> approxModels)
          Sets the list of approximation models.
 void setAuxOptimizer(W auxOptimizer)
          Sets the auxiliary optimizer.
 void setAuxProblem(BoundConstrainedProblem auxProblem)
          Sets the auxiliary optimization problem.
 void setCalibrationInterval(int calibrationInterval)
           
 void setDiviner(V diviner)
          Sets the diviner.
protected  void setFunEvalCount(int funEvalCount)
          Sets the number of function evaluations.
 void setMainOptimizer(TwoStageOptimizer<T,W> mainOptimizer)
          Sets the main optimizer.
 void setProblem(T mainProblem)
          Sets the problem.
 void setRandomSeed(int randomSeed)
          Sets the random seed.
protected  void update()
          Any updates that need to be performed at each iteration are encapsulated in this routine.
 
Methods inherited from class iterator.AbstractPointOptimizer
singleIteration
 
Methods inherited from class iterator.AbstractOptimizer
clear, dataAdded, dataAdded, dataRemoved, dataRemoved, getDataHandler, getLogFileName, getMaxFunEval, isTerminated, iterate, setDataHandler, setLogFileName, setMaxFunEval, updateDiagnostics, writeInitialRunLog
 
Methods inherited from class iterator.AbstractIterator
isVerbose, setVerbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface iterator.LoggableIterator
getLogFileName, setLogFileName
 
Methods inherited from interface iterator.Iterable
isTerminated, iterate, singleIteration
 

Constructor Detail

TwoStageAlgoBuilder

public TwoStageAlgoBuilder()
Method Detail

getApproxModels

public java.util.ArrayList<ApproxModel> getApproxModels()
Returns the list of approximation models.

Returns:
the list of approximation models.

getAuxOptimizer

public W getAuxOptimizer()
Returns the auxiliary optimizer.

Returns:
the auxiliary optimizer.

getAuxProblem

public BoundConstrainedProblem getAuxProblem()
Returns the auxiliary problem.

Returns:
the auxiliary problem.

getCalibrationInterval

public int getCalibrationInterval()

getDiviner

public V getDiviner()
Returns the diviner.

Returns:
the diviner.

getMainOptimizer

public TwoStageOptimizer<T,W> getMainOptimizer()
Returns the main optimizer.

Returns:
the main optimizer.

getProblem

public T getProblem()
Returns the main problem.

Overrides:
getProblem in class AbstractOptimizer<T extends OptimizationProblem>
Returns:
the problem.

getRandomSeed

public int getRandomSeed()
Description copied from interface: RepeatableLoggableIterator
Returns the random seed.

Specified by:
getRandomSeed in interface RepeatableLoggableIterator
Returns:
the random seed.

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>

setApproxModels

public void setApproxModels(java.util.ArrayList<ApproxModel> approxModels)
Sets the list of approximation models.

Parameters:
approxModels - the given list of approximation models.

setAuxOptimizer

public void setAuxOptimizer(W auxOptimizer)
Sets the auxiliary optimizer.

Parameters:
auxOptimizer - the given auxiliary optimizer.

setAuxProblem

public void setAuxProblem(BoundConstrainedProblem auxProblem)
Sets the auxiliary optimization problem.

Parameters:
auxProblem - the given auxiliary optimization problem.

setCalibrationInterval

public void setCalibrationInterval(int calibrationInterval)

setDiviner

public void setDiviner(V diviner)
Sets the diviner.

Parameters:
diviner - the given diviner.

setMainOptimizer

public void setMainOptimizer(TwoStageOptimizer<T,W> mainOptimizer)
Sets the main optimizer.

Parameters:
mainOptimizer - the given main optimizer.

setProblem

public void setProblem(T mainProblem)
Sets the problem.

Overrides:
setProblem in class AbstractOptimizer<T extends OptimizationProblem>
Parameters:
mainProblem - the given problem.

setRandomSeed

public void setRandomSeed(int randomSeed)
Description copied from interface: RepeatableLoggableIterator
Sets the random seed.

Specified by:
setRandomSeed in interface RepeatableLoggableIterator
Parameters:
randomSeed - the given random seed.

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.

getFunEvalCount

protected int getFunEvalCount()
Description copied from class: AbstractOptimizer
Returns the number of function evaluations.

Overrides:
getFunEvalCount in class AbstractOptimizer<T extends OptimizationProblem>
Returns:
the number of function evaluations.

makeAuxProblem

protected BoundConstrainedProblem makeAuxProblem()
Makes the auxiliary optimization problem. This is typically a bound-constrained problem.

Returns:
the created auxiliary problem.

printDiagnostics

protected void printDiagnostics()
Description copied from class: AbstractIterator
Prints diagnostic output.

Overrides:
printDiagnostics in class AbstractIterator

setFunEvalCount

protected void setFunEvalCount(int funEvalCount)
Description copied from class: AbstractOptimizer
Sets the number of function evaluations.

Overrides:
setFunEvalCount in class AbstractOptimizer<T extends OptimizationProblem>
Parameters:
funEvalCount - the given number of evaluations.

update

protected void update()
Any updates that need to be performed at each iteration are encapsulated in this routine.