Qontrol
Qontrol::Constraint::ConstraintSet< output > Class Template Reference

Handle all the constraints added to the problem. More...

#include <ConstraintSet.hpp>

Public Member Functions

 ConstraintSet (std::shared_ptr< Model::GenericModel > model_ptr)
 
template<template< Qontrol::ControlOutput output2 > class ControlInput>
std::shared_ptr< ControlInput< output > > add (std::string constraint_name)
 Add a custom constraint to the constraint set. More...
 
std::shared_ptr< Constraint::GenericConstraintadd (std::string constraint_name, int constraint_size)
 Add an implemented constaint in the constraint set. More...
 
std::vector< std::string >::iterator findConstraintIterator (std::string constraint_name)
 Find the iterator of a constraint in the constraint set given its name. More...
 
void remove (std::shared_ptr< Constraint::GenericConstraint > constraint_ptr)
 Remove a constraint from the constraint set. More...
 
void remove (std::string constraint_name)
 Remove a constraint from the constraint set given its name. More...
 
bool exist (std::string constraint_name)
 Check if a constraint existe in the constraint set. More...
 
int getConstraintIndex (std::string constraint_name)
 Get the index of a constraint in the constraint set given its name. More...
 
void update (double dt)
 Call the update function of all the constraints in the constraint set. More...
 
Constraint::GenericConstraint getConstraint (std::string constraint_name)
 
std::vector< std::shared_ptr< Constraint::GenericConstraint > > getConstraints ()
 Get the constraint set. More...
 

Detailed Description

template<Qontrol::ControlOutput output>
class Qontrol::Constraint::ConstraintSet< output >

Handle all the constraints added to the problem.

Template Parameters
outputThe constraints control output

Member Function Documentation

◆ add() [1/2]

template<Qontrol::ControlOutput output>
template<template< Qontrol::ControlOutput output2 > class ControlInput>
std::shared_ptr<ControlInput<output> > Qontrol::Constraint::ConstraintSet< output >::add ( std::string  constraint_name)
inline

Add a custom constraint to the constraint set.

Template Parameters
ControlInput
Parameters
constraint_name
Returns
std::shared_ptr<ControlInput<output>>

◆ add() [2/2]

template<Qontrol::ControlOutput output>
std::shared_ptr<Constraint::GenericConstraint> Qontrol::Constraint::ConstraintSet< output >::add ( std::string  constraint_name,
int  constraint_size 
)
inline

Add an implemented constaint in the constraint set.

Template Parameters
ControlInputThe input type of the constraint
Parameters
constraint_nameThe name of the constraint
Returns
std::shared_ptr<ControlInput<output>> The pointer to the constraint

◆ exist()

template<Qontrol::ControlOutput output>
bool Qontrol::Constraint::ConstraintSet< output >::exist ( std::string  constraint_name)
inline

Check if a constraint existe in the constraint set.

Parameters
constraint_name

◆ findConstraintIterator()

template<Qontrol::ControlOutput output>
std::vector<std::string>::iterator Qontrol::Constraint::ConstraintSet< output >::findConstraintIterator ( std::string  constraint_name)
inline

Find the iterator of a constraint in the constraint set given its name.

Parameters
constraint_name
Returns
std::vector<std::string>::iterator the constraint iterator

◆ getConstraintIndex()

template<Qontrol::ControlOutput output>
int Qontrol::Constraint::ConstraintSet< output >::getConstraintIndex ( std::string  constraint_name)
inline

Get the index of a constraint in the constraint set given its name.

Parameters
constraint_namethe constraint name
Returns
int the constraint index

◆ getConstraints()

template<Qontrol::ControlOutput output>
std::vector<std::shared_ptr<Constraint::GenericConstraint> > Qontrol::Constraint::ConstraintSet< output >::getConstraints ( )
inline

Get the constraint set.

Returns
std::vector<std::shared_ptr<Constraint::GenericConstraint>>

◆ remove() [1/2]

template<Qontrol::ControlOutput output>
void Qontrol::Constraint::ConstraintSet< output >::remove ( std::shared_ptr< Constraint::GenericConstraint constraint_ptr)
inline

Remove a constraint from the constraint set.

Parameters
constraint_ptr

◆ remove() [2/2]

template<Qontrol::ControlOutput output>
void Qontrol::Constraint::ConstraintSet< output >::remove ( std::string  constraint_name)
inline

Remove a constraint from the constraint set given its name.

Parameters
constraint_name

◆ update()

template<Qontrol::ControlOutput output>
void Qontrol::Constraint::ConstraintSet< output >::update ( double  dt)
inline

Call the update function of all the constraints in the constraint set.


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