File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed
Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -200,3 +200,19 @@ TEST_CASE("test-2087", "[highs_ipm]") {
200200
201201 h.resetGlobalScheduler (true );
202202}
203+
204+ TEST_CASE (" test-2527" , " [highs_ipm]" ) {
205+ std::string filename =
206+ std::string (HIGHS_DIR) + " /check/instances/primal1.mps" ;
207+ Highs h;
208+ // h.setOptionValue("output_flag", dev_run);
209+ REQUIRE (h.readModel (filename) == HighsStatus::kOk );
210+ HighsLp lp = h.getLp ();
211+ lp.col_cost_ .assign (lp.num_col_ , 0 );
212+ REQUIRE (h.passModel (lp) == HighsStatus::kOk );
213+ h.setOptionValue (" solver" , kIpmString );
214+ h.setOptionValue (" presolve" , kHighsOffString );
215+ REQUIRE (h.run () == HighsStatus::kOk );
216+
217+ h.resetGlobalScheduler (true );
218+ }
Original file line number Diff line number Diff line change @@ -119,12 +119,19 @@ Int Basis::Factorize() {
119119
120120 // Build column pointers for passing to LU factorization.
121121 std::vector<Int> begin (m), end (m);
122+ Int basis_num_nz = 0 ;
122123 for (Int i = 0 ; i < m; i++) {
123124 assert (basis_[i] >= 0 );
124125 begin[i] = AI.begin (basis_[i]);
125126 end[i] = AI.end (basis_[i]);
127+ basis_num_nz += (end[i]-begin[i]);
126128 }
127129
130+ std::stringstream h_logging_stream;
131+ h_logging_stream.str (std::string ());
132+ h_logging_stream << " Start factorization " << num_factorizations_+1 << " : nonzeros in basis = " << basis_num_nz << " \n " ;
133+ control_.hIntervalLog (h_logging_stream);
134+
128135 Int err = 0 ; // return code
129136 while (true ) {
130137 Int flag = lu_->Factorize (begin.data (), end.data (), AI.rowidx (),
@@ -151,6 +158,9 @@ Int Basis::Factorize() {
151158 }
152159 time_factorize_ += timer.Elapsed ();
153160 factorization_is_fresh_ = true ;
161+ h_logging_stream.str (std::string ());
162+ h_logging_stream << " Finish factorization: " << num_factorizations_ << " : fill factor = " << lu_->fill_factor () << " \n " ;
163+ control_.hIntervalLog (h_logging_stream);
154164 return err;
155165}
156166
Original file line number Diff line number Diff line change @@ -522,8 +522,8 @@ void LpSolver::BuildStartingBasis() {
522522 info_.status_ipm = IPX_STATUS_debug;
523523 return ;
524524 }
525- basis_.reset (new Basis (control_, model_));
526525 control_.hLog (" Constructing starting basis...\n " );
526+ basis_.reset (new Basis (control_, model_));
527527 StartingBasis (iterate_.get (), basis_.get (), &info_);
528528 if (info_.errflag == IPX_ERROR_user_interrupt) {
529529 info_.errflag = 0 ;
You can’t perform that action at this time.
0 commit comments