humoto
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Attributes | Private Attributes | List of all members
humoto::wpg04::MPCParameters Class Referenceabstract

Detailed Description

Parameters of an MPC problem. [set_parameters_mpc.m].

Definition at line 80 of file common.h.

#include <common.h>

Inheritance diagram for humoto::wpg04::MPCParameters:
Inheritance graph

Public Member Functions

 MPCParameters (const std::size_t preview_horizon_len=16, const std::size_t sampling_time_ms=100, const std::size_t subsampling_time_ms=100, const std::size_t tds_sampling_time_ms=100)
 Constructor. More...
 
double getSubsamplingTime () const
 getSubsamplingTime More...
 
void readConfig (t_Reader &reader, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (t_Reader &reader, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (t_Reader &reader, const char *node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (const std::string &file_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (const std::string &file_name, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (const std::string &file_name, const char *node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readNestedConfig (t_Reader &reader, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read nested configuration node. More...
 
void setDefaults ()
 Initialize to default values. More...
 
void writeConfig (t_Writer &writer) const
 Write configuration. More...
 
void writeConfig (t_Writer &writer, const std::string &node_name) const
 Write configuration. More...
 
void writeConfig (const std::string &file_name) const
 Write configuration. More...
 
void writeConfig (const std::string &file_name, const std::string &node_name) const
 Write configuration. More...
 
void writeNestedConfig (t_Writer &writer) const
 Write nested configuration node. More...
 
void writeNestedConfig (t_Writer &writer, const std::string &node_name) const
 Write nested configuration node. More...
 

Public Attributes

std::size_t preview_horizon_length_
 Length of the preview horizon (N) More...
 
std::size_t sampling_time_ms_
 Sampling time in milliseconds (T_ms) More...
 
std::size_t subsampling_time_ms_
 Subsampling time in milliseconds (Ts_ms) More...
 
std::size_t tds_sampling_time_ms_
 Sampling time of a transitional double support in milliseconds (Ttds_ms) More...
 

Protected Member Functions

void finalize ()
 Compute some derived variables. More...
 
virtual const std::string & getConfigSectionID () const=0
 Return the default name of a configuration node corresponding to this class. More...
 
virtual std::size_t getNumberOfEntries () const=0
 Get number of entries in the corresponding configuration node. More...
 

Static Protected Attributes

static const bool default_crash_on_missing_entry_
 

Private Attributes

double sampling_time_
 Sampling time in seconds (T) More...
 
std::size_t subsamples_num_
 Number of subsamples per sample (TN) More...
 
double subsampling_time_
 Subsampling time in seconds (Ts) More...
 
double tds_sampling_time_
 Sampling time of a transitional double support in seconds (Ttds) More...
 
std::size_t tds_subsamples_num_
 Number of subsamples per doubles support sample (TN_tds) More...
 

Constructor & Destructor Documentation

◆ MPCParameters()

humoto::wpg04::MPCParameters::MPCParameters ( const std::size_t  preview_horizon_len = 16,
const std::size_t  sampling_time_ms = 100,
const std::size_t  subsampling_time_ms = 100,
const std::size_t  tds_sampling_time_ms = 100 
)
inline

Constructor.

Parameters
[in]preview_horizon_lenLength of the preview horizon
[in]sampling_time_msSampling time in milliseconds
[in]subsampling_time_msSubsampling time in milliseconds
[in]tds_sampling_time_msSampling time of a transitional double support in milliseconds

Definition at line 180 of file common.h.

Member Function Documentation

◆ finalize()

void humoto::wpg04::MPCParameters::finalize ( )
inlineprotectedvirtual

Compute some derived variables.

Reimplemented from humoto::config::CommonConfigurableBase< true >.

Definition at line 114 of file common.h.

◆ getConfigSectionID()

virtual const std::string& humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::getConfigSectionID ( ) const
protectedpure virtualinherited

Return the default name of a configuration node corresponding to this class.

Returns
the name
Attention
Implementation of this method is added automatically upon inclusion of define_accessors.h if HUMOTO_CONFIG_SECTION_ID is defined.

Implemented in humoto::TaskBase.

◆ getNumberOfEntries()

virtual std::size_t humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::getNumberOfEntries ( ) const
protectedpure virtualinherited

Get number of entries in the corresponding configuration node.

Returns
number of entries

Implemented in humoto::ConfigurableOptimizationProblem.

◆ getSubsamplingTime()

double humoto::wpg04::MPCParameters::getSubsamplingTime ( ) const
inline

getSubsamplingTime

Returns
subsampling time

Definition at line 199 of file common.h.

◆ readConfig() [1/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry

Definition at line 167 of file config.h.

◆ readConfig() [2/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty

Definition at line 183 of file config.h.

◆ readConfig() [3/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const char *  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty
Note
Intercept implicit conversion of a pointer to bool.

Definition at line 202 of file config.h.

◆ readConfig() [4/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]crash_on_missing_entry

Definition at line 218 of file config.h.

◆ readConfig() [5/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]node_namenode name, the default is used if empty
[in]crash_on_missing_entry

Definition at line 235 of file config.h.

◆ readConfig() [6/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const char *  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty
Note
Intercept implicit conversion of a pointer to bool.

Definition at line 255 of file config.h.

◆ readNestedConfig()

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readNestedConfig ( t_Reader &  reader,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read nested configuration node.

Parameters
[in]reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty

Definition at line 132 of file config.h.

◆ setDefaults()

void humoto::wpg04::MPCParameters::setDefaults ( )
inlinevirtual

Initialize to default values.

Implements humoto::config::CommonConfigurableBase< true >.

Definition at line 161 of file common.h.

◆ writeConfig() [1/4]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( t_Writer &  writer) const
inlineinherited

Write configuration.

Parameters
[in,out]writerconfiguration writer

Definition at line 300 of file config.h.

◆ writeConfig() [2/4]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( t_Writer &  writer,
const std::string &  node_name 
) const
inlineinherited

Write configuration.

Parameters
[in,out]writerconfiguration writer
[in]node_namenode name, the default is used if empty

Definition at line 313 of file config.h.

◆ writeConfig() [3/4]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( const std::string &  file_name) const
inlineinherited

Write configuration.

Parameters
[in]file_namefile name

Definition at line 328 of file config.h.

◆ writeConfig() [4/4]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( const std::string &  file_name,
const std::string &  node_name 
) const
inlineinherited

Write configuration.

Parameters
[in]file_namefile name
[in]node_namenode name, the default is used if empty

Definition at line 342 of file config.h.

◆ writeNestedConfig() [1/2]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeNestedConfig ( t_Writer &  writer) const
inlineinherited

Write nested configuration node.

Parameters
[in,out]writerconfiguration writer

Definition at line 272 of file config.h.

◆ writeNestedConfig() [2/2]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeNestedConfig ( t_Writer &  writer,
const std::string &  node_name 
) const
inlineinherited

Write nested configuration node.

Parameters
[in,out]writerconfiguration writer
[in]node_namenode name, the default is used if empty

Definition at line 285 of file config.h.

Member Data Documentation

◆ default_crash_on_missing_entry_

const bool humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::default_crash_on_missing_entry_
staticprotectedinherited

Definition at line 67 of file config.h.

◆ preview_horizon_length_

std::size_t humoto::wpg04::MPCParameters::preview_horizon_length_

Length of the preview horizon (N)

Definition at line 144 of file common.h.

◆ sampling_time_

double humoto::wpg04::MPCParameters::sampling_time_
private

Sampling time in seconds (T)

Definition at line 100 of file common.h.

◆ sampling_time_ms_

std::size_t humoto::wpg04::MPCParameters::sampling_time_ms_

Sampling time in milliseconds (T_ms)

Definition at line 147 of file common.h.

◆ subsamples_num_

std::size_t humoto::wpg04::MPCParameters::subsamples_num_
private

Number of subsamples per sample (TN)

Definition at line 94 of file common.h.

◆ subsampling_time_

double humoto::wpg04::MPCParameters::subsampling_time_
private

Subsampling time in seconds (Ts)

Definition at line 103 of file common.h.

◆ subsampling_time_ms_

std::size_t humoto::wpg04::MPCParameters::subsampling_time_ms_

Subsampling time in milliseconds (Ts_ms)

Definition at line 150 of file common.h.

◆ tds_sampling_time_

double humoto::wpg04::MPCParameters::tds_sampling_time_
private

Sampling time of a transitional double support in seconds (Ttds)

Definition at line 107 of file common.h.

◆ tds_sampling_time_ms_

std::size_t humoto::wpg04::MPCParameters::tds_sampling_time_ms_

Sampling time of a transitional double support in milliseconds (Ttds_ms)

Definition at line 154 of file common.h.

◆ tds_subsamples_num_

std::size_t humoto::wpg04::MPCParameters::tds_subsamples_num_
private

Number of subsamples per doubles support sample (TN_tds)

Definition at line 97 of file common.h.


The documentation for this class was generated from the following file: