Optimization computational time

I read several materials on the computational time of optimization models. The MILP computational time has always been faster than the NLP formulation. I then stumbled on an article which got that the computational time of the NLP was faster than the MILP counterpart. Both MILP and NLP formulations were done with Gurobi optimizer.

What’s the possibility of this?

Thanks

The short answer is it depends… on pretty much everything:

  • the size of your problem (number of variables / constraints)
  • the shape of the objective and constraints (linear / quadratic / conic / generic nonlinear)
  • the proportion of integer variables
  • the sparsity of the matrices involved
  • the specific solver you use
  • the cleverness of your formulation

So the paper you read was probably about a specific example, in which one of the approaches dominates, but no generic comparison is possible without knowing more about your use case

2 Likes

Thanks for your reply. Just curious.

Yes, the formulation is not general but particular to a problem.

1 Like