Before I implemented the MPC method, I ran CVX with the regular dynamic program. It kept saying the process failed, but when I graph the constraints and outcomes, all the constraints are satisfied. It did produce some good results for the variables.
Then after I built the MPC model and tried to run the program, it will run into this error after 2 stages out of 100 stages every time. I wonder if there is any way to fix this issue.
You need to provide much more information for anyone to be able to help you.
Seeing the 1e300 and exp, have you examined the input data for the stage which generated the error message? Perhaps some huge number(s), at least after exponentiation?
What do you mean by you “transitioned to CVXPy”. Did you try running the same program again in CVX after you transitioned to CVXPy, and then it did not produce an error message?