Commit 3816fc19 authored by Jan Philipp Haller's avatar Jan Philipp Haller
Browse files

Fixed matrices in QuadraticOpt.emam,

removed comment from PathFollower.emam.
parent 04ab22bb
Pipeline #462182 failed with stage
in 6 minutes and 34 seconds
......@@ -5,12 +5,12 @@ component QuadraticOpt{
implementation Math{
Q^{3,3} A = [1,0,0;0,2,0;0,0,3];
Q^{3,7} B = [1,1;2,2;3,3];
Q^{3,2} C = [2,2,3;3,4,4];
Q^{3} c = [4;5;6];
Q^{3,2} B = [1,1;2,2;3,3];
Q^{3,2} C = [2,2;3,3;4,4];
Q^{3} c = [4,5,6];
Q d = 42;
Q^{2} f = [3;3];
Q^{2} h = [6;5];
Q^{2} f = [3,3];
Q^{2} h = [6,5];
minimize
Q^{3} x;
......
......@@ -37,8 +37,7 @@ component PathFollower {
Q(-10:200km/h) velocity = currentVelocity;
angle(n+1) == angle(n) + 1 / (velocity(n) * mpc_steering(n) * dT);
//fg[V_ANGLE + (V_VAR * (n+1))] = vars[V_ANGLE + (V_VAR * (n))] ...
angle(n+1) == angle(n) + 1 / (velocity(n) * mpc_steering(n) * dT);
velocity(n+1) == velocity(n) + mpc_acceleration(n) * dT;
trajectoryDistance(n+1) == trajectoryDistance(n) + sin(angle(n)) * velocity(n);
end
......
......@@ -33,13 +33,13 @@ CONSTANTCONSTANTVECTOR1(1,0) = 2;
CONSTANTCONSTANTVECTOR1(1,1) = 2;
CONSTANTCONSTANTVECTOR1(2,0) = 3;
CONSTANTCONSTANTVECTOR1(2,1) = 3;
CONSTANTCONSTANTVECTOR2 = mat(2,3);
CONSTANTCONSTANTVECTOR2 = mat(3,2);
CONSTANTCONSTANTVECTOR2(0,0) = 2;
CONSTANTCONSTANTVECTOR2(0,1) = 2;
CONSTANTCONSTANTVECTOR2(0,2) = 3;
CONSTANTCONSTANTVECTOR2(1,0) = 3;
CONSTANTCONSTANTVECTOR2(1,1) = 4;
CONSTANTCONSTANTVECTOR2(1,2) = 4;
CONSTANTCONSTANTVECTOR2(1,1) = 3;
CONSTANTCONSTANTVECTOR2(2,0) = 4;
CONSTANTCONSTANTVECTOR2(2,1) = 4;
CONSTANTCONSTANTVECTOR3 = colvec(3);
CONSTANTCONSTANTVECTOR3(0,0) = 4;
CONSTANTCONSTANTVECTOR3(1,0) = 5;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment