Commit f8853fee authored by Henrik Zimmer's avatar Henrik Zimmer
Browse files

added another safety check: integer coefficient also has to be greater than epsilon_ to be valid

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@29 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent adf9b1de
...@@ -247,8 +247,9 @@ make_constraints_independent( ...@@ -247,8 +247,9 @@ make_constraints_independent(
} }
else else
{ {
// store integer closest to 1 double cur_row_val(fabs(*row_it));
if( fabs(fabs(*row_it)-1.0) < elim_val) // store integer closest to 1, must be greater than epsilon_
if( fabs(cur_row_val-1.0) < elim_val && cur_row_val > epsilon_)
{ {
elim_int_j = cur_j; elim_int_j = cur_j;
elim_val = fabs(fabs(*row_it)-1.0); elim_val = fabs(fabs(*row_it)-1.0);
...@@ -263,6 +264,9 @@ make_constraints_independent( ...@@ -263,6 +264,9 @@ make_constraints_independent(
else // use the best found integer else // use the best found integer
elim_j = elim_int_j; elim_j = elim_int_j;
// if no integer or real valued variable greater than epsilon_ existed, then
// elim_j is now -1 and this row is not considered as a valid constraint
// store result // store result
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment