NOMAD Source
Version 4.0.0 Beta
|
#include <NMAllReflective.hpp>
Public Member Functions | |
NMAllReflective (const Step *parentStep, const std::shared_ptr< EvalPoint > &frameCenter, const std::shared_ptr< MeshBase > &madsMesh) | |
Constructor. More... | |
![]() | |
NMIteration (const Step *parentStep, const std::shared_ptr< EvalPoint > &frameCenter, const size_t k, std::shared_ptr< MeshBase > madsMesh) | |
Constructor. More... | |
const std::shared_ptr< EvalPoint > | getFrameCenter () const override |
const std::shared_ptr< MeshBase > | getMesh () const override |
const std::shared_ptr< NMSimplexEvalPointSet > | getY (void) const |
![]() | |
Iteration (const Step *parentStep, const size_t k) | |
Constructor. More... | |
virtual | ~Iteration () |
Destructor. More... | |
size_t | getK () const |
Get iteration number. More... | |
void | incK () |
![]() | |
Step () | |
Constructor #1 for MainStep (no parent) More... | |
Step (const Step *parentStep, const std::shared_ptr< RunParameters > &runParams=nullptr, const std::shared_ptr< PbParameters > &pbParams=nullptr) | |
Constructor #2 for child step of a parent sharing the same stopReason. More... | |
Step (const Step *parentStep, std::shared_ptr< AllStopReasons > stopReasons, const std::shared_ptr< RunParameters > &runParams=nullptr, const std::shared_ptr< PbParameters > &pbParams=nullptr) | |
Constructor #3: for a child Step with a provided stopReason (such as an algorithm) More... | |
virtual | ~Step () |
Destructor. More... | |
const Step * | getParentStep () const |
Get the parent step. More... | |
virtual const std::string & | getName () const |
Get the name of this step. More... | |
void | setName (const std::string &name) |
Set the name of this step. More... | |
const std::shared_ptr< AllStopReasons > & | getAllStopReasons () const |
const std::shared_ptr< RunParameters > & | getRunParams () const |
const std::shared_ptr< PbParameters > & | getPbParams () const |
void | addCallback (const CallbackType &callbackType, const StepEndCbFunc &stepEndCbFunc) |
Set user callback. More... | |
void | addCallback (const CallbackType &callbackType, const HotRestartCbFunc &hotRestartCbFunc) |
void | AddOutputInfo (const std::string &s, bool isBlockStart, bool isBlockEnd) const |
display output More... | |
void | AddOutputInfo (const std::string &s, OutputLevel outputLevel=OutputLevel::LEVEL_INFO) const |
void | AddOutputError (const std::string &s) const |
void | AddOutputWarning (const std::string &s) const |
void | AddOutputVeryHigh (const std::string &s) const |
void | AddOutputHigh (const std::string &s) const |
void | AddOutputDebug (const std::string &s) const |
void | AddOutputInfo (OutputInfo outputInfo) const |
template<typename T > | |
T | getParentOfType (const bool stopAtAlgo=true) const |
Template function to get the parent of given type. More... | |
bool | isAnAlgorithm () const |
const Algorithm * | getRootAlgorithm () const |
Get Algorithm ancestor that has no Algorithm ancestor. More... | |
std::string | getAlgoName () const |
virtual std::string | getAlgoComment () const |
virtual void | setAlgoComment (const std::string &algoComment, const bool force=false) |
virtual void | resetPreviousAlgoComment (const bool force=false) |
const std::shared_ptr< MeshBase > | getIterationMesh () const |
const std::shared_ptr< EvalPoint > | getIterationFrameCenter () const |
const std::shared_ptr< Barrier > | getMegaIterationBarrier () const |
void | start () |
bool | run () |
void | end () |
virtual void | hotRestartOnUserInterrupt () |
Helper for hot restart functionalities. More... | |
void | debugShowCallStack () const |
For debugging purposes. Show the stack of Steps for this step. More... | |
![]() | |
NMIterationUtils (const Step *parentStep) | |
Constructor. More... | |
![]() | |
IterationUtils (const Step *parentStep) | |
Constructor. More... | |
virtual | ~IterationUtils () |
Destructor. More... | |
const SuccessType & | getSuccessType () const |
void | setSuccessType (const SuccessType &success) |
size_t | getTrialPointsCount () const |
const EvalPointSet & | getTrialPoints () const |
bool | insertTrialPoint (const EvalPoint &evalPoint) |
Insert a trial point. More... | |
void | clearTrialPoints (void) |
Clear trial points. More... | |
virtual bool | postProcessing (const EvalType &evalType) |
Helper for end task. More... | |
void | verifyPointsAreOnMesh (const std::string &name) const |
Helper for start task. More... | |
bool | snapPointToBoundsAndProjectOnMesh (Point &point, const ArrayOfDouble &lowerBound, const ArrayOfDouble &upperBound) |
Snap a given trial point to the bounds and project on mesh. More... | |
bool | evalTrialPoints (Step *step) |
Start evaluation of the trial points. More... | |
size_t | getNbEvalPointsThatNeededEval () const |
Get the number of evaluation points in the queue for evaluation. More... | |
void | updatePointsWithFrameCenter () |
Add current frame center as originator of each point in trialPoints. More... | |
Private Member Functions | |
void | startImp () override |
Implementation of start tasks. More... | |
bool | runImp () override |
Implementation of run task. Nothing to do. More... | |
void | endImp () override |
Implementation of run task. Nothing to do. More... | |
void | generateTrialPoints () override |
Generate the trial points of an algorithm iteration before evaluation. More... | |
Additional Inherited Members | |
![]() | |
static bool | getUserTerminate () |
Interruption call by user. More... | |
static void | setUserTerminate () |
Interruption requested. More... | |
static void | userInterrupt (int signalValue) |
Interruption call by user. More... | |
static void | debugSegFault (int signalValue) |
static bool | getUserInterrupt () |
static void | runCallback (CallbackType callbackType, const Step &step, bool &stop) |
Run user callback. More... | |
static void | runCallback (CallbackType callbackType, std::vector< std::string > ¶mLines) |
static void | disableWarnings () |
![]() | |
void | init () |
Utility for constructor. More... | |
virtual bool | isMainIteration () const |
![]() | |
void | verifyParentNotNull () |
Helper for constructors. More... | |
void | verifyGenerateAllPointsBeforeEval (const std::string &method, const bool expected) const |
Helper for validating steps depending on parameter GENERATE_ALL_POINTS_BEFORE_EVAL. More... | |
void | hotRestartBeginHelper () |
Helpers for hot restart, to be called at the start and end of any override. More... | |
void | hotRestartEndHelper () |
Helpers for hot restart, to be called at the start and end of any override. More... | |
![]() | |
void | updateYCharacteristics (void) |
Update the simplex diameter and volumes from NMIterationUtils::_nmY. More... | |
void | displayYInfo (void) const |
Display all the characteristics of a simplex. More... | |
int | getRankDZ () const |
void | setStopReason () const |
Set the stop reason according to NMIterationUtils::_currentStepType. More... | |
![]() | |
size_t | _k |
Iteration number. More... | |
![]() | |
const Step * | _parentStep |
The parent of this step. More... | |
std::string | _name |
The name of this step. More... | |
std::shared_ptr< AllStopReasons > | _stopReasons |
The stop reasons of an algorithm. More... | |
std::shared_ptr< RunParameters > | _runParams |
The run parameters that control a step. More... | |
std::shared_ptr< PbParameters > | _pbParams |
The problem parameters that control a step. More... | |
![]() | |
Double | _rankEps |
The precision for the rank calculation. Default is DEFAULT_EPSILON. More... | |
NMStepType | _currentStepType |
The step type (REFLECT, EXPAND, INSIDE_CONTRACTION, OUTSIDE_CONTRACTION) More... | |
std::shared_ptr< NMSimplexEvalPointSet > | _nmY |
The Nelder Mead simplex. More... | |
![]() | |
EvalPointSet | _trialPoints |
The points generated during the start(). Used for run() and postProcessing(). More... | |
size_t | _nbEvalPointsThatNeedEval |
const Step * | _parentStep |
SuccessType | _success |
Success type of this step. More... | |
Iteration * | _iterAncestor |
MegaIteration * | _megaIterAncestor |
![]() | |
static bool | _userInterrupt |
Interrupt NOMAD if Ctrl-C is pressed. More... | |
static bool | _userTerminate |
Terminate NOMAD if Ctrl-C is pressed again. More... | |
static StepEndCbFunc | _cbIterationEnd |
static StepEndCbFunc | _cbMegaIterationEnd |
static HotRestartCbFunc | _cbHotRestart |
static bool | _showWarnings |
Class to generate points for single pass NM on all reflective steps (REFLECT, EXPAND, INSIDE_CONTRACTION and OUTSIDE_CONTRACTION). The NMAllReflective::startImp function manages the creation process. The initial simplex is created by calling NMIteration::startImp(). The points are projected on mesh and updated with the information of the creating frame center.
Definition at line 59 of file NMAllReflective.hpp.
|
inlineexplicit |
Constructor.
parentStep | The parent step of this step – IN. |
frameCenter | The MADS frame center is used as simplex "center" – IN. |
madsMesh | Mads Mesh for trial point projection (can be null) – IN. |
Definition at line 68 of file NMAllReflective.hpp.
|
inlineoverrideprivatevirtual |
Implementation of run task. Nothing to do.
Reimplemented from Iteration.
Definition at line 95 of file NMAllReflective.hpp.
|
overrideprivatevirtual |
Generate the trial points of an algorithm iteration before evaluation.
Virtual function that algorithm iteration steps must implement
Implements IterationUtils.
|
inlineoverrideprivatevirtual |
Implementation of run task. Nothing to do.
Reimplemented from NMIteration.
Definition at line 92 of file NMAllReflective.hpp.
|
overrideprivatevirtual |
Implementation of start tasks.
Reimplemented from NMIteration.