Gurobi MPC in MATLAB: Iterations in the range of 1e4 -1e7
AnsweredDear staff and community,
I use Gurobi to solve a MIQCP in Matlab. By employing an MPC framework, I want to predict the trajectory of model over a certain prediction horizon. The model I use is a hybrid model with the help of nested min-max functions and other simplifications. Moreover, I use general constraints such as genconsin, genconcos, genconmin, genconmax, and I use several quadcons to describe multiplications between variables.
My research is related to trajectory tracking by minimizing certain states to a reference in an objective function. The solving for each timestep is done by using gurobi: result = gurobi(m,params); However, for each timestep in the MPC, it takes between 1e4 to 1e7 iterations before coming to a solution. The computation time per time step is in the range of 0.4 to 4 seconds, and this is too high to realize real-time implementation.
I have tried to increase the MIPGap and I have turned off Presolve, but to no avail. Iterations are still very high. Is there a way to decrease the iteration count or to retrieve a suboptimal result for a fixed maximum number of iterations? Of course, IterationLimit will stop the optimization as soon as the limit is reached, and will not return a solution. Therefore, this does not work.
If anyone has any suggestions, feel free to contact me. Your help will be much appreciated!
-
Hi Roald,
You could try upgrading to the latest Gurobi version 11.0.1 and running your model using the FuncNonlinear parameter. This will make Gurobi handle the constraints \(sin\) and \(cos\) as nonlinear functions instead of approximating them via a piecewise-linear approximation.
For your application to work, are you interested in a feasible solution only or are you interested in a proven optimal solution? If you are interested in just any feasible solution, you could set SolutionLimit=1. This will tell Gurobi to terminate as soon as a feasible point has been found.
Could you generate an LP file for one such model which takes too long, in best case one that takes ~4 seconds to solve, and share it? Note that uploading files in the Community Forum is not possible but we discuss an alternative in Posting to the Community Forum.
Best regards,
Jaromił0 -
Dear Jaromił,
Thank you for the response! I am currently already using the latest Gurobi version. For my research, I am approximating a nonlinear model with the help of MMPS and PWL approximations to result in a hybrid model. In this case, it is desired to avoid all nonlinear elements and use a hybrid approximation for each of them. As for changing the FuncNonlinear parameter for all sine and cosine, I experience only a small decrease in computation time whereas it does not impact the range of iteration counts. Both the FuncPieces and the FuncPiecesRatio have also been accessed, but do not have any significant impact on the iteration count.
For my application to work, I am interested in a feasible solution with a certain minimum performance. Using SolutionLimit = 1 will provide feasible solutions, however, these are often suboptimal and will, as the simulation progresses, result in an infeasible trajectory.
Below is the LP file generated for one of my frameworks with a stepsize of tMPC = 0.2 and a prediction horizon of Np = 5. Note that I use nested max-min constraints (for MMPS approximations) and strict bounds.
Thank you for your help in advance!
Best regards,
Roald\ Model matlab
\ LP format - for model browsing. Use MPS format to capture full model detail.
Minimize
0 MAX1,0 + 0 MAX2,0 + 0 MAX3,0 + 0 MAX4,0 + 0 MAX5,0 + 0 MAX6,0 + 0 MAX7,0
+ 0 MAX8,0 + 0 MAX1,1 + 0 MAX2,1 + 0 MAX3,1 + 0 MAX4,1 + 0 MAX5,1
+ 0 MAX6,1 + 0 MAX7,1 + 0 MAX8,1 + 0 MAX1,2 + 0 MAX2,2 + 0 MAX3,2
+ 0 MAX4,2 + 0 MAX5,2 + 0 MAX6,2 + 0 MAX7,2 + 0 MAX8,2 + 0 MAX1,3
+ 0 MAX2,3 + 0 MAX3,3 + 0 MAX4,3 + 0 MAX5,3 + 0 MAX6,3 + 0 MAX7,3
+ 0 MAX8,3 + 0 MAX1,4 + 0 MAX2,4 + 0 MAX3,4 + 0 MAX4,4 + 0 MAX5,4
+ 0 MAX6,4 + 0 MAX7,4 + 0 MAX8,4 + 16 NORM2 + 0.0002 NORM3 + 10 NORM4
+ 0.01 NORM5 + NORM6
Subject To
X,0: X,0 = 205.8646059680418
Y,0: Y,0 = -2.500025958326205
psi,0: psi,0 = -2.16829e-07
vx,0: vx,0 = 17.49999894361664
vy,0: vy,0 = -2.49758e-06
r,0: r,0 = 6.53973e-06
theta,0: theta,0 = 206.4164170712464
delta_f,0: delta_f,0 = 9.56512e-07
Fx,0: Fx,0 = 155.6187896527234
X,1: - X,0 + X,1 - 0.2 dX,0 = 0
Y,1: - Y,0 + Y,1 - 0.2 dY,0 = 0
psi,1: - psi,0 - 0.2 r,0 + psi,1 = 0
vx,1: - vx,0 + vx,1 - 0.2 dvx,0 = 0
vy,1: - vy,0 + vy,1 - 0.2 dvy,0 = 0
r,1: - r,0 + r,1 - 0.2 dr,0 = 0
theta,1: - theta,0 + theta,1 - 0.2 NORM1,0 = 0
delta_f,1: - delta_f,0 + delta_f,1 - 0.2 ddelta_f,0 = 0
Fx,1: - Fx,0 + Fx,1 - 0.2 dFx,0 = 0
X,2: - X,1 + X,2 - 0.2 dX,1 = 0
Y,2: - Y,1 + Y,2 - 0.2 dY,1 = 0
psi,2: - psi,1 - 0.2 r,1 + psi,2 = 0
vx,2: - vx,1 + vx,2 - 0.2 dvx,1 = 0
vy,2: - vy,1 + vy,2 - 0.2 dvy,1 = 0
r,2: - r,1 + r,2 - 0.2 dr,1 = 0
theta,2: - theta,1 + theta,2 - 0.2 NORM1,1 = 0
delta_f,2: - delta_f,1 + delta_f,2 - 0.2 ddelta_f,1 = 0
Fx,2: - Fx,1 + Fx,2 - 0.2 dFx,1 = 0
X,3: - X,2 + X,3 - 0.2 dX,2 = 0
Y,3: - Y,2 + Y,3 - 0.2 dY,2 = 0
psi,3: - psi,2 - 0.2 r,2 + psi,3 = 0
vx,3: - vx,2 + vx,3 - 0.2 dvx,2 = 0
vy,3: - vy,2 + vy,3 - 0.2 dvy,2 = 0
r,3: - r,2 + r,3 - 0.2 dr,2 = 0
theta,3: - theta,2 + theta,3 - 0.2 NORM1,2 = 0
delta_f,3: - delta_f,2 + delta_f,3 - 0.2 ddelta_f,2 = 0
Fx,3: - Fx,2 + Fx,3 - 0.2 dFx,2 = 0
X,4: - X,3 + X,4 - 0.2 dX,3 = 0
Y,4: - Y,3 + Y,4 - 0.2 dY,3 = 0
psi,4: - psi,3 - 0.2 r,3 + psi,4 = 0
vx,4: - vx,3 + vx,4 - 0.2 dvx,3 = 0
vy,4: - vy,3 + vy,4 - 0.2 dvy,3 = 0
r,4: - r,3 + r,4 - 0.2 dr,3 = 0
theta,4: - theta,3 + theta,4 - 0.2 NORM1,3 = 0
delta_f,4: - delta_f,3 + delta_f,4 - 0.2 ddelta_f,3 = 0
Fx,4: - Fx,3 + Fx,4 - 0.2 dFx,3 = 0
X,5: - X,4 + X,5 - 0.2 dX,4 = 0
Y,5: - Y,4 + Y,5 - 0.2 dY,4 = 0
psi,5: - psi,4 - 0.2 r,4 + psi,5 = 0
vx,5: - vx,4 + vx,5 - 0.2 dvx,4 = 0
vy,5: - vy,4 + vy,5 - 0.2 dvy,4 = 0
r,5: - r,4 + r,5 - 0.2 dr,4 = 0
theta,5: - theta,4 + theta,5 - 0.2 NORM1,4 = 0
delta_f,5: - delta_f,4 + delta_f,5 - 0.2 ddelta_f,4 = 0
Fx,5: - Fx,4 + Fx,5 - 0.2 dFx,4 = 0
alpha_f,0: - 0.0571428571428571 vy,0 - 0.0820571428571429 r,0 + delta_f,0
+ alpha_f,0 = 0
alpha_r,0: - 0.0571428571428571 vy,0 + 0.0828 r,0 + alpha_r,0 = 0
Ffy1,0: Ffy1,0 = 6729.15977671933
Ffy2,0: 29667.22682257387 alpha_f,0 + Ffy2,0 = 3982.512575561827
Ffy3,0: 77518.87238730963 alpha_f,0 + Ffy3,0 = 1376.120557911006
Ffy4,0: 137380.137651316 alpha_f,0 + Ffy4,0 = 0
Ffy5,0: 77518.87392425325 alpha_f,0 + Ffy5,0 = -1376.120502660555
Ffy6,0: 29667.22752577903 alpha_f,0 + Ffy6,0 = -3982.51252208356
Ffy7,0: Ffy7,0 = -6729.159775758981
Fry1,0: Fry1,0 = 7439.973091940706
Fry2,0: 31413.42552556999 alpha_r,0 + Fry2,0 = 4373.157871797666
Fry3,0: 81248.86149047157 alpha_r,0 + Fry3,0 = 1508.63764209827
Fry4,0: 143427.1205689835 alpha_r,0 + Fry4,0 = 0
Fry5,0: 81248.87635280147 alpha_r,0 + Fry5,0 = -1508.637066004579
Fry6,0: 31413.43973322888 alpha_r,0 + Fry6,0 = -4373.15677337503
Fry7,0: Fry7,0 = -7439.973072357328
FxDrag,0: FxDrag,0 = 155.6175
Ffx_brake,0: - 0.5 Fx,0 + Ffx_brake,0 = 0
Ffx_drive,0: Ffx_drive,0 = 0
Frx_brake,0: - 0.5 Fx,0 + Frx_brake,0 = 0
Frx_drive,0: - Fx,0 + Frx_drive,0 = 0
dX,0: dX,0 - QC3,0 + QC4,0 = 0
dY,0: dY,0 - QC2,0 - QC5,0 = 0
dvx,0: 0.00058548 FxDrag,0 + dvx,0 + 0.00058548 QC6,0 - QC9,0
- 0.00058548 MIN3,0 - 0.00058548 MAX9,0 = 0
dvy,0: dvy,0 - 0.00058548 QC7,0 + QC8,0 - 0.00058548 MIN1,0
- 0.00058548 MIN2,0 = 0
dr,0: dr,0 - 4.8103721807735188e-04 QC7,0 - 4.8103721807735188e-04 MIN1,0
+ 0.000485392 MIN2,0 = 0
DX,0: - X,1 + DX,0 = -208.8195412459408
DY,0: - Y,1 + DY,0 = 2.500002749429905
Dvx,0: - vx,1 + Dvx,0 = -17.5
psi_d,0: psi_d,0 = 1.50569e-10
e_c,0: e_c,0 - QC10,0 + QC13,0 = 0
e_l,0: e_l,0 + QC11,0 + QC12,0 = 0
alpha_f,1: - 0.0571428571428571 vy,1 - 0.0820571428571429 r,1 + delta_f,1
+ alpha_f,1 = 0
alpha_r,1: - 0.0571428571428571 vy,1 + 0.0828 r,1 + alpha_r,1 = 0
Ffy1,1: Ffy1,1 = 6729.15977671933
Ffy2,1: 29667.22682257387 alpha_f,1 + Ffy2,1 = 3982.512575561827
Ffy3,1: 77518.87238730963 alpha_f,1 + Ffy3,1 = 1376.120557911006
Ffy4,1: 137380.137651316 alpha_f,1 + Ffy4,1 = 0
Ffy5,1: 77518.87392425325 alpha_f,1 + Ffy5,1 = -1376.120502660555
Ffy6,1: 29667.22752577903 alpha_f,1 + Ffy6,1 = -3982.51252208356
Ffy7,1: Ffy7,1 = -6729.159775758981
Fry1,1: Fry1,1 = 7439.973091940706
Fry2,1: 31413.42552556999 alpha_r,1 + Fry2,1 = 4373.157871797666
Fry3,1: 81248.86149047157 alpha_r,1 + Fry3,1 = 1508.63764209827
Fry4,1: 143427.1205689835 alpha_r,1 + Fry4,1 = 0
Fry5,1: 81248.87635280147 alpha_r,1 + Fry5,1 = -1508.637066004579
Fry6,1: 31413.43973322888 alpha_r,1 + Fry6,1 = -4373.15677337503
Fry7,1: Fry7,1 = -7439.973072357328
FxDrag,1: FxDrag,1 = 155.6175
Ffx_brake,1: - 0.5 Fx,1 + Ffx_brake,1 = 0
Ffx_drive,1: Ffx_drive,1 = 0
Frx_brake,1: - 0.5 Fx,1 + Frx_brake,1 = 0
Frx_drive,1: - Fx,1 + Frx_drive,1 = 0
dX,1: dX,1 - QC3,1 + QC4,1 = 0
dY,1: dY,1 - QC2,1 - QC5,1 = 0
dvx,1: 0.00058548 FxDrag,1 + dvx,1 + 0.00058548 QC6,1 - QC9,1
- 0.00058548 MIN3,1 - 0.00058548 MAX9,1 = 0
dvy,1: dvy,1 - 0.00058548 QC7,1 + QC8,1 - 0.00058548 MIN1,1
- 0.00058548 MIN2,1 = 0
dr,1: dr,1 - 4.8103721807735188e-04 QC7,1 - 4.8103721807735188e-04 MIN1,1
+ 0.000485392 MIN2,1 = 0
DX,1: - X,2 + DX,1 = -212.3195411585833
DY,1: - Y,2 + DY,1 = 2.500007559781821
Dvx,1: - vx,2 + Dvx,1 = -17.5
psi_d,1: psi_d,1 = -1.90946e-05
e_c,1: e_c,1 - QC10,1 + QC13,1 = 0
e_l,1: e_l,1 + QC11,1 + QC12,1 = 0
alpha_f,2: - 0.0571428571428571 vy,2 - 0.0820571428571429 r,2 + delta_f,2
+ alpha_f,2 = 0
alpha_r,2: - 0.0571428571428571 vy,2 + 0.0828 r,2 + alpha_r,2 = 0
Ffy1,2: Ffy1,2 = 6729.15977671933
Ffy2,2: 29667.22682257387 alpha_f,2 + Ffy2,2 = 3982.512575561827
Ffy3,2: 77518.87238730963 alpha_f,2 + Ffy3,2 = 1376.120557911006
Ffy4,2: 137380.137651316 alpha_f,2 + Ffy4,2 = 0
Ffy5,2: 77518.87392425325 alpha_f,2 + Ffy5,2 = -1376.120502660555
Ffy6,2: 29667.22752577903 alpha_f,2 + Ffy6,2 = -3982.51252208356
Ffy7,2: Ffy7,2 = -6729.159775758981
Fry1,2: Fry1,2 = 7439.973091940706
Fry2,2: 31413.42552556999 alpha_r,2 + Fry2,2 = 4373.157871797666
Fry3,2: 81248.86149047157 alpha_r,2 + Fry3,2 = 1508.63764209827
Fry4,2: 143427.1205689835 alpha_r,2 + Fry4,2 = 0
Fry5,2: 81248.87635280147 alpha_r,2 + Fry5,2 = -1508.637066004579
Fry6,2: 31413.43973322888 alpha_r,2 + Fry6,2 = -4373.15677337503
Fry7,2: Fry7,2 = -7439.973072357328
FxDrag,2: FxDrag,2 = 155.6175
Ffx_brake,2: - 0.5 Fx,2 + Ffx_brake,2 = 0
Ffx_drive,2: Ffx_drive,2 = 0
Frx_brake,2: - 0.5 Fx,2 + Frx_brake,2 = 0
Frx_drive,2: - Fx,2 + Frx_drive,2 = 0
dX,2: dX,2 - QC3,2 + QC4,2 = 0
dY,2: dY,2 - QC2,2 - QC5,2 = 0
dvx,2: 0.00058548 FxDrag,2 + dvx,2 + 0.00058548 QC6,2 - QC9,2
- 0.00058548 MIN3,2 - 0.00058548 MAX9,2 = 0
dvy,2: dvy,2 - 0.00058548 QC7,2 + QC8,2 - 0.00058548 MIN1,2
- 0.00058548 MIN2,2 = 0
dr,2: dr,2 - 4.8103721807735188e-04 QC7,2 - 4.8103721807735188e-04 MIN1,2
+ 0.000485392 MIN2,2 = 0
DX,2: - X,3 + DX,2 = -215.8195411014675
DY,2: - Y,3 + DY,2 = 2.50000886714587
Dvx,2: - vx,3 + Dvx,2 = -17.5
psi_d,2: psi_d,2 = 3.57515e-07
e_c,2: e_c,2 - QC10,2 + QC13,2 = 0
e_l,2: e_l,2 + QC11,2 + QC12,2 = 0
alpha_f,3: - 0.0571428571428571 vy,3 - 0.0820571428571429 r,3 + delta_f,3
+ alpha_f,3 = 0
alpha_r,3: - 0.0571428571428571 vy,3 + 0.0828 r,3 + alpha_r,3 = 0
Ffy1,3: Ffy1,3 = 6729.15977671933
Ffy2,3: 29667.22682257387 alpha_f,3 + Ffy2,3 = 3982.512575561827
Ffy3,3: 77518.87238730963 alpha_f,3 + Ffy3,3 = 1376.120557911006
Ffy4,3: 137380.137651316 alpha_f,3 + Ffy4,3 = 0
Ffy5,3: 77518.87392425325 alpha_f,3 + Ffy5,3 = -1376.120502660555
Ffy6,3: 29667.22752577903 alpha_f,3 + Ffy6,3 = -3982.51252208356
Ffy7,3: Ffy7,3 = -6729.159775758981
Fry1,3: Fry1,3 = 7439.973091940706
Fry2,3: 31413.42552556999 alpha_r,3 + Fry2,3 = 4373.157871797666
Fry3,3: 81248.86149047157 alpha_r,3 + Fry3,3 = 1508.63764209827
Fry4,3: 143427.1205689835 alpha_r,3 + Fry4,3 = 0
Fry5,3: 81248.87635280147 alpha_r,3 + Fry5,3 = -1508.637066004579
Fry6,3: 31413.43973322888 alpha_r,3 + Fry6,3 = -4373.15677337503
Fry7,3: Fry7,3 = -7439.973072357328
FxDrag,3: FxDrag,3 = 155.6175
Ffx_brake,3: - 0.5 Fx,3 + Ffx_brake,3 = 0
Ffx_drive,3: Ffx_drive,3 = 0
Frx_brake,3: - 0.5 Fx,3 + Frx_brake,3 = 0
Frx_drive,3: - Fx,3 + Frx_drive,3 = 0
dX,3: dX,3 - QC3,3 + QC4,3 = 0
dY,3: dY,3 - QC2,3 - QC5,3 = 0
dvx,3: 0.00058548 FxDrag,3 + dvx,3 + 0.00058548 QC6,3 - QC9,3
- 0.00058548 MIN3,3 - 0.00058548 MAX9,3 = 0
dvy,3: dvy,3 - 0.00058548 QC7,3 + QC8,3 - 0.00058548 MIN1,3
- 0.00058548 MIN2,3 = 0
dr,3: dr,3 - 4.8103721807735188e-04 QC7,3 - 4.8103721807735188e-04 MIN1,3
+ 0.000485392 MIN2,3 = 0
DX,3: - X,4 + DX,3 = -219.3195410744673
DY,3: - Y,4 + DY,3 = 2.500008411744836
Dvx,3: - vx,4 + Dvx,3 = -17.5
psi_d,3: psi_d,3 = -3.34274e-06
e_c,3: e_c,3 - QC10,3 + QC13,3 = 0
e_l,3: e_l,3 + QC11,3 + QC12,3 = 0
alpha_f,4: - 0.0571428571428571 vy,4 - 0.0820571428571429 r,4 + delta_f,4
+ alpha_f,4 = 0
alpha_r,4: - 0.0571428571428571 vy,4 + 0.0828 r,4 + alpha_r,4 = 0
Ffy1,4: Ffy1,4 = 6729.15977671933
Ffy2,4: 29667.22682257387 alpha_f,4 + Ffy2,4 = 3982.512575561827
Ffy3,4: 77518.87238730963 alpha_f,4 + Ffy3,4 = 1376.120557911006
Ffy4,4: 137380.137651316 alpha_f,4 + Ffy4,4 = 0
Ffy5,4: 77518.87392425325 alpha_f,4 + Ffy5,4 = -1376.120502660555
Ffy6,4: 29667.22752577903 alpha_f,4 + Ffy6,4 = -3982.51252208356
Ffy7,4: Ffy7,4 = -6729.159775758981
Fry1,4: Fry1,4 = 7439.973091940706
Fry2,4: 31413.42552556999 alpha_r,4 + Fry2,4 = 4373.157871797666
Fry3,4: 81248.86149047157 alpha_r,4 + Fry3,4 = 1508.63764209827
Fry4,4: 143427.1205689835 alpha_r,4 + Fry4,4 = 0
Fry5,4: 81248.87635280147 alpha_r,4 + Fry5,4 = -1508.637066004579
Fry6,4: 31413.43973322888 alpha_r,4 + Fry6,4 = -4373.15677337503
Fry7,4: Fry7,4 = -7439.973072357328
FxDrag,4: FxDrag,4 = 155.6175
Ffx_brake,4: - 0.5 Fx,4 + Ffx_brake,4 = 0
Ffx_drive,4: Ffx_drive,4 = 0
Frx_brake,4: - 0.5 Fx,4 + Frx_brake,4 = 0
Frx_drive,4: - Fx,4 + Frx_drive,4 = 0
dX,4: dX,4 - QC3,4 + QC4,4 = 0
dY,4: dY,4 - QC2,4 - QC5,4 = 0
dvx,4: 0.00058548 FxDrag,4 + dvx,4 + 0.00058548 QC6,4 - QC9,4
- 0.00058548 MIN3,4 - 0.00058548 MAX9,4 = 0
dvy,4: dvy,4 - 0.00058548 QC7,4 + QC8,4 - 0.00058548 MIN1,4
- 0.00058548 MIN2,4 = 0
dr,4: dr,4 - 4.8103721807735188e-04 QC7,4 - 4.8103721807735188e-04 MIN1,4
+ 0.000485392 MIN2,4 = 0
DX,4: - X,5 + DX,4 = -222.8195410744787
DY,4: - Y,5 + DY,4 = 2.500009431344776
Dvx,4: - vx,5 + Dvx,4 = -17.5
psi_d,4: psi_d,4 = 1.43868e-05
e_c,4: e_c,4 - QC10,4 + QC13,4 = 0
e_l,4: e_l,4 + QC11,4 + QC12,4 = 0
QC1,0: QC1,0 + [ - vx,0 ^2 ] = 0
QC2,0: QC2,0 + [ - vx,0 * SIN1,0 ] = 0
QC3,0: QC3,0 + [ - vx,0 * COS1,0 ] = 0
QC4,0: QC4,0 + [ - vy,0 * SIN1,0 ] = 0
QC5,0: QC5,0 + [ - vy,0 * COS1,0 ] = 0
QC6,0: QC6,0 + [ - delta_f,0 * MIN1,0 ] = 0
QC7,0: QC7,0 + [ - delta_f,0 * MIN3,0 ] = 0
QC8,0: QC8,0 + [ - vx,0 * r,0 ] = 0
QC9,0: QC9,0 + [ - vy,0 * r,0 ] = 0
QC10,0: QC10,0 + [ - DX,0 * SIN2,0 ] = 0
QC11,0: QC11,0 + [ - DY,0 * SIN2,0 ] = 0
QC12,0: QC12,0 + [ - DX,0 * COS2,0 ] = 0
QC13,0: QC13,0 + [ - DY,0 * COS2,0 ] = 0
QC1,1: QC1,1 + [ - vx,1 ^2 ] = 0
QC2,1: QC2,1 + [ - vx,1 * SIN1,1 ] = 0
QC3,1: QC3,1 + [ - vx,1 * COS1,1 ] = 0
QC4,1: QC4,1 + [ - vy,1 * SIN1,1 ] = 0
QC5,1: QC5,1 + [ - vy,1 * COS1,1 ] = 0
QC6,1: QC6,1 + [ - delta_f,1 * MIN1,1 ] = 0
QC7,1: QC7,1 + [ - delta_f,1 * MIN3,1 ] = 0
QC8,1: QC8,1 + [ - vx,1 * r,1 ] = 0
QC9,1: QC9,1 + [ - vy,1 * r,1 ] = 0
QC10,1: QC10,1 + [ - DX,1 * SIN2,1 ] = 0
QC11,1: QC11,1 + [ - DY,1 * SIN2,1 ] = 0
QC12,1: QC12,1 + [ - DX,1 * COS2,1 ] = 0
QC13,1: QC13,1 + [ - DY,1 * COS2,1 ] = 0
QC1,2: QC1,2 + [ - vx,2 ^2 ] = 0
QC2,2: QC2,2 + [ - vx,2 * SIN1,2 ] = 0
QC3,2: QC3,2 + [ - vx,2 * COS1,2 ] = 0
QC4,2: QC4,2 + [ - vy,2 * SIN1,2 ] = 0
QC5,2: QC5,2 + [ - vy,2 * COS1,2 ] = 0
QC6,2: QC6,2 + [ - delta_f,2 * MIN1,2 ] = 0
QC7,2: QC7,2 + [ - delta_f,2 * MIN3,2 ] = 0
QC8,2: QC8,2 + [ - vx,2 * r,2 ] = 0
QC9,2: QC9,2 + [ - vy,2 * r,2 ] = 0
QC10,2: QC10,2 + [ - DX,2 * SIN2,2 ] = 0
QC11,2: QC11,2 + [ - DY,2 * SIN2,2 ] = 0
QC12,2: QC12,2 + [ - DX,2 * COS2,2 ] = 0
QC13,2: QC13,2 + [ - DY,2 * COS2,2 ] = 0
QC1,3: QC1,3 + [ - vx,3 ^2 ] = 0
QC2,3: QC2,3 + [ - vx,3 * SIN1,3 ] = 0
QC3,3: QC3,3 + [ - vx,3 * COS1,3 ] = 0
QC4,3: QC4,3 + [ - vy,3 * SIN1,3 ] = 0
QC5,3: QC5,3 + [ - vy,3 * COS1,3 ] = 0
QC6,3: QC6,3 + [ - delta_f,3 * MIN1,3 ] = 0
QC7,3: QC7,3 + [ - delta_f,3 * MIN3,3 ] = 0
QC8,3: QC8,3 + [ - vx,3 * r,3 ] = 0
QC9,3: QC9,3 + [ - vy,3 * r,3 ] = 0
QC10,3: QC10,3 + [ - DX,3 * SIN2,3 ] = 0
QC11,3: QC11,3 + [ - DY,3 * SIN2,3 ] = 0
QC12,3: QC12,3 + [ - DX,3 * COS2,3 ] = 0
QC13,3: QC13,3 + [ - DY,3 * COS2,3 ] = 0
QC1,4: QC1,4 + [ - vx,4 ^2 ] = 0
QC2,4: QC2,4 + [ - vx,4 * SIN1,4 ] = 0
QC3,4: QC3,4 + [ - vx,4 * COS1,4 ] = 0
QC4,4: QC4,4 + [ - vy,4 * SIN1,4 ] = 0
QC5,4: QC5,4 + [ - vy,4 * COS1,4 ] = 0
QC6,4: QC6,4 + [ - delta_f,4 * MIN1,4 ] = 0
QC7,4: QC7,4 + [ - delta_f,4 * MIN3,4 ] = 0
QC8,4: QC8,4 + [ - vx,4 * r,4 ] = 0
QC9,4: QC9,4 + [ - vy,4 * r,4 ] = 0
QC10,4: QC10,4 + [ - DX,4 * SIN2,4 ] = 0
QC11,4: QC11,4 + [ - DY,4 * SIN2,4 ] = 0
QC12,4: QC12,4 + [ - DX,4 * COS2,4 ] = 0
QC13,4: QC13,4 + [ - DY,4 * COS2,4 ] = 0
Bounds
-10 <= X,0 <= 1000
-80 <= Y,0 <= 80
-3.490658503988659 <= psi,0 <= 3.490658503988659
10 <= vx,0 <= 25
-8 <= vy,0 <= 8
-1.047197551196598 <= r,0 <= 1.047197551196598
theta,0 <= 1000
-0.3141592653589793 <= delta_f,0 <= 0.3141592653589793
-7200 <= Fx,0 <= 7200
-10 <= X,1 <= 1000
-80 <= Y,1 <= 80
-3.490658503988659 <= psi,1 <= 3.490658503988659
10 <= vx,1 <= 25
-8 <= vy,1 <= 8
-1.047197551196598 <= r,1 <= 1.047197551196598
theta,1 <= 1000
-0.3141592653589793 <= delta_f,1 <= 0.3141592653589793
-7200 <= Fx,1 <= 7200
-10 <= X,2 <= 1000
-80 <= Y,2 <= 80
-3.490658503988659 <= psi,2 <= 3.490658503988659
10 <= vx,2 <= 25
-8 <= vy,2 <= 8
-1.047197551196598 <= r,2 <= 1.047197551196598
theta,2 <= 1000
-0.3141592653589793 <= delta_f,2 <= 0.3141592653589793
-7200 <= Fx,2 <= 7200
-10 <= X,3 <= 1000
-80 <= Y,3 <= 80
-3.490658503988659 <= psi,3 <= 3.490658503988659
10 <= vx,3 <= 25
-8 <= vy,3 <= 8
-1.047197551196598 <= r,3 <= 1.047197551196598
theta,3 <= 1000
-0.3141592653589793 <= delta_f,3 <= 0.3141592653589793
-7200 <= Fx,3 <= 7200
-10 <= X,4 <= 1000
-80 <= Y,4 <= 80
-3.490658503988659 <= psi,4 <= 3.490658503988659
10 <= vx,4 <= 25
-8 <= vy,4 <= 8
-1.047197551196598 <= r,4 <= 1.047197551196598
theta,4 <= 1000
-0.3141592653589793 <= delta_f,4 <= 0.3141592653589793
-7200 <= Fx,4 <= 7200
-10 <= X,5 <= 1000
-80 <= Y,5 <= 80
-3.490658503988659 <= psi,5 <= 3.490658503988659
10 <= vx,5 <= 25
-8 <= vy,5 <= 8
-1.047197551196598 <= r,5 <= 1.047197551196598
theta,5 <= 1000
-0.3141592653589793 <= delta_f,5 <= 0.3141592653589793
-7200 <= Fx,5 <= 7200
-1.570796326794897 <= ddelta_f,0 <= 1.570796326794897
-7200 <= dFx,0 <= 7200
-1.570796326794897 <= ddelta_f,1 <= 1.570796326794897
-7200 <= dFx,1 <= 7200
-1.570796326794897 <= ddelta_f,2 <= 1.570796326794897
-7200 <= dFx,2 <= 7200
-1.570796326794897 <= ddelta_f,3 <= 1.570796326794897
-7200 <= dFx,3 <= 7200
-1.570796326794897 <= ddelta_f,4 <= 1.570796326794897
-7200 <= dFx,4 <= 7200
-1.2645 <= alpha_f,0 <= 1.2645
-0.95174 <= alpha_r,0 <= 0.95174
6729.059776719329 <= Ffy1,0 <= 6729.25977671933
-33531.6911 <= Ffy2,0 <= 41496.7162
-96644.04300000001 <= Ffy3,0 <= 99396.2841
-173712.8411 <= Ffy4,0 <= 173712.8411
-99396.28599999999 <= Ffy5,0 <= 96644.045
-41496.717 <= Ffy6,0 <= 33531.692
-6729.259775758981 <= Ffy7,0 <= -6729.05977575898
7439.873091940705 <= Fry1,0 <= 7440.073091940706
-25524.252 <= Fry2,0 <= 34270.5677
-75817.2206 <= Fry3,0 <= 78834.49589999999
-136501.9151 <= Fry4,0 <= 136501.9151
-78834.5095 <= Fry5,0 <= 75817.2353
-34270.5802 <= Fry6,0 <= 25524.2666
-7440.073072357328 <= Fry7,0 <= -7439.873072357327
FxDrag,0 = 155.6175
-3600 <= Ffx_brake,0 <= 3600
-2.22045e-16 <= Ffx_drive,0 <= 2.22045e-16
-3600 <= Frx_brake,0 <= 3600
-7200 <= Frx_drive,0 <= 7200
-26.2488 <= dX,0 <= 26.2488
-26.2488 <= dY,0 <= 26.2488
-13.9893 <= dvx,0 <= 13.7833
-35.1379 <= dvy,0 <= 35.1379
-7.3924 <= dr,0 <= 7.3924
-10 <= DX,0 <= 10
-10 <= DY,0 <= 10
-5 <= Dvx,0 <= 5
-3.490658503988659 <= psi_d,0 <= 3.490658503988659
-10 <= e_c,0 <= 10
-10 <= e_l,0 <= 10
-1.2645 <= alpha_f,1 <= 1.2645
-0.95174 <= alpha_r,1 <= 0.95174
6729.059776719329 <= Ffy1,1 <= 6729.25977671933
-33531.6911 <= Ffy2,1 <= 41496.7162
-96644.04300000001 <= Ffy3,1 <= 99396.2841
-173712.8411 <= Ffy4,1 <= 173712.8411
-99396.28599999999 <= Ffy5,1 <= 96644.045
-41496.717 <= Ffy6,1 <= 33531.692
-6729.259775758981 <= Ffy7,1 <= -6729.05977575898
7439.873091940705 <= Fry1,1 <= 7440.073091940706
-25524.252 <= Fry2,1 <= 34270.5677
-75817.2206 <= Fry3,1 <= 78834.49589999999
-136501.9151 <= Fry4,1 <= 136501.9151
-78834.5095 <= Fry5,1 <= 75817.2353
-34270.5802 <= Fry6,1 <= 25524.2666
-7440.073072357328 <= Fry7,1 <= -7439.873072357327
FxDrag,1 = 155.6175
-3600 <= Ffx_brake,1 <= 3600
-2.22045e-16 <= Ffx_drive,1 <= 2.22045e-16
-3600 <= Frx_brake,1 <= 3600
-7200 <= Frx_drive,1 <= 7200
-26.2488 <= dX,1 <= 26.2488
-26.2488 <= dY,1 <= 26.2488
-13.9893 <= dvx,1 <= 13.7833
-35.1379 <= dvy,1 <= 35.1379
-7.3924 <= dr,1 <= 7.3924
-10 <= DX,1 <= 10
-10 <= DY,1 <= 10
-5 <= Dvx,1 <= 5
-3.490658503988659 <= psi_d,1 <= 3.490658503988659
-10 <= e_c,1 <= 10
-10 <= e_l,1 <= 10
-1.2645 <= alpha_f,2 <= 1.2645
-0.95174 <= alpha_r,2 <= 0.95174
6729.059776719329 <= Ffy1,2 <= 6729.25977671933
-33531.6911 <= Ffy2,2 <= 41496.7162
-96644.04300000001 <= Ffy3,2 <= 99396.2841
-173712.8411 <= Ffy4,2 <= 173712.8411
-99396.28599999999 <= Ffy5,2 <= 96644.045
-41496.717 <= Ffy6,2 <= 33531.692
-6729.259775758981 <= Ffy7,2 <= -6729.05977575898
7439.873091940705 <= Fry1,2 <= 7440.073091940706
-25524.252 <= Fry2,2 <= 34270.5677
-75817.2206 <= Fry3,2 <= 78834.49589999999
-136501.9151 <= Fry4,2 <= 136501.9151
-78834.5095 <= Fry5,2 <= 75817.2353
-34270.5802 <= Fry6,2 <= 25524.2666
-7440.073072357328 <= Fry7,2 <= -7439.873072357327
FxDrag,2 = 155.6175
-3600 <= Ffx_brake,2 <= 3600
-2.22045e-16 <= Ffx_drive,2 <= 2.22045e-16
-3600 <= Frx_brake,2 <= 3600
-7200 <= Frx_drive,2 <= 7200
-26.2488 <= dX,2 <= 26.2488
-26.2488 <= dY,2 <= 26.2488
-13.9893 <= dvx,2 <= 13.7833
-35.1379 <= dvy,2 <= 35.1379
-7.3924 <= dr,2 <= 7.3924
-10 <= DX,2 <= 10
-10 <= DY,2 <= 10
-5 <= Dvx,2 <= 5
-3.490658503988659 <= psi_d,2 <= 3.490658503988659
-10 <= e_c,2 <= 10
-10 <= e_l,2 <= 10
-1.2645 <= alpha_f,3 <= 1.2645
-0.95174 <= alpha_r,3 <= 0.95174
6729.059776719329 <= Ffy1,3 <= 6729.25977671933
-33531.6911 <= Ffy2,3 <= 41496.7162
-96644.04300000001 <= Ffy3,3 <= 99396.2841
-173712.8411 <= Ffy4,3 <= 173712.8411
-99396.28599999999 <= Ffy5,3 <= 96644.045
-41496.717 <= Ffy6,3 <= 33531.692
-6729.259775758981 <= Ffy7,3 <= -6729.05977575898
7439.873091940705 <= Fry1,3 <= 7440.073091940706
-25524.252 <= Fry2,3 <= 34270.5677
-75817.2206 <= Fry3,3 <= 78834.49589999999
-136501.9151 <= Fry4,3 <= 136501.9151
-78834.5095 <= Fry5,3 <= 75817.2353
-34270.5802 <= Fry6,3 <= 25524.2666
-7440.073072357328 <= Fry7,3 <= -7439.873072357327
FxDrag,3 = 155.6175
-3600 <= Ffx_brake,3 <= 3600
-2.22045e-16 <= Ffx_drive,3 <= 2.22045e-16
-3600 <= Frx_brake,3 <= 3600
-7200 <= Frx_drive,3 <= 7200
-26.2488 <= dX,3 <= 26.2488
-26.2488 <= dY,3 <= 26.2488
-13.9893 <= dvx,3 <= 13.7833
-35.1379 <= dvy,3 <= 35.1379
-7.3924 <= dr,3 <= 7.3924
-10 <= DX,3 <= 10
-10 <= DY,3 <= 10
-5 <= Dvx,3 <= 5
-3.490658503988659 <= psi_d,3 <= 3.490658503988659
-10 <= e_c,3 <= 10
-10 <= e_l,3 <= 10
-1.2645 <= alpha_f,4 <= 1.2645
-0.95174 <= alpha_r,4 <= 0.95174
6729.059776719329 <= Ffy1,4 <= 6729.25977671933
-33531.6911 <= Ffy2,4 <= 41496.7162
-96644.04300000001 <= Ffy3,4 <= 99396.2841
-173712.8411 <= Ffy4,4 <= 173712.8411
-99396.28599999999 <= Ffy5,4 <= 96644.045
-41496.717 <= Ffy6,4 <= 33531.692
-6729.259775758981 <= Ffy7,4 <= -6729.05977575898
7439.873091940705 <= Fry1,4 <= 7440.073091940706
-25524.252 <= Fry2,4 <= 34270.5677
-75817.2206 <= Fry3,4 <= 78834.49589999999
-136501.9151 <= Fry4,4 <= 136501.9151
-78834.5095 <= Fry5,4 <= 75817.2353
-34270.5802 <= Fry6,4 <= 25524.2666
-7440.073072357328 <= Fry7,4 <= -7439.873072357327
FxDrag,4 = 155.6175
-3600 <= Ffx_brake,4 <= 3600
-2.22045e-16 <= Ffx_drive,4 <= 2.22045e-16
-3600 <= Frx_brake,4 <= 3600
-7200 <= Frx_drive,4 <= 7200
-26.2488 <= dX,4 <= 26.2488
-26.2488 <= dY,4 <= 26.2488
-13.9893 <= dvx,4 <= 13.7833
-35.1379 <= dvy,4 <= 35.1379
-7.3924 <= dr,4 <= 7.3924
-10 <= DX,4 <= 10
-10 <= DY,4 <= 10
-5 <= Dvx,4 <= 5
-3.490658503988659 <= psi_d,4 <= 3.490658503988659
-10 <= e_c,4 <= 10
-10 <= e_l,4 <= 10
100 <= QC1,0 <= 625
-25 <= QC2,0 <= 25
-25 <= QC3,0 <= 25
-8 <= QC4,0 <= 8
-8 <= QC5,0 <= 8
-2114.0279 <= QC6,0 <= 2114.0279
-1130.9733 <= QC7,0 <= 1130.9734
-26.18 <= QC8,0 <= 26.18
-8.3776 <= QC9,0 <= 8.3776
-10 <= QC10,0 <= 10
-10 <= QC11,0 <= 10
-10 <= QC12,0 <= 10
-10 <= QC13,0 <= 10
100 <= QC1,1 <= 625
-25 <= QC2,1 <= 25
-25 <= QC3,1 <= 25
-8 <= QC4,1 <= 8
-8 <= QC5,1 <= 8
-2114.0279 <= QC6,1 <= 2114.0279
-1130.9733 <= QC7,1 <= 1130.9734
-26.18 <= QC8,1 <= 26.18
-8.3776 <= QC9,1 <= 8.3776
-10 <= QC10,1 <= 10
-10 <= QC11,1 <= 10
-10 <= QC12,1 <= 10
-10 <= QC13,1 <= 10
100 <= QC1,2 <= 625
-25 <= QC2,2 <= 25
-25 <= QC3,2 <= 25
-8 <= QC4,2 <= 8
-8 <= QC5,2 <= 8
-2114.0279 <= QC6,2 <= 2114.0279
-1130.9733 <= QC7,2 <= 1130.9734
-26.18 <= QC8,2 <= 26.18
-8.3776 <= QC9,2 <= 8.3776
-10 <= QC10,2 <= 10
-10 <= QC11,2 <= 10
-10 <= QC12,2 <= 10
-10 <= QC13,2 <= 10
100 <= QC1,3 <= 625
-25 <= QC2,3 <= 25
-25 <= QC3,3 <= 25
-8 <= QC4,3 <= 8
-8 <= QC5,3 <= 8
-2114.0279 <= QC6,3 <= 2114.0279
-1130.9733 <= QC7,3 <= 1130.9734
-26.18 <= QC8,3 <= 26.18
-8.3776 <= QC9,3 <= 8.3776
-10 <= QC10,3 <= 10
-10 <= QC11,3 <= 10
-10 <= QC12,3 <= 10
-10 <= QC13,3 <= 10
100 <= QC1,4 <= 625
-25 <= QC2,4 <= 25
-25 <= QC3,4 <= 25
-8 <= QC4,4 <= 8
-8 <= QC5,4 <= 8
-2114.0279 <= QC6,4 <= 2114.0279
-1130.9733 <= QC7,4 <= 1130.9734
-26.18 <= QC8,4 <= 26.18
-8.3776 <= QC9,4 <= 8.3776
-10 <= QC10,4 <= 10
-10 <= QC11,4 <= 10
-10 <= QC12,4 <= 10
-10 <= QC13,4 <= 10
-6729.259775758981 <= MIN1,0 <= 6729.25977671933
-7440.073072357328 <= MIN2,0 <= 7440.073091940706
-3600 <= MIN3,0 <= 0
-6729.259775758981 <= MIN1,1 <= 6729.25977671933
-7440.073072357328 <= MIN2,1 <= 7440.073091940706
-3600 <= MIN3,1 <= 0
-6729.259775758981 <= MIN1,2 <= 6729.25977671933
-7440.073072357328 <= MIN2,2 <= 7440.073091940706
-3600 <= MIN3,2 <= 0
-6729.259775758981 <= MIN1,3 <= 6729.25977671933
-7440.073072357328 <= MIN2,3 <= 7440.073091940706
-3600 <= MIN3,3 <= 0
-6729.259775758981 <= MIN1,4 <= 6729.25977671933
-7440.073072357328 <= MIN2,4 <= 7440.073091940706
-3600 <= MIN3,4 <= 0
-6729.259775758981 <= MAX1,0 <= 99396.2841
-6729.259775758981 <= MAX2,0 <= 173712.8411
-6729.259775758981 <= MAX3,0 <= 41496.7162
6729.059776719329 <= MAX4,0 <= 6729.25977671933
-7440.073072357328 <= MAX5,0 <= 78834.49589999999
-7440.073072357328 <= MAX6,0 <= 136501.9151
-7440.073072357328 <= MAX7,0 <= 34270.5677
7439.873091940705 <= MAX8,0 <= 7440.073091940706
-3600 <= MAX9,0 <= 7200
-6729.259775758981 <= MAX1,1 <= 99396.2841
-6729.259775758981 <= MAX2,1 <= 173712.8411
-6729.259775758981 <= MAX3,1 <= 41496.7162
6729.059776719329 <= MAX4,1 <= 6729.25977671933
-7440.073072357328 <= MAX5,1 <= 78834.49589999999
-7440.073072357328 <= MAX6,1 <= 136501.9151
-7440.073072357328 <= MAX7,1 <= 34270.5677
7439.873091940705 <= MAX8,1 <= 7440.073091940706
-3600 <= MAX9,1 <= 7200
-6729.259775758981 <= MAX1,2 <= 99396.2841
-6729.259775758981 <= MAX2,2 <= 173712.8411
-6729.259775758981 <= MAX3,2 <= 41496.7162
6729.059776719329 <= MAX4,2 <= 6729.25977671933
-7440.073072357328 <= MAX5,2 <= 78834.49589999999
-7440.073072357328 <= MAX6,2 <= 136501.9151
-7440.073072357328 <= MAX7,2 <= 34270.5677
7439.873091940705 <= MAX8,2 <= 7440.073091940706
-3600 <= MAX9,2 <= 7200
-6729.259775758981 <= MAX1,3 <= 99396.2841
-6729.259775758981 <= MAX2,3 <= 173712.8411
-6729.259775758981 <= MAX3,3 <= 41496.7162
6729.059776719329 <= MAX4,3 <= 6729.25977671933
-7440.073072357328 <= MAX5,3 <= 78834.49589999999
-7440.073072357328 <= MAX6,3 <= 136501.9151
-7440.073072357328 <= MAX7,3 <= 34270.5677
7439.873091940705 <= MAX8,3 <= 7440.073091940706
-3600 <= MAX9,3 <= 7200
-6729.259775758981 <= MAX1,4 <= 99396.2841
-6729.259775758981 <= MAX2,4 <= 173712.8411
-6729.259775758981 <= MAX3,4 <= 41496.7162
6729.059776719329 <= MAX4,4 <= 6729.25977671933
-7440.073072357328 <= MAX5,4 <= 78834.49589999999
-7440.073072357328 <= MAX6,4 <= 136501.9151
-7440.073072357328 <= MAX7,4 <= 34270.5677
7439.873091940705 <= MAX8,4 <= 7440.073091940706
-3600 <= MAX9,4 <= 7200
-1 <= SIN1,0 <= 1
-1 <= SIN2,0 <= 1
-1 <= SIN1,1 <= 1
-1 <= SIN2,1 <= 1
-1 <= SIN1,2 <= 1
-1 <= SIN2,2 <= 1
-1 <= SIN1,3 <= 1
-1 <= SIN2,3 <= 1
-1 <= SIN1,4 <= 1
-1 <= SIN2,4 <= 1
-1 <= COS1,0 <= 1
-1 <= COS2,0 <= 1
-1 <= COS1,1 <= 1
-1 <= COS2,1 <= 1
-1 <= COS1,2 <= 1
-1 <= COS2,2 <= 1
-1 <= COS1,3 <= 1
-1 <= COS2,3 <= 1
-1 <= COS1,4 <= 1
-1 <= COS2,4 <= 1
NORM1,0 <= 50.636
NORM1,1 <= 50.636
NORM1,2 <= 50.636
NORM1,3 <= 50.636
NORM1,4 <= 50.636
General Constraints
MAX1,0: MAX1,0 = MAX ( Ffy3,0 , Ffy5,0 , Ffy6,0 , Ffy7,0 )
MAX2,0: MAX2,0 = MAX ( Ffy4,0 , Ffy5,0 , Ffy6,0 , Ffy7,0 )
MAX3,0: MAX3,0 = MAX ( Ffy2,0 , Ffy6,0 , Ffy7,0 )
MAX4,0: MAX4,0 = MAX ( Ffy1,0 , Ffy7,0 )
MAX5,0: MAX5,0 = MAX ( Fry3,0 , Fry5,0 , Fry6,0 , Fry7,0 )
MAX6,0: MAX6,0 = MAX ( Fry4,0 , Fry5,0 , Fry6,0 , Fry7,0 )
MAX7,0: MAX7,0 = MAX ( Fry2,0 , Fry6,0 , Fry7,0 )
MAX8,0: MAX8,0 = MAX ( Fry1,0 , Fry7,0 )
MAX9,0: MAX9,0 = MAX ( Frx_brake,0 , Frx_drive,0 )
MAX1,1: MAX1,1 = MAX ( Ffy3,1 , Ffy5,1 , Ffy6,1 , Ffy7,1 )
MAX2,1: MAX2,1 = MAX ( Ffy4,1 , Ffy5,1 , Ffy6,1 , Ffy7,1 )
MAX3,1: MAX3,1 = MAX ( Ffy2,1 , Ffy6,1 , Ffy7,1 )
MAX4,1: MAX4,1 = MAX ( Ffy1,1 , Ffy7,1 )
MAX5,1: MAX5,1 = MAX ( Fry3,1 , Fry5,1 , Fry6,1 , Fry7,1 )
MAX6,1: MAX6,1 = MAX ( Fry4,1 , Fry5,1 , Fry6,1 , Fry7,1 )
MAX7,1: MAX7,1 = MAX ( Fry2,1 , Fry6,1 , Fry7,1 )
MAX8,1: MAX8,1 = MAX ( Fry1,1 , Fry7,1 )
MAX9,1: MAX9,1 = MAX ( Frx_brake,1 , Frx_drive,1 )
MAX1,2: MAX1,2 = MAX ( Ffy3,2 , Ffy5,2 , Ffy6,2 , Ffy7,2 )
MAX2,2: MAX2,2 = MAX ( Ffy4,2 , Ffy5,2 , Ffy6,2 , Ffy7,2 )
MAX3,2: MAX3,2 = MAX ( Ffy2,2 , Ffy6,2 , Ffy7,2 )
MAX4,2: MAX4,2 = MAX ( Ffy1,2 , Ffy7,2 )
MAX5,2: MAX5,2 = MAX ( Fry3,2 , Fry5,2 , Fry6,2 , Fry7,2 )
MAX6,2: MAX6,2 = MAX ( Fry4,2 , Fry5,2 , Fry6,2 , Fry7,2 )
MAX7,2: MAX7,2 = MAX ( Fry2,2 , Fry6,2 , Fry7,2 )
MAX8,2: MAX8,2 = MAX ( Fry1,2 , Fry7,2 )
MAX9,2: MAX9,2 = MAX ( Frx_brake,2 , Frx_drive,2 )
MAX1,3: MAX1,3 = MAX ( Ffy3,3 , Ffy5,3 , Ffy6,3 , Ffy7,3 )
MAX2,3: MAX2,3 = MAX ( Ffy4,3 , Ffy5,3 , Ffy6,3 , Ffy7,3 )
MAX3,3: MAX3,3 = MAX ( Ffy2,3 , Ffy6,3 , Ffy7,3 )
MAX4,3: MAX4,3 = MAX ( Ffy1,3 , Ffy7,3 )
MAX5,3: MAX5,3 = MAX ( Fry3,3 , Fry5,3 , Fry6,3 , Fry7,3 )
MAX6,3: MAX6,3 = MAX ( Fry4,3 , Fry5,3 , Fry6,3 , Fry7,3 )
MAX7,3: MAX7,3 = MAX ( Fry2,3 , Fry6,3 , Fry7,3 )
MAX8,3: MAX8,3 = MAX ( Fry1,3 , Fry7,3 )
MAX9,3: MAX9,3 = MAX ( Frx_brake,3 , Frx_drive,3 )
MAX1,4: MAX1,4 = MAX ( Ffy3,4 , Ffy5,4 , Ffy6,4 , Ffy7,4 )
MAX2,4: MAX2,4 = MAX ( Ffy4,4 , Ffy5,4 , Ffy6,4 , Ffy7,4 )
MAX3,4: MAX3,4 = MAX ( Ffy2,4 , Ffy6,4 , Ffy7,4 )
MAX4,4: MAX4,4 = MAX ( Ffy1,4 , Ffy7,4 )
MAX5,4: MAX5,4 = MAX ( Fry3,4 , Fry5,4 , Fry6,4 , Fry7,4 )
MAX6,4: MAX6,4 = MAX ( Fry4,4 , Fry5,4 , Fry6,4 , Fry7,4 )
MAX7,4: MAX7,4 = MAX ( Fry2,4 , Fry6,4 , Fry7,4 )
MAX8,4: MAX8,4 = MAX ( Fry1,4 , Fry7,4 )
MAX9,4: MAX9,4 = MAX ( Frx_brake,4 , Frx_drive,4 )
MIN1,0: MIN1,0 = MIN ( MAX1,0 , MAX2,0 , MAX3,0 , MAX4,0 )
MIN2,0: MIN2,0 = MIN ( MAX5,0 , MAX6,0 , MAX7,0 , MAX8,0 )
MIN3,0: MIN3,0 = MIN ( Ffx_brake,0 , Ffx_drive,0 )
MIN1,1: MIN1,1 = MIN ( MAX1,1 , MAX2,1 , MAX3,1 , MAX4,1 )
MIN2,1: MIN2,1 = MIN ( MAX5,1 , MAX6,1 , MAX7,1 , MAX8,1 )
MIN3,1: MIN3,1 = MIN ( Ffx_brake,1 , Ffx_drive,1 )
MIN1,2: MIN1,2 = MIN ( MAX1,2 , MAX2,2 , MAX3,2 , MAX4,2 )
MIN2,2: MIN2,2 = MIN ( MAX5,2 , MAX6,2 , MAX7,2 , MAX8,2 )
MIN3,2: MIN3,2 = MIN ( Ffx_brake,2 , Ffx_drive,2 )
MIN1,3: MIN1,3 = MIN ( MAX1,3 , MAX2,3 , MAX3,3 , MAX4,3 )
MIN2,3: MIN2,3 = MIN ( MAX5,3 , MAX6,3 , MAX7,3 , MAX8,3 )
MIN3,3: MIN3,3 = MIN ( Ffx_brake,3 , Ffx_drive,3 )
MIN1,4: MIN1,4 = MIN ( MAX1,4 , MAX2,4 , MAX3,4 , MAX4,4 )
MIN2,4: MIN2,4 = MIN ( MAX5,4 , MAX6,4 , MAX7,4 , MAX8,4 )
MIN3,4: MIN3,4 = MIN ( Ffx_brake,4 , Ffx_drive,4 )
NORM1,0: NORM1,0 = NORM ( 2 ) ( vx,0 , vy,0 )
NORM1,1: NORM1,1 = NORM ( 2 ) ( vx,1 , vy,1 )
NORM1,2: NORM1,2 = NORM ( 2 ) ( vx,2 , vy,2 )
NORM1,3: NORM1,3 = NORM ( 2 ) ( vx,3 , vy,3 )
NORM1,4: NORM1,4 = NORM ( 2 ) ( vx,4 , vy,4 )
NORM2: NORM2 = NORM ( 1 ) ( ddelta_f,0 , ddelta_f,1 , ddelta_f,2 ,
ddelta_f,3 , ddelta_f,4 )
NORM3: NORM3 = NORM ( 1 ) ( dFx,0 , dFx,1 , dFx,2 , dFx,3 , dFx,4 )
NORM4: NORM4 = NORM ( 1 ) ( e_c,0 , e_c,1 , e_c,2 , e_c,3 , e_c,4 )
NORM5: NORM5 = NORM ( 1 ) ( e_l,0 , e_l,1 , e_l,2 , e_l,3 , e_l,4 )
NORM6: NORM6 = NORM ( 1 ) ( Dvx,0 , Dvx,1 , Dvx,2 , Dvx,3 , Dvx,4 )
SIN1,0: SIN1,0 = SIN ( psi,0 )
SIN2,0: SIN2,0 = SIN ( psi_d,0 )
SIN1,1: SIN1,1 = SIN ( psi,1 )
SIN2,1: SIN2,1 = SIN ( psi_d,1 )
SIN1,2: SIN1,2 = SIN ( psi,2 )
SIN2,2: SIN2,2 = SIN ( psi_d,2 )
SIN1,3: SIN1,3 = SIN ( psi,3 )
SIN2,3: SIN2,3 = SIN ( psi_d,3 )
SIN1,4: SIN1,4 = SIN ( psi,4 )
SIN2,4: SIN2,4 = SIN ( psi_d,4 )
COS1,0: COS1,0 = COS ( psi,0 )
COS2,0: COS2,0 = COS ( psi_d,0 )
COS1,1: COS1,1 = COS ( psi,1 )
COS2,1: COS2,1 = COS ( psi_d,1 )
COS1,2: COS1,2 = COS ( psi,2 )
COS2,2: COS2,2 = COS ( psi_d,2 )
COS1,3: COS1,3 = COS ( psi,3 )
COS2,3: COS2,3 = COS ( psi_d,3 )
COS1,4: COS1,4 = COS ( psi,4 )
COS2,4: COS2,4 = COS ( psi_d,4 )
End0 -
Hi Roald,
Thanks you very much for sharing.
I just tried running the model on my machine. It solves in under 0.5 seconds using FuncNonlinear=1. Is this a similar run time you see? Could you please share the log output of your run for this particular model for comparison?
Please note that you have many very small coefficients and rhs values below the default FeasibilityTol value. Thus, I would recommend to set FeasibilityTol=1e-9. This would make sure that all coefficients are greater than the feasibility tolerance. This should avoid most of possible numerical issues.
Running Gurobi v11.0.1 with FuncNonlinear=1 and FeasibilityTol=1e-9 is faster for this particular model on my machine.
You might want to experiment with providing a MIP start, see How do I use MIP start? This might give the performance boost you need. Maybe you could use the solution of the previous step as a MIP start for the next step.
Best regards,
Jaromił0 -
Hi Jaromił,
Thanks again for your useful insights. In my case, the results also have a median solving time between 0.5 & 1 seconds (over the entire simulation of 12s). This is indeed a similar runtime I encounter for this particular .lp file. Below is the log output of my run based on the above .lp file and the corresponding result by making use of FuncNonlinear=1. As can be observed, I have a nonconvex problem and, moreover, with the help of MIPFocus, I try to force Gurobi in finding feasible solutions quickly.
Please note that you have many very small coefficients and rhs values below the default FeasibilityTol value. Thus, I would recommend to set FeasibilityTol=1e-9. This would make sure that all coefficients are greater than the feasibility tolerance. This should avoid most of possible numerical issues.
This does avoid most numerical issues. However, it also increases the computation time. Although I am interested in feasible that do not result in an accumulation of numerical issues, I also do not need the most optimal solution. I have been tuning the FeasibilityTol parameter before, and found that keeping the default settings is most beneficial for my case. Adding this FeasibilityTol parameter results in a median computation time over the entire simulation of 0.9s. I have also tried to limit the optimality of the results by utilizing the MIPGap parameter, which does prove to be effective. Moreover, I have been following the Parameter Guidelines for MIP outlined in section 13.1 of the Gurobi Optimizer Reference Manual (version 11). These steps show minor improvements, but my iteration count is still very high. What should be a reasonable iteration count for a model as provided above?
You might want to experiment with providing a MIP start, see How do I use MIP start? This might give the performance boost you need. Maybe you could use the solution of the previous step as a MIP start for the next step.
Another great suggestion I have been experimenting with as well. However, unexpectedly, it leads to an increase in computation time per time step. Do you suggest to only use the results of the states of the previous step, or also the inputs, or all results? I have been trying all options, but to no avail so far.
Thanks again for your time and help!
Best regards,
Roald
Set parameter Username
Set parameter FeasibilityTol to value 1e-09
Set parameter MIPFocus to value 1
Set parameter NonConvex to value 2
Set parameter FuncNonlinear to value 1
Academic license - for non-commercial use only - expires 2025-03-20
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (win64 - Windows 10.0 (19045.2))
CPU model: Intel(R) Xeon(R) W-2133 CPU @ 3.60GHz, instruction set [SSE2|AVX|AVX2|AVX512]
Thread count: 6 physical cores, 12 logical processors, using up to 12 threads
Optimize a model with 214 rows, 379 columns and 509 nonzeros
Model fingerprint: 0x71d24384
Model has 65 quadratic constraints
Model has 90 general constraints
Variable types: 379 continuous, 0 integer (0 binary)
Coefficient statistics:
Matrix range [5e-04, 1e+05]
QMatrix range [1e+00, 1e+00]
QLMatrix range [1e+00, 1e+00]
Objective range [2e-04, 2e+01]
Bounds range [2e-16, 2e+05]
RHS range [2e-10, 7e+03]
Presolve removed 10 rows and 145 columns
Presolve time: 0.01s
Presolved: 351 rows, 235 columns, 1032 nonzeros
Presolved model has 31 bilinear constraint(s)
Presolved model has 4 nonlinear constraint(s)
Solving non-convex MINLP
Variable types: 170 continuous, 65 integer (65 binary)
Root relaxation: objective 2.068782e-02, 294 iterations, 0.00 seconds (0.00 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 0.02069 0 27 - 0.02069 - - 0s
0 0 0.02072 0 32 - 0.02072 - - 0s
0 0 0.02072 0 29 - 0.02072 - - 0s
0 0 0.02085 0 26 - 0.02085 - - 0s
0 0 0.02085 0 23 - 0.02085 - - 0s
0 0 0.02085 0 27 - 0.02085 - - 0s
0 0 0.02088 0 34 - 0.02088 - - 0s
0 0 0.02088 0 25 - 0.02088 - - 0s
0 0 0.02088 0 23 - 0.02088 - - 0s
0 0 0.02125 0 18 - 0.02125 - - 0s
H 0 0 73.2835749 0.02125 100% - 0s
0 2 0.02125 0 18 73.28357 0.02125 100% - 0s
H 1 4 59.3716668 0.02125 100% 0.0 0s
H 137 144 59.3716668 0.02133 100% 30.5 0s
H 214 187 27.9472814 0.02133 100% 27.7 0s
H 325 249 16.0060577 0.02133 100% 27.5 0s
* 472 332 47 16.0060531 0.02133 100% 23.8 0s
H 500 370 10.7853237 0.02133 100% 23.2 0s
H 517 370 0.0277356 0.02133 23.1% 23.2 0s
* 692 248 11 0.0277345 0.02318 16.4% 19.6 0s
* 693 248 11 0.0277328 0.02318 16.4% 19.6 0s
* 741 248 18 0.0277251 0.02357 15.0% 18.8 0s
* 826 206 20 0.0277247 0.02592 6.50% 17.4 0s
* 827 206 18 0.0277193 0.02592 6.48% 17.4 0s
* 852 206 23 0.0277100 0.02592 6.45% 16.9 0s
* 853 206 23 0.0277100 0.02592 6.45% 16.9 0s
* 903 206 22 0.0277094 0.02771 0.00% 16.1 0s
Cutting planes:
Gomory: 1
Cover: 1
Implied bound: 5
Clique: 2
MIR: 7
Flow cover: 18
RLT: 16
Relax-and-lift: 8
BQP: 1
PSD: 2
Explored 983 nodes (16188 simplex iterations) in 0.55 seconds (0.29 work units)
Thread count was 12 (of 12 available processors)
Solution count 10: 0.0277094 0.02771 0.02771 ... 10.7853
Optimal solution found (tolerance 1.00e-04)
Best objective 2.770943671177e-02, best bound 2.770943671288e-02, gap 0.0000%
result =
struct with fields:
status: 'OPTIMAL'
versioninfo: [1×1 struct]
runtime: 0.5620
work: 0.2886
objval: 0.0277
x: [379×1 double]
slack: [214×1 double]
qcslack: [65×1 double]
poolobjbound: 0.0277
pool: [1×10 struct]
mipgap: 0
objbound: 0.0277
objboundc: 0.0277
itercount: 16188
baritercount: 0
nodecount: 983
maxvio: 9.8161e-100 -
Hi Roald,
What should be a reasonable iteration count for a model as provided above?
This cannot be determined a priori for any model, so I don't think that this is the right approach here.
As can be observed, I have a nonconvex problem and, moreover, with the help of MIPFocus, I try to force Gurobi in finding feasible solutions quickly.
Setting MIPFocus=1 makes sense. However, it may make your models slower because more time is spent in heuristics. I would avoid setting MIPFocus in your case, because it can result in long running corner cases.
Note that with Gurobi v11 you do not have to set the NonConvex parameter anymore.
Another great suggestion I have been experimenting with as well. However, unexpectedly, it leads to an increase in computation time per time step. Do you suggest to only use the results of the states of the previous step, or also the inputs, or all results? I have been trying all options, but to no avail so far.
I think that providing a good first feasible point is the way to go here if you want to speed-up the solution process. You can do the following experiment:
- Solve a model and save the solution point
- Use the reset method to clear all optimization data from the model
- Set the Start attribute of each variable to the optimal solution point value obtained in step 1
- Optimize the model
You should see, that the optimization process converges almost immediately confirming that finding the best solution point is the real bottleneck here. Thus, I think you should to try to come with a way to provide a (potentially partial) MIP Start to your models. I am not sure what is best to use here. Maybe it is the solution of a previous step, maybe only use some values of the previous solution? Maybe you can come up with a heuristical way of providing a MIP Start, e.g., you know that some variables have to attain a specific value. You could also try experimenting with the Variable Hints, see What are the differences between MIP Start and Variable Hints?
Best regards,
Jaromił0 -
Hi Jaromił,
This cannot be determined a priori for any model, so I don't think that this is the right approach here.
Of course, that makes sense. In the end, the goal is to decrease the computation time, not the iteration count. I was focusing on the iteration count as based on my experience this should not be in the range as described. At the same time, if no feasible solution is generated for low iteration count, this is not advantageous at all.
Setting MIPFocus=1 makes sense. However, it may make your models slower because more time is spent in heuristics. I would avoid setting MIPFocus in your case, because it can result in long running corner cases.
Interesting! I will take you up on your advise and turn off the MIPFocus parameter. I experienced small improvements with respect to computation time by setting MIPFocus=1, but this is driving scenario specific in my case.
Note that with Gurobi v11 you do not have to set the NonConvex parameter anymore.
Good to know!
I think that providing a good first feasible point is the way to go here if you want to speed-up the solution process.
I will continue investigating this direction. Especially, since a first guess should generally improve results. I will also experiment with the VariableHints parameter. The experiment you provide is actually similar to how I have implemented it, but I have not used the reset method. This might change the results, but is this possible in MATLAB?
One additional parameter that theoretically should work is the BestObjStop, for which I take the objval result of the previous step as a value for the next step. In practice, it gives similar to worse computation times while slightly improving performance (negligible).
Again I want to thank you for your time and help, it is much appreciated!
Best regards,
Roald
0 -
Hi Roald,
The experiment you provide is actually similar to how I have implemented it, but I have not used the reset method. This might change the results, but is this possible in MATLAB?
Good point, it should not be necessary in MATLAB, so you don't need to care about resetting anything.
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
7 comments