File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed
Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -187,8 +187,6 @@ bool Solver::prepareIpx() {
187187 ipx_param.ipm_feasibility_tol = options_.feasibility_tol ;
188188 ipx_param.ipm_optimality_tol = options_.optimality_tol ;
189189 ipx_param.start_crossover_tol = options_.crossover_tol ;
190- printf (" HiPO Solver::prepareIpx() options_.time_limit = %g; control_.elapsed() = %g\n " ,
191- options_.time_limit , control_.elapsed ());
192190 ipx_param.time_limit = options_.time_limit - control_.elapsed ();
193191 ipx_param.ipm_maxiter = options_.max_iter - iter_;
194192 ipx_lps_.SetParameters (ipx_param);
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ void Control::hLog(std::string str) const {
3838 } else {
3939 output_ << str;
4040 }
41-
41+ // Reset interval-based logging since something has been logged
42+ interval_.Reset ();
4243}
4344
4445void Control::hLog (std::stringstream& logging) const {
@@ -50,9 +51,12 @@ void Control::hLog(std::stringstream& logging) const {
5051 output_ << logging.str ();
5152 }
5253 logging.str (std::string ());
54+ // Reset interval-based logging since something has been logged
55+ interval_.Reset ();
5356}
5457
5558void Control::hIntervalLog (std::stringstream& logging) const {
59+ double interval_elapsed = interval_.Elapsed ();
5660 if (parameters_.print_interval >= 0.0 &&
5761 interval_.Elapsed () >= parameters_.print_interval ) {
5862 interval_.Reset ();
Original file line number Diff line number Diff line change @@ -828,7 +828,6 @@ void IPM::PrintHeader() {
828828 << " " << Format (" pinf" , 9 )
829829 << " " << Format (" dinf" , 9 )
830830 << " " << Format (" gap" , 8 );
831- // h_logging_stream << " " << Format("mu", 8);
832831 if (!control_.timelessLog ())
833832 h_logging_stream << " " << Format (" time" , 7 );
834833 control_.hLog (h_logging_stream);
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ class IPM {
3737
3838 Int maxiter () const { return maxiter_; }
3939 void maxiter (Int i) { maxiter_ = i; }
40+ void PrintHeader ();
4041
4142private:
4243 struct Step ;
@@ -67,7 +68,6 @@ class IPM {
6768 void SolveNewtonSystem (const double * rb, const double * rc,
6869 const double * rl, const double * ru,
6970 const double * sl, const double * su, Step& lhs);
70- void PrintHeader ();
7171 void PrintOutput ();
7272
7373 const Control& control_;
Original file line number Diff line number Diff line change @@ -394,7 +394,7 @@ void LpSolver::RunIPM() {
394394 info_.centring_success = false ;
395395
396396 if (x_start_.size () != 0 ) {
397- control_.hLog (" Using starting point provided by user. Skipping initial iterations.\n " );
397+ control_.hLog (" Using starting point provided by user. Skipping initial iterations.\n " );
398398 iterate_->Initialize (x_start_, xl_start_, xu_start_,
399399 y_start_, zl_start_, zu_start_);
400400 }
@@ -558,6 +558,7 @@ void LpSolver::BuildStartingBasis() {
558558void LpSolver::RunMainIPM (IPM& ipm) {
559559 KKTSolverBasis kkt (control_, *basis_);
560560 Timer timer;
561+ ipm.PrintHeader ();
561562 ipm.maxiter (control_.ipm_maxiter ());
562563 ipm.Driver (&kkt, iterate_.get (), &info_);
563564 info_.time_ipm2 = timer.Elapsed ();
You can’t perform that action at this time.
0 commit comments