humoto
Public Member Functions | Private Attributes | List of all members
humoto::ViolationsConstraints Class Reference

Detailed Description

Violations corresponding to Constraints class.

Definition at line 17 of file violations.h.

#include <violations.h>

Public Member Functions

void copyFrom (const ViolationsConstraints &other_violations, const Location &location)
 Set violations of a set of constraints. More...
 
void copyTo (const Location &location, const ViolationsConstraints &other_violations)
 Set violations of a set of constraints. More...
 
double getLower (const std::size_t constraint_index) const
 Access violation of a lower/upper bounds. More...
 
double getUpper (const std::size_t constraint_index) const
 Access violation of a lower/upper bounds. More...
 
void initialize (const ViolationsConstraints &other_violations, const Location &location)
 Initialize vector of violations. More...
 
void initialize (const std::size_t number_of_constraints)
 Initialize vector of violations. More...
 
void log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="") const
 Log violations. More...
 
double operator[] (const std::size_t constraint_index) const
 Access violation of a constraint (const) More...
 
void set (const std::size_t constraint_index, const double lower_bound_diff=0.0, const double upper_bound_diff=0.0)
 Set violation of a constraint. More...
 
void setZero ()
 Set all violations to zero. More...
 
void setZero (const Location &location)
 Set violations of a set of constraints to zero. More...
 
std::size_t size () const
 Size of the the vector of violations. More...
 

Private Attributes

Eigen::VectorXd data_
 
Eigen::VectorXd lower_
 
Eigen::VectorXd upper_
 

Member Function Documentation

◆ copyFrom()

void humoto::ViolationsConstraints::copyFrom ( const ViolationsConstraints other_violations,
const Location location 
)
inline

Set violations of a set of constraints.

Parameters
[in]other_violationsother vector of violations
[in]locationlocation in other vector of violations

Definition at line 163 of file violations.h.

◆ copyTo()

void humoto::ViolationsConstraints::copyTo ( const Location location,
const ViolationsConstraints other_violations 
)
inline

Set violations of a set of constraints.

Parameters
[in]locationlocation in this vector of violations
[in]other_violationsother vector of violations

Definition at line 146 of file violations.h.

◆ getLower()

double humoto::ViolationsConstraints::getLower ( const std::size_t  constraint_index) const
inline

Access violation of a lower/upper bounds.

Parameters
[in]constraint_index
Returns
reference to the violation

Definition at line 49 of file violations.h.

◆ getUpper()

double humoto::ViolationsConstraints::getUpper ( const std::size_t  constraint_index) const
inline

Access violation of a lower/upper bounds.

Parameters
[in]constraint_index
Returns
reference to the violation

Definition at line 58 of file violations.h.

◆ initialize() [1/2]

void humoto::ViolationsConstraints::initialize ( const ViolationsConstraints other_violations,
const Location location 
)
inline

Initialize vector of violations.

Parameters
[in]other_violationsother vector of violations
[in]locationlocation in other vector of violations

Definition at line 181 of file violations.h.

◆ initialize() [2/2]

void humoto::ViolationsConstraints::initialize ( const std::size_t  number_of_constraints)
inline

Initialize vector of violations.

Parameters
[in]number_of_constraintsnumber of constraints for each level

Definition at line 202 of file violations.h.

◆ log()

void humoto::ViolationsConstraints::log ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "" 
) const
inline

Log violations.

Parameters
[in,out]loggerlogger
[in]parentparent
[in]name

Definition at line 218 of file violations.h.

◆ operator[]()

double humoto::ViolationsConstraints::operator[] ( const std::size_t  constraint_index) const
inline

Access violation of a constraint (const)

Parameters
[in]constraint_index
Returns
reference to the violation

Definition at line 34 of file violations.h.

◆ set()

void humoto::ViolationsConstraints::set ( const std::size_t  constraint_index,
const double  lower_bound_diff = 0.0,
const double  upper_bound_diff = 0.0 
)
inline

Set violation of a constraint.

Parameters
[in]constraint_index
[in]lower_bound_diffA*x - lb (0.0 if lb is undefined)
[in]upper_bound_diffA*x - ub (0.0 if ub is undefined)

Definition at line 73 of file violations.h.

◆ setZero() [1/2]

void humoto::ViolationsConstraints::setZero ( )
inline

Set all violations to zero.

Definition at line 116 of file violations.h.

◆ setZero() [2/2]

void humoto::ViolationsConstraints::setZero ( const Location location)
inline

Set violations of a set of constraints to zero.

Parameters
[in]location

Definition at line 130 of file violations.h.

◆ size()

std::size_t humoto::ViolationsConstraints::size ( ) const
inline

Size of the the vector of violations.

Returns
Size of the the vector of violations.

Definition at line 106 of file violations.h.

Member Data Documentation

◆ data_

Eigen::VectorXd humoto::ViolationsConstraints::data_
private

Definition at line 20 of file violations.h.

◆ lower_

Eigen::VectorXd humoto::ViolationsConstraints::lower_
private

Definition at line 22 of file violations.h.

◆ upper_

Eigen::VectorXd humoto::ViolationsConstraints::upper_
private

Definition at line 23 of file violations.h.


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