scipopt / PySCIPOpt

Python interface for the SCIP Optimization Suite
https://scipopt.github.io/PySCIPOpt
MIT License
786 stars 252 forks source link

ValueError: Nonlinear objective functions are not supported! #168

Closed FCYtheFreeman closed 6 years ago

FCYtheFreeman commented 6 years ago

My integer programming has multiple solutions,and I want to find the best solution that has the minimum number of 0. Since my variables is non-negative integer, and the sum of variables is confirmed,my first method is set model.setObjective(x^2 + y^2 + z^2 , "maximize"), but it leads to an error: ValueError: Nonlinear objective functions are not supported!

How can I solve this problem?Or is there other ways I can achieve my goal?

Thank you !

fserra commented 6 years ago

check my answer in #167