File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ namespace linspire
284284 assert (is_basic (x_i));
285285 assert (!is_basic (x_j));
286286 assert (tableau.at (x_i).vars .count (x_j));
287- assert (v >= lb (x_j ) && v <= ub (x_j ));
287+ assert (v >= lb (x_i ) && v <= ub (x_i ));
288288
289289 const auto theta = (v - val (x_i)) / tableau.at (x_i).vars .at (x_j);
290290 LOG_TRACE (" x" << std::to_string (x_i) << " = " << utils::to_string (val (x_i)) << " -> " << utils::to_string (v) << " [" << utils::to_string (lb (x_i)) << " , " << utils::to_string (ub (x_i)) << " ]" );
@@ -294,6 +294,7 @@ namespace linspire
294294 LOG_TRACE (" x" << std::to_string (x_j) << " = " << utils::to_string (val (x_j)) << " -> " << utils::to_string (val (x_j) + theta) << " [" << utils::to_string (lb (x_j)) << " , " << utils::to_string (ub (x_j)) << " ]" );
295295 // x_j += theta
296296 vars[x_j].val += theta;
297+ assert (vars[x_j].val >= lb (x_j) && vars[x_j].val <= ub (x_j));
297298 FIRE_ON_VALUE_CHANGED (x_j);
298299
299300 // the tableau rows containing `x_j` as a non-basic variable..
You can’t perform that action at this time.
0 commit comments