I would appreciate some guidance on working around the following errors, which occur whether or not the optimization is constrained:
[ACADO] Error: The integration routine stopped as the required accuracy can not be obtained
Code: (RET_UNSUCCESSFUL_RETURN_FROM_INTEGRATOR_BDF)
File: /home/stuartg/ACADOtoolkit/src/integrator/integrator_bdf.cpp
Line: 2021
Attached is a Pontryagin Maximum output for unconstrained optimization.
The toy problem is shown below:
#include<acado_toolkit.hpp>#include<include/acado_gnuplot/gnuplot_window.hpp>intmain(){USING_NAMESPACE_ACADO// INTRODUCE THE VARIABLES// -------------------------------------DifferentialStateuu,k,temp;// the differential statesAlgebraicStateinv,prod,dam;// the algebraic statesControlmu,c;// the control inputs// Parameter T ; // the time horizon TDifferentialEquationf;// the differential equationTIMEt;// timeconstdoublet_start=0.0;constdoublet_end=100.0;// DEFINE A DIFFERENTIAL EQUATION// -------------------------------------f<<dot(uu)==-exp(-0.015*t)*(-1+c)/c;// an implementationf<<dot(k)==inv-0.04*k;// of the model equationsf<<dot(temp)==pow(k,0.85)*(1-mu)/1000;f<<0==prod-pow(k,0.85)*dam;f<<0==inv-prod+c;f<<0==dam-1/(1+0.01*pow(temp,2));// DEFINE AN OPTIMAL CONTROL PROBLEM// ------------------------------------- OCPocp(t_start,t_end,10);// time horizon & stepsocp.minimizeMayerTerm(uu);// minimization objocp.subjectTo(f);// minimize obj s.t. the model,ocp.subjectTo(AT_START,uu==0.0);// initial values:ocp.subjectTo(AT_START,k==8.0);ocp.subjectTo(AT_START,c==1.7);ocp.subjectTo(AT_START,temp==0.5);ocp.subjectTo(AT_START,mu==0.005);// ocp.subjectTo( AT_END , s == 10.0 ); // the terminal constraints for s// ocp.subjectTo( AT_END , v == 0.0 ); // and v,ocp.subjectTo(0.0<=mu<=1.0);ocp.subjectTo(0.0<=k<=5.0e6);ocp.subjectTo(0.0<=inv<=0.3e6);// -------------------------------------GnuplotWindowwindow;window.addSubplot(uu,"THE UTILITY uu");window.addSubplot(k,"THE ASSETS k");window.addSubplot(c,"THE CONSUMPTION c");window.addSubplot(inv,"THE INVESTMENT inv");window.addSubplot(mu,"THE ABATEMENT mu");window.addSubplot(temp,"THE TEMPERATURE temp");// DEFINE AN OPTIMIZATION AND SOLVE THE OCP:// ------------------------------------- OptimizationAlgorithmalgorithm(ocp);// the optimization algorithm// algorithm.set( ABSOLUTE_TOLERANCE , 1e-7 );// algorithm.set( INTEGRATOR_TOLERANCE , 1e-7 );// algorithm.set( HESSIAN_APPROXIMATION , EXACT_HESSIAN );algorithm<<window;algorithm.solve();// solves the problem.return0;}
I would appreciate some guidance on working around the following errors, which occur whether or not the optimization is constrained:
[ACADO] Error: The integration routine stopped as the required accuracy can not be obtained
Code: (RET_UNSUCCESSFUL_RETURN_FROM_INTEGRATOR_BDF)
File: /home/stuartg/ACADOtoolkit/src/integrator/integrator_bdf.cpp
Line: 2021
[ACADO] Error: Initialization of NLP solver failed
Code: (RET_UNABLE_TO_INTEGRATE_SYSTEM)
File: /home/stuartg/ACADOtoolkit/src/dynamic_discretization/shooting_method.cpp
Line: 279
[ACADO] Error: Initialization of NLP solver failed
Code: (RET_NLP_INIT_FAILED)
File: /home/stuartg/ACADOtoolkit/src/nlp_solver/scp_method.cpp
Line: 214
[ACADO] Error: Initialization of optimization algorithm failed
Code: (RET_OPTALG_INIT_FAILED)
File: /home/stuartg/ACADOtoolkit/src/optimization_algorithm/optimization_algorithm_base.cpp
Line: 591
Attached is a Pontryagin Maximum output for unconstrained optimization.
The toy problem is shown below:
Last edit: stuart 2014-11-13
Hi, thought I would bump this post to see if anyone might suggest why this problem cannot solve? Thanks, Stuart
Any updates? Running in the same problem