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
DVector getNormalizationVector() const
virtual returnValue initializeNlpSolver(const OCPiterate &_userInit)
Data class for storing generic optimization variables.
DMatrix getUtopiaPlaneVectors() const
unsigned getNumCols() const
returnValue getDisturbances(VariablesGrid &w_) const
USING_NAMESPACE_ACADO typedef TaylorVariable< Interval > T
virtual returnValue solve()
void init(unsigned _nRows=0, unsigned _nCols=0)
MultiObjectiveAlgorithm & operator=(const MultiObjectiveAlgorithm &arg)
returnValue getObjective(Objective &objective_) const
returnValue setStatus(BlockStatus _status)
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.
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
int getNumberOfSteps() const
BooleanType isEmpty() const
void setAll(const T &_value)
returnValue addMayerTerm(const Expression &arg)
Allows to conveniently handle (one-dimensional) grids consisting of time points.
returnValue subjectTo(const DifferentialEquation &differentialEquation_)
#define CLOSE_NAMESPACE_ACADO
DMatrix getNormalizedPayOffMatrix() const
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 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
DMatrix getPayOffMatrix() const
returnValue getParameters(VariablesGrid &u_) const
returnValue getDifferentialStates(VariablesGrid &xd_) const
returnValue getGrid(Grid &grid_) const
int totalNumberOfSQPiterations
returnValue getControls(VariablesGrid &p_) 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[])
returnValue getAlgebraicStates(VariablesGrid &xa_) const
virtual returnValue initializeObjective(Objective *F)
returnValue evaluate(const OCPiterate &x)
virtual returnValue initializeNlpSolver(const OCPiterate &_userInit)
DMatrix getWeights() const
void setAll(const T &_value)
virtual returnValue solveSingleObjective(const int &number)
returnValue formulateOCP(double *idx, OCP *ocp_, Expression **arg)
#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()
unsigned getNumRows() const
returnValue getWeights(const int &m, const int &pnts, const DVector &weightsLB, const DVector &weightsUB, DMatrix &Weights, DVector &formers) const
Stores and evaluates the objective function of optimal control problems.
#define ACADOERROR(retval)
int getNumberOfMayerTerms() const
virtual ~MultiObjectiveAlgorithm()