Generates weights for solving OCPs having multiple objectives. More...
#include <weight_generation.hpp>
Public Member Functions | |
returnValue | getWeights (const int &m, const int &pnts, const DVector &weightsLB, const DVector &weightsUB, DMatrix &Weights, DVector &formers) const |
WeightGeneration & | operator= (const WeightGeneration &arg) |
WeightGeneration () | |
WeightGeneration (const WeightGeneration &arg) | |
virtual | ~WeightGeneration () |
Protected Member Functions | |
returnValue | generateWeights (const int &n, DVector &weight, DMatrix &Weights, const DVector &weightsLB, const DVector &weightsUB, DVector &formers, const int &layer, int &lastOne, int ¤tOne, double &step) const |
Generates weights for solving OCPs having multiple objectives.
Auxiliary class for generating weights for solving optimal control problems having multiple objectives.
Definition at line 51 of file weight_generation.hpp.
Default constructor.
Definition at line 47 of file weight_generation.cpp.
WeightGeneration::WeightGeneration | ( | const WeightGeneration & | arg | ) |
Copy constructor (deep copy).
Definition at line 51 of file weight_generation.cpp.
WeightGeneration::~WeightGeneration | ( | ) | [virtual] |
Destructor.
Definition at line 55 of file weight_generation.cpp.
returnValue WeightGeneration::generateWeights | ( | const int & | n, |
DVector & | weight, | ||
DMatrix & | Weights, | ||
const DVector & | weightsLB, | ||
const DVector & | weightsUB, | ||
DVector & | formers, | ||
const int & | layer, | ||
int & | lastOne, | ||
int & | currentOne, | ||
double & | step | ||
) | const [protected] |
Recursive weight generation routine.
n | dimension of the current layer |
weight | current set of weights to be added. |
Weights | tentative set of final weights. |
weightsLB | the lower bounds for the weights. |
weightsUB | the upper bounds for the weights. |
formers | tentative list of closest points. |
layer | the upper layer (equal to # of Obj.) |
lastOne | counter for the closest points |
currentOne | counter for the closest points |
step | step size in one direction. |
Definition at line 98 of file weight_generation.cpp.
returnValue WeightGeneration::getWeights | ( | const int & | m, |
const int & | pnts, | ||
const DVector & | weightsLB, | ||
const DVector & | weightsUB, | ||
DMatrix & | Weights, | ||
DVector & | formers | ||
) | const |
Generates weights and closest points.
Input:
m | number of objectives |
pnts | number of points in 1 direction |
weightsLB | lower bound on weights |
weightsUB | upper bound on weights Output: |
Weights | final weights |
formers | closest points |
Definition at line 68 of file weight_generation.cpp.
WeightGeneration & WeightGeneration::operator= | ( | const WeightGeneration & | arg | ) |
Assignment operator (deep copy).
Definition at line 59 of file weight_generation.cpp.