0

I am using Cplex in Python to solve an SVM problem with reduced dimensions. As a part of my algorithm, I have to add quadratic constraints to my objective function. So to say, I want to add something like "(w1+w2)^2

  • I think you're looking for the [Cplex.objective.set_quadratic](https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.1/ilog.odms.cplex.help/refpythoncplex/html/cplex._internal._subinterfaces.ObjectiveInterface-class.html#set_quadratic) function. There are examples in the documentation there that should be sufficient, but you can also look at the `qpex1.py` example that is included in the CPLEX installer. – rkersh Nov 10 '17 at 15:51
  • Thanks for your reply. I am looking to Cplex.constraints.set_quadratic – user3425989 Nov 10 '17 at 16:15

0 Answers0