Open karthyyy opened 18 hours ago
The index error you mentioned is indeed an error in the example.
When ´OptimTime´ is off, the example behaves like expected. GRAMPC does try to find a trade-off between the control and the setpoint specified by ´udes´.
Did I miss something @avoelz ?
@ThoreWietzke,
Thanks for the reply. In that case, can I put the state error (x-xdes) in the cost function rather than putting it as Terminal constraint (or along with Terminal Constraint) ?
Regards Karthik
That would help the MPC to steer x to the desired state
Hi,
I was modifying Double Integrator example in PYGRAMPC and observed the following.
1) With OptimTIme = "On", the code is simulating correctly with states reached at around 3.5 sec. 2) With OptimTIme = "Off" in 'json' file, following error is shown,
So I changed "
if i + 1 > len(vec.t) or vec.t[i + 1] > Tsim:
" to "if i + 1 > len(vec.t) or vec.t[i] > Tsim:
" there is no simulation error but states are not reached to the desired values even after 8 sec. In the software manual example, for fixed time problem, the states are converged within 4sec.The JSON file content is as follows
Can someone please help to see whether I am missing any settings ?
Thanks n Regards, Karthik