[sdpb] 78/233: made only two changes from newsearchdirection that actually help

Tobias Hansen thansen at moszumanska.debian.org
Thu Mar 9 04:06:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository sdpb.

commit 8d87f9d7c7dc8ae6bd61bc466585d862286ba306
Author: David Simmons-Duffin <dsd at athena.sns.ias.edu>
Date:   Tue Aug 19 17:51:45 2014 -0400

    made only two changes from newsearchdirection that actually help
---
 src/SDPSolver.cpp | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/SDPSolver.cpp b/src/SDPSolver.cpp
index d8300fe..26ad7fe 100644
--- a/src/SDPSolver.cpp
+++ b/src/SDPSolver.cpp
@@ -528,17 +528,13 @@ void SDPSolver::initializeSchurComplementSolver(const BlockDiagonalMatrix &Bilin
                       schurStabilizeLambdas[b]);
   
   // SchurUpdateLowRank = {{- 1, 0}, {E, G}}
-  SchurUpdateLowRank.setCols(BasicKernelSpan.cols);
-  SchurUpdateLowRank.copyFrom(BasicKernelSpan);
+  SchurUpdateLowRank.setCols(sdp.FreeVarMatrix.cols);
+  SchurUpdateLowRank.copyFrom(sdp.FreeVarMatrix);
   for (unsigned int b = 0; b < SchurBlocks.blocks.size(); b++) {
     for (unsigned int i = 0; i < schurStabilizeIndices[b].size(); i++) {
       int fullIndex = SchurBlocks.blockStartIndices[b] + schurStabilizeIndices[b][i];
-      addKernelColumn(FreeVarMatrixReduced,
-                      basicIndices,
-                      nonBasicIndices,
-                      fullIndex,
-                      schurStabilizeLambdas[b],
-                      SchurUpdateLowRank);
+      SchurUpdateLowRank.addColumn();
+      SchurUpdateLowRank.elt(fullIndex, SchurUpdateLowRank.cols - 1) = schurStabilizeLambdas[b];
     }
     schurStabilizeIndices[b].resize(0);
   }
@@ -687,6 +683,11 @@ SDPSolverTerminateReason SDPSolver::run(const SDPSolverParameters &parameters,
     Real dualStepLength   = stepLength(YCholesky, dY, StepMatrixWorkspace,
                                        eigenvaluesWorkspace, QRWorkspace, parameters);
 
+    if (isPrimalFeasible && isDualFeasible) {
+      primalStepLength = min(primalStepLength, dualStepLength);
+      dualStepLength = primalStepLength;
+    }
+
     printSolverInfo(iteration, mu, status, isPrimalFeasible, isDualFeasible,
                     primalStepLength, dualStepLength, betaCorrector);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sdpb.git



More information about the debian-science-commits mailing list