# &quot;How can I solve non-linear optimization with Gurobi Optimizer?&quot;

In the case that I have a non-linear optimization, is there any way to solve it using the Gurobi Solver?

##### Post Metadata
- Posted at: over 5 years ago
- Author title: Data Analyst at The Voleon Group
- Net upvotes: 1


## Comments
### Comment 1

These were some great insights at the time about handling non-linear problems in Gurobi. To add to this, recent versions of Gurobi have shown significant performance improvements for quadratic problems, particularly mixed-integer quadratic problems (MIQP, MIQCP, and non-convex MIQCP) and the v11.0 release can handle many types of nonlinear relationships. The ability to use piecewise linear approximations is still there and the suggestions for linearization and decomposition here remain very useful. It&#39;s up to the user to experiment and decide their preference based on the tradeoff between accuracy of modeling directly with nonlinear functions and performance of approximation.

Here&#39;s a blog from Gurobi on their nonlinear capability: https://www.gurobi.com/resources/nonlinear-solving-unlocking-new-levels-of-accuracy/

##### Comment Metadata
- Posted at: about 2 years ago
- Author title: Gurobi Expert



### Comment 2

Gurobi is primarily designed to solve linear mix integer programs. Gurobi does support Quadratic programming to some extent with pretty good performance. You can formulate it in the same way you formulate a linear problem. 

However if your problem is beyond quadratic then you&#39;ll need to convert your problem into a linear form. There are various ways to do this. 

You can introduce extra variables and constraints to reformulate the non linear parts in a linear fashion. For some non-linear operations like absolute values, min, max, etc. you can use &#39;General Constraint Helper Functions&#39; available in Gurobi that will linearise them in the background.

Another option is to use decomposition methods (e.g. Bender&#39;s Decomposition) where you split the non-linear model into master-problem and a  sub-problems in such a way the both of them are linear. This can be done by treating the variables of master-problem as constants in the sub-problem and vice versa. Then you solve Master and sub-problems iteratively by updating the variables or adding new constraints from the sub-problem into the master as Bender&#39;s cuts. 

##### Comment Metadata
- Posted at: over 5 years ago
- Author title: Optimisation Engineer at HIVERY




## Related Product
[Gurobi Optimizer](https://www.g2.com/products/gurobi-optimizer/reviews)

## Related Category
[Data Science and Machine Learning Platforms](https://www.g2.com/categories/data-science-and-machine-learning-platforms)

## Related discussions
- [How well does Trello scale into a larger team?](https://www.g2.com/discussions/1-how-well-does-trello-scale-into-a-larger-team)
  - Posted at: about 13 years ago
  - Comments: 6
- [Can we please add a new section](https://www.g2.com/discussions/2-can-we-please-add-a-new-section)
  - Posted at: about 13 years ago
  - Comments: 0
- [Quantifiable benefits from implementing your CRM](https://www.g2.com/discussions/quantifiable-benefits-from-implementing-your-crm)
  - Posted at: about 13 years ago
  - Comments: 4


