@@ -1979,6 +1979,7 @@ void set_primal_variables_on_bounds(const lp_problem_t<i_t, f_t>& lp,
19791979 std::vector<f_t >& x)
19801980{
19811981 const i_t n = lp.num_cols ;
1982+ f_t tol = 1e-10 ;
19821983 for (i_t j = 0 ; j < n; ++j) {
19831984 // We set z_j = 0 for basic variables
19841985 // But we explicitally skip setting basic variables here
@@ -1996,9 +1997,9 @@ void set_primal_variables_on_bounds(const lp_problem_t<i_t, f_t>& lp,
19961997 }
19971998 x[j] = lp.lower [j];
19981999 vstatus[j] = variable_status_t ::NONBASIC_FIXED;
1999- } else if (z[j] == 0 && lp.lower [j] > -inf && vstatus[j] == variable_status_t ::NONBASIC_LOWER) {
2000+ } else if (z[j] >= -tol && lp.lower [j] > -inf && vstatus[j] == variable_status_t ::NONBASIC_LOWER) {
20002001 x[j] = lp.lower [j];
2001- } else if (z[j] == 0 && lp.upper [j] < inf && vstatus[j] == variable_status_t ::NONBASIC_UPPER) {
2002+ } else if (z[j] <= tol && lp.upper [j] < inf && vstatus[j] == variable_status_t ::NONBASIC_UPPER) {
20022003 x[j] = lp.upper [j];
20032004 } else if (z[j] >= 0 && lp.lower [j] > -inf) {
20042005 if (vstatus[j] != variable_status_t ::NONBASIC_LOWER) {
@@ -2476,6 +2477,16 @@ dual::status_t dual_phase2_with_advanced_basis(i_t phase,
24762477 i_t dense_delta_z = 0 ;
24772478 phase2::phase2_timers_t <i_t , f_t > timers (false );
24782479
2480+ if (phase == 2 ) {
2481+ settings.log .printf (" %5d %+.16e %7d %.8e %.2e %.2f\n " ,
2482+ 0 ,
2483+ compute_user_objective (lp, obj),
2484+ infeasibility_indices.size (),
2485+ primal_infeasibility_squared,
2486+ 0.0 ,
2487+ toc (start_time));
2488+ }
2489+
24792490 while (iter < iter_limit) {
24802491 // Pricing
24812492 i_t direction = 0 ;
0 commit comments