Skip to content

Commit 389dbbe

Browse files
committed
Fix trivial infeasibility
1 parent f35efd1 commit 389dbbe

File tree

8 files changed

+21
-14
lines changed

8 files changed

+21
-14
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ boost-soplex-scip:
4747
- export CFLAGS=""
4848
- export CXXFLAGS=""
4949
# boost
50-
- wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_$(echo ${BOOST_VERSION} | tr . _).tar.gz -O ${BOOST_DIR}.tar.gz
50+
- wget https://archives.boost.io/release/${BOOST_VERSION}/source/boost_$(echo ${BOOST_VERSION} | tr . _).tar.gz -O ${BOOST_DIR}.tar.gz
5151
- mkdir -p ${BOOST_DIR}
5252
- tar -xzf ${BOOST_DIR}.tar.gz -C ${BOOST_DIR} --strip-components=1
5353
- cd ${BOOST_DIR}

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Fixed bugs
2121
----------
2222

2323
- keep restricted solver limit settings in modifier setting when resetting
24+
- avoid fixing trivially infeasible bounds and sides to keep feasibility status
2425

2526
Build system
2627
------------

src/bugger/modifiers/CoefficientModifier.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace bugger
5050
return !problem.getColFlags( )[ col ].test(ColFlag::kFixed)
5151
&& !problem.getColFlags( )[ col ].test(ColFlag::kLbInf)
5252
&& !problem.getColFlags( )[ col ].test(ColFlag::kUbInf)
53-
&& this->num.isZetaEq(problem.getLowerBounds( )[ col ], problem.getUpperBounds( )[ col ]);
53+
&& this->num.isZetaGE(problem.getLowerBounds( )[ col ], problem.getUpperBounds( )[ col ]);
5454
}
5555

5656
bool

src/bugger/modifiers/ConsroundModifier.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ namespace bugger
5353
bool rhsinf = problem.getRowFlags( )[ row ].test(RowFlag::kRhsInf);
5454
REAL lhs { problem.getConstraintMatrix( ).getLeftHandSides( )[ row ] };
5555
REAL rhs { problem.getConstraintMatrix( ).getRightHandSides( )[ row ] };
56-
if( ( lhsinf || rhsinf || !this->num.isZetaEq(lhs, rhs) ) && ( ( !lhsinf && !this->num.isZetaIntegral(lhs) ) || ( !rhsinf && !this->num.isZetaIntegral(rhs) ) ) )
56+
if( ( lhsinf || rhsinf || !this->num.isZetaEq(lhs, rhs) )
57+
&& ( ( !lhsinf && !this->num.isZetaIntegral(lhs) )
58+
|| ( !rhsinf && !this->num.isZetaIntegral(rhs) ) ) )
5759
return true;
5860
const auto& data = problem.getConstraintMatrix( ).getRowCoefficients(row);
5961
for( int index = 0; index < data.getLength( ); ++index )

src/bugger/modifiers/ObjectiveModifier.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ namespace bugger
4747
bool
4848
isObjectiveAdmissible(const Problem<REAL>& problem, const int& col) const
4949
{
50-
return !this->num.isZetaZero(problem.getObjective( ).coefficients[ col ])
51-
&& ( problem.getColFlags( )[ col ].test(ColFlag::kLbInf)
52-
|| problem.getColFlags( )[ col ].test(ColFlag::kUbInf)
53-
|| !this->num.isZetaEq(problem.getLowerBounds( )[ col ], problem.getUpperBounds( )[ col ]) );
50+
return !problem.getColFlags( )[ col ].test(ColFlag::kFixed)
51+
&& !this->num.isZetaZero(problem.getObjective( ).coefficients[ col ])
52+
&& ( problem.getColFlags( )[ col ].test(ColFlag::kLbInf)
53+
|| problem.getColFlags( )[ col ].test(ColFlag::kUbInf)
54+
|| !this->num.isZetaEq(problem.getLowerBounds( )[ col ], problem.getUpperBounds( )[ col ]) );
5455
}
5556

5657
ModifierStatus

src/bugger/modifiers/SideModifier.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ namespace bugger
4848
isSideAdmissible(const Problem<REAL>& problem, const int& row) const
4949
{
5050
return !problem.getRowFlags( )[ row ].test(RowFlag::kRedundant)
51-
&& ( problem.getRowFlags( )[ row ].test(RowFlag::kLhsInf)
52-
|| problem.getRowFlags( )[ row ].test(RowFlag::kRhsInf)
53-
|| !this->num.isZetaEq(problem.getConstraintMatrix( ).getLeftHandSides( )[ row ], problem.getConstraintMatrix( ).getRightHandSides( )[ row ]) );
51+
&& ( problem.getRowFlags( )[ row ].test(RowFlag::kLhsInf)
52+
|| problem.getRowFlags( )[ row ].test(RowFlag::kRhsInf)
53+
|| this->num.isZetaLT(problem.getConstraintMatrix( ).getLeftHandSides( )[ row ], problem.getConstraintMatrix( ).getRightHandSides( )[ row ]) );
5454
}
5555

5656
ModifierStatus

src/bugger/modifiers/VariableModifier.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ namespace bugger
4747
bool
4848
isVariableAdmissible(const Problem<REAL>& problem, const int& col) const
4949
{
50-
return problem.getColFlags( )[ col ].test(ColFlag::kLbInf)
51-
|| problem.getColFlags( )[ col ].test(ColFlag::kUbInf)
52-
|| !this->num.isZetaEq(problem.getLowerBounds( )[ col ], problem.getUpperBounds( )[ col ]);
50+
return !problem.getColFlags( )[ col ].test(ColFlag::kFixed)
51+
&& ( problem.getColFlags( )[ col ].test(ColFlag::kLbInf)
52+
|| problem.getColFlags( )[ col ].test(ColFlag::kUbInf)
53+
|| this->num.isZetaLT(problem.getLowerBounds( )[ col ], problem.getUpperBounds( )[ col ]) );
5354
}
5455

5556
ModifierStatus

src/bugger/modifiers/VarroundModifier.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ namespace bugger
5555
bool ubinf = problem.getColFlags( )[ col ].test(ColFlag::kUbInf);
5656
REAL lb { problem.getLowerBounds( )[ col ] };
5757
REAL ub { problem.getUpperBounds( )[ col ] };
58-
return ( lbinf || ubinf || !this->num.isZetaEq(lb, ub) ) && ( ( !lbinf && !this->num.isZetaIntegral(lb) ) || ( !ubinf && !this->num.isZetaIntegral(ub) ) );
58+
return ( lbinf || ubinf || !this->num.isZetaEq(lb, ub) )
59+
&& ( ( !lbinf && !this->num.isZetaIntegral(lb) )
60+
|| ( !ubinf && !this->num.isZetaIntegral(ub) ) );
5961
}
6062

6163
ModifierStatus

0 commit comments

Comments
 (0)