+ extended evaluation function to return positionwise deviations
[qpalma.git] / qpalma / SIQP_CPX.py
index b6635f6..125c47a 100644 (file)
@@ -75,6 +75,7 @@ class SIQPSolver(SIQP):
 
       CPX.setintparam(self.env, CPX_PARAM_SCRIND, CPX_ON) # print >> self.protocol, info to screen
       CPX.setintparam(self.env, CPX_PARAM_DATACHECK, CPX_ON)
+      #CPX.setintparam(self.env, CPX_PARAM_QPMETHOD, 2)
 
       # create CPLEX problem, add objective and constraints to it
       self.lp = CPX.createprob(self.env, 'test1')
@@ -106,6 +107,11 @@ class SIQPSolver(SIQP):
                self.matbeg, self.matcnt, self.matind, self.matval, 
                self.lb, self.ub) 
 
+      import pdb
+      #pdb.set_trace()
+
+      assert sum(self.P[self.numFeatures:,self.numFeatures:]) == 0.0, 'slack variables are regularized'
+
       self.qmatbeg, self.qmatcnt, self.qmatind, self.qmatval = self.cpx_matrix(self.P)
       CPX.copyquad(self.env, self.lp, self.qmatbeg, self.qmatcnt, self.qmatind, self.qmatval)