152 int N_pow_m_minus_1 = 1;
155 N_pow_m_minus_1 *=
N;
159 for( run1 = 0; run1 <
m; run1++ )
170 printf(
"\n\n Optimization of individual objective %d out of %d \n\n",number_ +1, m );
178 for( run1 = 0; run1 < (int) Weights.
getNumCols(); run1++ ){
179 if( fabs( Weights( number_, run1 ) - 1.0 ) < 1000.0*
EPS )
205 int *indices =
new int[
m];
206 for( run1 = 0; run1 <
m; run1++ )
207 indices[run1] = number_;
249 for( run1 = 0; run1 <
m; run1++ ){
257 if( _xd != 0 )
delete _xd;
258 if( _xa != 0 )
delete _xa;
259 if( _p != 0 )
delete _p ;
260 if( _u != 0 )
delete _u ;
261 if( _w != 0 )
delete _w ;
266 for( run1 = 0; run1 <
m; run1++ )
270 for( run1 = 0; run1 <
m; run1++ )
287 int paretoGeneration;
296 for( run1 = 0; run1 <
m; run1++ )
301 double *idx =
new double[
m];
311 generator.
getWeights( m,
N, lb, ub, Weights, formers );
331 printf(
"\n\n Multi-objective point: %d out of %d \n\n",run1+1, (
int) Weights.
getNumCols() );
336 for( run2 = 0; run2 < (int) Weights.
getNumRows(); run2++ )
337 idx[run2] = Weights( run2, run1 );
343 for( run2 = 0; run2 <
m; run2++ ){
344 if( fabs( idx[run2]-1.0 ) < 100.0*
EPS )
393 printf(
" Result from single objective optimization is adopted. \n\n" );
394 for( run2 = 0; run2 <
m; run2++ ){
403 for( run1 = 0; run1 <
m; run1++ )
449 int paretoGeneration;
467 for( run1 = 0; run1 <
m; run1++ ){
469 sum = sum + arg[run1][0]*factor;
490 for( run1 = 0; run1 <
m; run1++ )
501 for( run2 = 0; run2 <
m; run2++ ){
503 Fnorm[run2] = ( *arg[run2] -
U(run2) ) /
L(run2);
509 for( run1 = 0; run1 < m-1; run1++ ){
511 for( run2 = 0; run2 <
m; run2++ ){
513 sum = sum + NK(run2,run1)*( Fnorm[run2] - PW(run2) );
533 for( run3 = 0; run3 <
m; run3++ ){
534 for( run4 = 0; run4 <
m; run4++ ){
535 PHI_N(run3,run4) = 1.0;
538 for( run3 = 0; run3 <
m; run3++ )
539 PHI_N(run3,run3) = 0.0;
542 T = PHI_N * P.inverse();
547 for( run3 = 0; run3 < m-1; run3++ )
550 for( run3 = 0; run3 < m-1; run3++ )
555 for( run1 = 0; run1 <
m; run1++ )
565 for( run2 = 0; run2 <
m; run2++ ){
567 for( run3 = 0; run3 <
m; run3++ ){
568 tmp3 = tmp3 +
T(run2,run3)*( *arg[run3]-
U(run3) );
576 for( run1 = 0; run1 < m-1; run1++ ){
580 for( run2 = 0; run2 <
m; run2++ ){
582 sum = sum + NK(run2,run1)*( Fnorm[run2] - PW(run2) );
598 for( run1 = 0; run1 <
m; run1++ )
609 lambda = ( *arg[m-1] -
V(m-1) )/ X(m-1);
614 for( run1 = 0; run1 < m-1; run1++ )
647 for( run1 = 0; run1 <
m; run1++ ){
657 if( _xd != 0 )
delete _xd;
658 if( _xa != 0 )
delete _xa;
659 if( _p != 0 )
delete _p ;
660 if( _u != 0 )
delete _u ;
661 if( _w != 0 )
delete _w ;
const int defaultParetoFrontGeneration
virtual returnValue initializeNlpSolver(const OCPiterate &_userInit)
Data class for storing generic optimization variables.
USING_NAMESPACE_ACADO typedef TaylorVariable< Interval > T
virtual returnValue solve()
DMatrix getWeights() const
void init(unsigned _nRows=0, unsigned _nCols=0)
returnValue getObjective(Objective &objective_) const
MultiObjectiveAlgorithm & operator=(const MultiObjectiveAlgorithm &arg)
returnValue setStatus(BlockStatus _status)
DVector getNormalizationVector() const
BEGIN_NAMESPACE_ACADO const double EPS
User-interface to formulate and solve optimal control problems and static NLPs.
Generates weights for solving OCPs having multiple objectives.
Stores and evaluates the constraints of optimal control problems.
DMatrix getPayOffMatrix() const
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
void setAll(const T &_value)
returnValue addMayerTerm(const Expression &arg)
Allows to conveniently handle (one-dimensional) grids consisting of time points.
BooleanType isEmpty() const
returnValue getParameters(VariablesGrid &u_) const
returnValue subjectTo(const DifferentialEquation &differentialEquation_)
#define CLOSE_NAMESPACE_ACADO
returnValue getConstraint(Constraint &constraint_) const
returnValue evaluateObjectives(VariablesGrid &xd_, VariablesGrid &xa_, VariablesGrid &p_, VariablesGrid &u_, VariablesGrid &w_, Expression **arg1)
VariablesGrid * xaResults
virtual returnValue getObjectiveValue(double &objectiveValue)
returnValue getAlgebraicStates(VariablesGrid &xa_) const
returnValue setConstraint(const Constraint &constraint_)
Base class for all variables within the symbolic expressions family.
virtual returnValue setupOptions()
const int defaultParetoFrontDiscretization
DVector getUtopiaVector() const
MultiObjectiveAlgorithm()
const int defaultParetoFrontHotstart
int getNumberOfSteps() const
int totalNumberOfSQPiterations
returnValue getDisturbances(VariablesGrid &w_) const
Derived & setZero(Index size)
Data class for defining optimal control problems.
void hotstart(const real_t *const g, const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA, int nWSR, Options *options, int nOutputs, mxArray *plhs[])
unsigned getNumRows() const
virtual returnValue initializeObjective(Objective *F)
returnValue evaluate(const OCPiterate &x)
returnValue getWeights(const int &m, const int &pnts, const DVector &weightsLB, const DVector &weightsUB, DMatrix &Weights, DVector &formers) const
returnValue getControls(VariablesGrid &p_) const
DMatrix getUtopiaPlaneVectors() const
virtual returnValue initializeNlpSolver(const OCPiterate &_userInit)
unsigned getNumCols() const
void setAll(const T &_value)
virtual returnValue solveSingleObjective(const int &number)
returnValue formulateOCP(double *idx, OCP *ocp_, Expression **arg)
returnValue getGrid(Grid &grid_) const
DMatrix getNormalizedPayOffMatrix() const
#define BEGIN_NAMESPACE_ACADO
User-interface to formulate and solve optimal control problems with multiple objectives.
returnValue addOption(OptionsName name, int value)
OptimizationAlgorithm & operator=(const OptimizationAlgorithm &arg)
returnValue setObjective(const Objective &objective_)
virtual returnValue solve()
Stores and evaluates the objective function of optimal control problems.
returnValue getDifferentialStates(VariablesGrid &xd_) const
#define ACADOERROR(retval)
int getNumberOfMayerTerms() const
virtual ~MultiObjectiveAlgorithm()