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

FTOCP function #1

Open
tuanpfiev opened this issue Feb 14, 2019 · 8 comments
Open

FTOCP function #1

tuanpfiev opened this issue Feb 14, 2019 · 8 comments

Comments

@tuanpfiev
Copy link

tuanpfiev commented Feb 14, 2019

Hi Urosolia,
I am running the program and get this error:

=======================================
Time step: 1, Iteration: 2
Error using * (line 49)
Multiplying NaN with an SDPVAR makes no sense.

Error in FTOCP (line 55)
Cost = Cost + Qfun*lambda;

Error in LMPC (line 17)
[xPred, uPred ] = FTOCP(x_LMPC(:,t), N, Q, R, Qfun, SS, A, B, X, U);

Error in main (line 32)
[ x_LMPC, u_LMPC, SS, Qfunction, IterationCost] = LMPC(x0, SS, Qfun, A, B, Q, R, ...

=======================================

Could you please help me resolve this issue?
Thank you in advance.
Tuan

@urosolia
Copy link
Owner

Have you tried to update your MPT3 (https://www.mpt3.org/Main/Installation)?

@tuanpfiev
Copy link
Author

Thank you so much for your reply. The optimization was failed and it caused the issue. By the way, I am really interested in your research on Robust/Adaptive LMPC and the one on the racing car. I kindly ask if you could share the source codes of those studies.

@Hidenver2016
Copy link

Hi Urosolia,

I also have similar problem and I updated my MPT3 as your said above.

Time step: 2, Iteration: 1, Cost: 587.737135646650586
Error using == (line 15)
Error using - (line 52)
Adding NaN to an SDPVAR makes no sense.

Error in FTOCP (line 26)
Constraints = [x_t == x{1}];

Error in LMPC (line 50)
[~, uPred ] = FTOCP(x_LMPC(:,t), N, Q, R, Qfun, SS,...

Error in main (line 56)
[ x_LMPC, u_LMPC, x_cl, u_cl, IterationCost, SS] = LMPC(x0, x_cl, u_cl, IterationCost, A, B, Q, R, ...

Could you please help me on this?
Thank you very much!

Bests,
Qiang

@urosolia
Copy link
Owner

Can you check if the solvers are correctly installed? Are you able to solve an optimization problem with GUROBI and YALMIP?

@Hidenver2016
Copy link

Thank you very much for your reply. I change LMPC_options.solver = 'quadprog'; right now it works.

@urosolia
Copy link
Owner

I always recommend GUROBI for high precision and speed. For academic purposes the license is free!

@Hidenver2016
Copy link

Thank you very much!

@Ghui-Yang
Copy link

Thank you very much for your reply. I change LMPC_options.solver = 'quadprog'; right now it works.

The “gurobi” solver needs to be downloaded and installed in Matlab enviroment.

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

4 participants