Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpc中的solution为空 #4

Open
chengfenghuayu opened this issue Jun 18, 2019 · 6 comments
Open

mpc中的solution为空 #4

chengfenghuayu opened this issue Jun 18, 2019 · 6 comments

Comments

@chengfenghuayu
Copy link

你好~
我编译通过了model_predictive_control.cpp文件通过了,两个依赖库也安装了,但是运行会显示数数组超界限,然后发现里面求解的
// solve the problem
CppAD::ipopt::solve<Dvector, FG_EVAL>(
options, vars, vars_lowerbound, vars_upperbound, constraints_lowerbound,
constraints_upperbound, fg_eval, solution);
这一步中的solution 求解出来的为空.
库应该时安装对的,你知道是哪里有问题吗?
谢谢~

@onlytailei
Copy link
Owner

FYI, 我的相关版本: Ipopt-3.12.13 CppAD-20190200.1
在我这运行没有问题,请注意你有没有给所有变量设置上下界

@chengfenghuayu
Copy link
Author

我是直接跑model_predictive_control的例子的,没有修改任何东西,两个库也安装成和你一样的版本,运行时还是报下面的错误:
cppad-20190200.1 error from a known source:
vector: index greater than or equal vector size
Error detected by false result for
i < length_
at line 478 in the file
/usr/include/cppad/utility/vector.hpp
mpc: /usr/include/cppad/utility/error_handler.hpp:206: static void CppAD::ErrorHandler::Default(bool, int, const char*, const char*, const char*): Assertion `false' failed.
Aborted (core dumped)

@onlytailei
Copy link
Owner

如果你可以搞成一个docker环境,并且复现相关问题的话 我可以帮你看一下

@longjianquan
Copy link

MPC 出来的路径不对啊,

@SilvAmumu
Copy link

我是直接跑model_predictive_control的例子的,没有修改任何东西,两个库也安装成和你一样的版本,运行时还是报下面的错误:
cppad-20190200.1 error from a known source:
vector: index greater than or equal vector size
Error detected by false result for
i < length_
at line 478 in the file
/usr/include/cppad/utility/vector.hpp
mpc: /usr/include/cppad/utility/error_handler.hpp:206: static void CppAD::ErrorHandler::Default(bool, int, const char*, const char*, const char*): Assertion `false' failed.
Aborted (core dumped)

问题解决了吗。我也遇到了

@qq543811
Copy link

应该是ipopt缺少依赖HSL (Harwell Subroutines Library)。
可以按照官方文档中方法安装依赖:https://coin-or.github.io/Ipopt/INSTALL.html#DOWNLOAD_HSL
或者直接用脚本重新安装ipopt:https://blog.csdn.net/weixin_37532614/article/details/105124200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants