1.1 --- a/lemon/network_simplex.h Sat Mar 20 11:03:12 2010 +0100
1.2 +++ b/lemon/network_simplex.h Sat Mar 16 16:20:41 2013 +0100
1.3 @@ -1067,6 +1067,10 @@
1.4 if ( !((_stype == GEQ && _sum_supply <= 0) ||
1.5 (_stype == LEQ && _sum_supply >= 0)) ) return false;
1.6
1.7 + // Check lower and upper bounds
1.8 + LEMON_DEBUG(checkBoundMaps(),
1.9 + "Upper bounds must be greater or equal to the lower bounds");
1.10 +
1.11 // Remove non-zero lower bounds
1.12 if (_have_lower) {
1.13 for (int i = 0; i != _arc_num; ++i) {
1.14 @@ -1230,6 +1234,15 @@
1.15
1.16 return true;
1.17 }
1.18 +
1.19 + // Check if the upper bound is greater or equal to the lower bound
1.20 + // on each arc.
1.21 + bool checkBoundMaps() {
1.22 + for (int j = 0; j != _arc_num; ++j) {
1.23 + if (_upper[j] < _lower[j]) return false;
1.24 + }
1.25 + return true;
1.26 + }
1.27
1.28 // Find the join node
1.29 void findJoinNode() {