8000 tron: redefine H at each iteration · lambe/NLP.py@b21ef81 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit b21ef81

Browse files
committed
tron: redefine H at each iteration
1 parent 3bddbdd commit b21ef81

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nlp/optimize/tron.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,6 @@ def solve(self):
400400
exitFunCall = model.obj.ncalls >= self.maxfuncall
401401
status = ""
402402

403-
# Wrap Hessian into 85C3 an operator.
404-
H = model.hop(self.x, self.model.pi0)
405403
tick = cputime()
406404

407405
# Print out header and initial log.
@@ -417,6 +415,9 @@ def solve(self):
417415
if self.save_g:
418416
self.g_old = self.g.copy()
419417

418+
# Wrap Hessian into an operator.
419+
H = model.hop(self.x, self.model.pi0)
420+
420421
# Compute the Cauchy step and store in s.
421422
(s, self.alphac) = self.cauchy(self.x, self.g, H,
422423
model.Lvar, model.Uvar,

0 commit comments

Comments
 (0)
0