Skip to content

Commit

Permalink
Fix initial point for 3x3.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpo committed Jan 23, 2012
1 parent 9a82d3a commit 7f5882b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nlpy/optimize/solvers/cqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,10 @@ def __init__(self, *args, **kwargs):
super(RegQPInteriorPointSolver3x3, self).__init__(*args, **kwargs)

def initialize_kkt_matrix(self):
# [ -(Q+ρI) 0 A1' 0 ]
# [ 0 -ρI A2' Z^{1/2}]
# [ A1 A2 δI 0 ]
# [ 0 Z^{1/2} 0 S ]
m, n = self.A.shape
on = self.qp.original_n
H = PysparseMatrix(size=2*n+m-on,
Expand All @@ -980,6 +984,7 @@ def set_initial_guess_system(self):
self.H.put(-1.0, range(on,n))
self.H.put( 1.0e-4, range(n, n+m))
self.H.put( 1.0, range(n+m,2*n+m-on))
self.H.put( 1.0, range(n+m,2*n+m-on), range(on,n))
return

def set_initial_guess_rhs(self):
Expand Down

0 comments on commit 7f5882b

Please sign in to comment.