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

The CFS reports errors #4

Open
KailinTong opened this issue Feb 24, 2021 · 4 comments
Open

The CFS reports errors #4

KailinTong opened this issue Feb 24, 2021 · 4 comments

Comments

@KailinTong
Copy link

Thank you very much for your contribution!

I got this error when I try to run CFS. I use MATLAB R2019b.

The problem is infeasible.

During presolve, quadprog found the constraints to be inconsistent 
to within the constraint tolerance.

Index exceeds the number of array elements (0).

Error in temporal_opt (line 84)
        reftnew = soln(1:nstep-1);

Do you have any suggestions?

Thank you very much!

@changliuliu
Copy link
Owner

Is your soln an empty array? You need to check the formulation of your QP to ensure feasibility.

@KailinTong
Copy link
Author

In the cloned code, this part (line 79 to line 82) was commented. Should it be like this?
Thank you!

% [~,Aeq,beq] = t2y_lin(reft,path,theta,vref,[v0;0],delta/v0);
% soln = quadprog(Q,[],A,b,Aeq,beq);
% soln_lin = quadprog(Q,[],A,b,L(1:5*(nstep-1),:),S(1:5*(nstep-1)));
% soln_lin = quadprog(Q,[],A,b,L(5*(nstep-1)+1:end,:),S(5*(nstep-1)+1:end));

@changliuliu
Copy link
Owner

in line 77, it is solving a QP. You may want to check whether the constraint in 'Lstack' and 'Sstack' makes sense.

soln = quadprog(Q,[],Lstack,Sstack);

@SaulGoodmanCN
Copy link

same problem with original codes:

temporal_opt

yaxis =

Columns 1 through 25

 0     2     4     6     8    10    12    14    16    18    20    22    24    26    28    30    32    34    36    38    40    42    44    46    48

Columns 26 through 34

50    52    54    56    58    60    62    64    66

Solver stopped prematurely.

quadprog stopped because it exceeded the iteration limit,
options.MaxIterations = 200 (the default value).

Minimum found that satisfies the constraints.

Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the optimality tolerance,
and constraints are satisfied to within the default value of the constraint tolerance.

Minimum found that satisfies the constraints.

Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the optimality tolerance,
and constraints are satisfied to within the default value of the constraint tolerance.

Minimum found that satisfies the constraints.

Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the optimality tolerance,
and constraints are satisfied to within the default value of the constraint tolerance.

Solver stopped prematurely.

quadprog stopped because it exceeded the iteration limit,
options.MaxIterations = 200 (the default value).

No feasible solution found.

quadprog stopped because it was unable to find a point that satisfies
the constraints within the default value of the constraint tolerance.

The problem is infeasible.

During presolve, quadprog found the constraints to be inconsistent
to within the constraint tolerance.

Index exceeds the number of array elements (0).

Error in temporal_opt (line 84)
reftnew = soln(1:nstep-1);

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

3 participants