From 61e3a2b51db118a73f2eb50115da61a47434e2fc Mon Sep 17 00:00:00 2001 From: Duy-Nguyen Ta Date: Wed, 27 Apr 2016 03:01:54 -0400 Subject: [PATCH] remove the artificial zero priors to make testLPSolver passed with costs that don't include all vars. Why did I think I need the zero priors?? --- gtsam_unstable/linear/LPSolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtsam_unstable/linear/LPSolver.cpp b/gtsam_unstable/linear/LPSolver.cpp index c57291966..2caf7f894 100644 --- a/gtsam_unstable/linear/LPSolver.cpp +++ b/gtsam_unstable/linear/LPSolver.cpp @@ -27,7 +27,7 @@ LPSolver::LPSolver(const LP &lp) : // Create and push zero priors of constrained variables that do not exist in // the cost function - baseGraph_.push_back(*createZeroPriors(lp_.cost.keys(), keysDim_)); + // baseGraph_.push_back(*createZeroPriors(lp_.cost.keys(), keysDim_)); // Variable index equalityVariableIndex_ = VariableIndex(lp_.equalities); @@ -208,8 +208,8 @@ std::pair LPSolver::optimize( /// main loop of the solver while (!state.converged) { - if(state.iterations > 10000) // Temporary break to avoid infine loops - break; + // if(state.iterations > 100) // Temporary break to avoid infine loops + // break; state = iterate(state); } return make_pair(state.values, state.duals);