#include <SequentialSearch.hpp>
Public Member Functions | |
Constructors and Destructors | |
SequentialSearch (const SequentialSearchOptions &options) | |
SequentialSearch (const UUID &uuid, const UUID &versionUUID, const std::string &displayName, const std::string &description, bool complete, bool failed, int iter, const SequentialSearchOptions &options) | |
Constructor provided for deserialization; not for general use. More... | |
virtual | ~SequentialSearch () |
Getters and Queries | |
SequentialSearchOptions | sequentialSearchOptions () const |
Actions | |
std::vector < OptimizationDataPoint > | getMinimumCurve (unsigned i, Analysis &analysis) const |
Get the "swoosh" curve relative to objective function i, i == 0, or i == 1. More... | |
std::vector < OptimizationDataPoint > | getParetoFront (Analysis &analysis) const |
Get the Pareto front (set of non-dominated points). More... | |
std::vector< std::vector < QVariant > > | getCandidateCombinations (const DataPoint &dataPoint) const |
Returns all "one-off" perturbations of dataPoint. More... | |
Public Member Functions inherited from openstudio::analysis::OpenStudioAlgorithm | |
virtual | ~OpenStudioAlgorithm () |
int | createNextIteration (Analysis &analysis) |
Create the next iteration of work for analysis in the form of constructed but incomplete DataPoints . More... | |
Public Member Functions inherited from openstudio::analysis::Algorithm | |
virtual | ~Algorithm () |
bool | isComplete () const |
Returns true if the Algorithm ran to completion. More... | |
bool | failed () const |
Returns true if the Algorithm ran to completion, but failed in some way. More... | |
int | iter () const |
Returns the iteration number, which is incremented during the process of running an Analysis. More... | |
AlgorithmOptions | options () const |
AlgorithmOptions shares its data on assignment and copy construction. More... | |
bool | isCompatibleProblemType (const Problem &problem) const |
Returns true if Algorithm can operate on problem. More... | |
Public Member Functions inherited from openstudio::analysis::AnalysisObject | |
virtual | ~AnalysisObject () |
AnalysisObject | clone () const |
Deep copy. More... | |
std::string | name () const |
std::string | displayName () const |
std::string | description () const |
openstudio::UUID | uuid () const |
openstudio::UUID | versionUUID () const |
bool | isDirty () const |
Returns true if this object has been changed since its dirty flag was last cleared. More... | |
bool | operator== (const AnalysisObject &other) const |
Compare impls. More... | |
bool | operator!= (const AnalysisObject &other) const |
bool | uuidEqual (const AnalysisObject &other) const |
bool | uuidAndVersionEqual (const AnalysisObject &other) const |
boost::optional< AnalysisObject > | parent () const |
void | setName (const std::string &newName) |
void | setDisplayName (const std::string &newDisplayName) |
void | setDescription (const std::string &newDescription) |
bool | clearDirtyFlag () |
Call this method to reset the dirty flag of this object and all its children. More... | |
bool | connect (const char *signal, const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection) const |
Connect signal from this AnalysisObject to slot on receiver. More... | |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *slot=nullptr) const |
template<typename T > | |
T | cast () const |
Cast to type T. More... | |
template<typename T > | |
boost::optional< T > | optionalCast () const |
Cast to boost::optional<T>. More... | |
Static Public Member Functions | |
static std::string | standardName () |
Related Functions | |
(Note that these are not member functions.) | |
typedef boost::optional < SequentialSearch > | OptionalSequentialSearch |
typedef std::vector < SequentialSearch > | SequentialSearchVector |
Related Functions inherited from openstudio::analysis::OpenStudioAlgorithm | |
typedef std::vector < OpenStudioAlgorithm > | OpenStudioAlgorithmVector |
typedef boost::optional < OpenStudioAlgorithm > | OptionalOpenStudioAlgorithm |
Related Functions inherited from openstudio::analysis::Algorithm | |
typedef std::vector< Algorithm > | AlgorithmVector |
typedef boost::optional < Algorithm > | OptionalAlgorithm |
Related Functions inherited from openstudio::analysis::AnalysisObject | |
typedef std::vector < AnalysisObject > | AnalysisObjectVector |
typedef boost::optional < AnalysisObject > | OptionalAnalysisObject |
Additional Inherited Members | |
Protected Member Functions inherited from openstudio::analysis::Algorithm | |
void | reset () |
Resets algorithm back to its initial state. More... | |
void | resetComplete () |
SequentialSearch is an OpenStudioAlgorithm that can be used to solve OptimizationProblems with two objective functions and discrete variables.
It is a greedy heuristic method that traces out the minimum curve of one objective function while constantly improving the other objective.
openstudio::analysis::SequentialSearch::SequentialSearch | ( | const SequentialSearchOptions & | options | ) |
openstudio::analysis::SequentialSearch::SequentialSearch | ( | const UUID & | uuid, |
const UUID & | versionUUID, | ||
const std::string & | displayName, | ||
const std::string & | description, | ||
bool | complete, | ||
bool | failed, | ||
int | iter, | ||
const SequentialSearchOptions & | options | ||
) |
Constructor provided for deserialization; not for general use.
|
inlinevirtual |
std::vector< std::vector<QVariant> > openstudio::analysis::SequentialSearch::getCandidateCombinations | ( | const DataPoint & | dataPoint | ) | const |
Returns all "one-off" perturbations of dataPoint.
Used by createNextIteration to generate new OptimizationDataPoints (which are only added to the Analysis if they have not yet been run). This constitutes "exploration" of a dataPoint. The "one-off" perturbations are constructed by starting with dataPoint.variableValues() each time, and then making a single valid change. Thus, each candidate combination will be the same as dataPoint.variableValues(), except for the value of one variable, which may be set to any of its other valid values.
std::vector<OptimizationDataPoint> openstudio::analysis::SequentialSearch::getMinimumCurve | ( | unsigned | i, |
Analysis & | analysis | ||
) | const |
Get the "swoosh" curve relative to objective function i, i == 0, or i == 1.
Throws an openstudio::Exception if i is not equal to 0 or 1, or if analysis.algorithm() != *this. Recalculates the curve, so changes DataPoint tags. This is the method used by createNextIteration to determine which DataPoint should be explored next. If the algorithm has not finished running, the return vector .back() will not have the "explored" tag, but all other returned points will.
std::vector<OptimizationDataPoint> openstudio::analysis::SequentialSearch::getParetoFront | ( | Analysis & | analysis | ) | const |
Get the Pareto front (set of non-dominated points).
Throws an openstudio::Exception if analysis.algorithm() != *this. May change DataPoint tags. This algorithm is independent of getMinimumCurve.
SequentialSearchOptions openstudio::analysis::SequentialSearch::sequentialSearchOptions | ( | ) | const |
|
static |
|
related |
|
related |