NOMAD Source  Version 4.0.0 Beta
Subproblem Class Reference

Class to define an optimization subproblem. More...

#include <Subproblem.hpp>

Collaboration diagram for Subproblem:

Public Member Functions

 Subproblem (const std::shared_ptr< PbParameters > refPbParams, const Point &fullFixedVariable)
 Constructor. More...
 
virtual ~Subproblem ()
 Destructor. More...
 
const PointgetFixedVariable () const
 
const std::shared_ptr< PbParameters > & getPbParams () const
 

Private Member Functions

void init ()
 Helper for constructor calls to Subproblem::setupProblemParameters. More...
 
void setupProblemParameters ()
 Helper for constructor. More...
 
void resetVariableGroupsAgainstFixedVariables (ListOfVariableGroup &lvg, const Point &fixedVar) const
 Helper for setupProblemParameters() More...
 

Private Attributes

const Point _fixedVariable
 
size_t _dimension
 Dimension of the subproblem. More...
 
const std::shared_ptr< PbParameters_refPbParams
 
std::shared_ptr< PbParameters_subPbParams
 

Detailed Description

Class to define an optimization subproblem.

Subproblem of lesser dimension than the original problem

  • Sets up the new parameters
  • Keeps the necessary information to bridge the gap between subproblem and original problem

Definition at line 68 of file Subproblem.hpp.

Constructor & Destructor Documentation

◆ Subproblem()

Subproblem::Subproblem ( const std::shared_ptr< PbParameters refPbParams,
const Point fullFixedVariable 
)
inlineexplicit

Constructor.

Pb parameters will be recomputed as dimension has changed.

Definition at line 94 of file Subproblem.hpp.

96  : _fixedVariable(fullFixedVariable),
97  _dimension(refPbParams->getAttributeValue<size_t>("DIMENSION")),
98  _refPbParams(refPbParams),
99  _subPbParams(nullptr)
100  {
101  init();
102  }

◆ ~Subproblem()

virtual Subproblem::~Subproblem ( )
virtual

Destructor.

Member Function Documentation

◆ getFixedVariable()

const Point& Subproblem::getFixedVariable ( ) const
inline

Definition at line 109 of file Subproblem.hpp.

109 { return _fixedVariable; }

◆ getPbParams()

const std::shared_ptr<PbParameters>& Subproblem::getPbParams ( ) const
inline

Definition at line 110 of file Subproblem.hpp.

110 { return _subPbParams; }

◆ init()

void Subproblem::init ( )
private

Helper for constructor calls to Subproblem::setupProblemParameters.

◆ resetVariableGroupsAgainstFixedVariables()

void Subproblem::resetVariableGroupsAgainstFixedVariables ( ListOfVariableGroup lvg,
const Point fixedVar 
) const
private

◆ setupProblemParameters()

void Subproblem::setupProblemParameters ( )
private

Helper for constructor.

Construct the subproblem parameters (X0, LB, UB, mesh sizes, variable groups...) based on Subproblem::_fixedVariable

Note
If a new parameter with dimension (ex. a parameter of type ArrayOfDouble, Point, or Dimension) is added to the class PbParameters, this method will break. Currently supported parameters: X0 LOWER_BOUND UPPER_BOUND BB_INPUT_TYPE INITIAL_MESH_SIZE INITIAL_FRAME_SIZE MIN_MESH_SIZE MIN_FRAME_SIZE GRANULARITY VARIABLE_GROUP

Member Data Documentation

◆ _dimension

size_t Subproblem::_dimension
private

Dimension of the subproblem.

Definition at line 77 of file Subproblem.hpp.

◆ _fixedVariable

const Point Subproblem::_fixedVariable
private

The elements of this point that have defined values are fixed value "variables". The elements that are undefined are for true variables. This Point is always in full dimension.

Definition at line 76 of file Subproblem.hpp.

◆ _refPbParams

const std::shared_ptr<PbParameters> Subproblem::_refPbParams
private

Reference to the original problem's PbParameters.

Definition at line 82 of file Subproblem.hpp.

◆ _subPbParams

std::shared_ptr<PbParameters> Subproblem::_subPbParams
private

PbParameters converted to subdimension

Definition at line 87 of file Subproblem.hpp.


The documentation for this class was generated from the following file:
Subproblem::_fixedVariable
const Point _fixedVariable
Definition: Subproblem.hpp:76
Subproblem::_dimension
size_t _dimension
Dimension of the subproblem.
Definition: Subproblem.hpp:77
Subproblem::_subPbParams
std::shared_ptr< PbParameters > _subPbParams
Definition: Subproblem.hpp:87
Parameters::getAttributeValue
const T & getAttributeValue(const std::string &name, bool flagDefault=false) const
Definition: Parameters.hpp:495
Subproblem::init
void init()
Helper for constructor calls to Subproblem::setupProblemParameters.
Subproblem::_refPbParams
const std::shared_ptr< PbParameters > _refPbParams
Definition: Subproblem.hpp:82