I have a large nonlinear and nonconvex problem. It also has sin (theta) and cos(theta).
While gurobipy accepts sin or cos using the general constraint. gurobipy uses piecewise linear approximation, which means gurobipy introduces binary variables.
If theta dimension is 10,000; gurobipy introduces at least 10,000 binary variables to formulate the sin(theta) or cos(theta). Does that mean it would be better to solve the problem with ipopt, if the computation speed is important? As we want to avoid adding a huge number of binary variables.
ipopt can solve the nonlinear problem without introducing binary variables.
I guess ipopt will be faster, but gurobipy will converge to a better solution.
Any thought?