0
2
0
... | ... |
@@ -678,13 +678,13 @@ |
678 | 678 |
/// @} |
679 | 679 |
|
680 | 680 |
private: |
681 | 681 |
|
682 | 682 |
// Initialize the algorithm |
683 | 683 |
ProblemType init() { |
684 |
if (_node_num |
|
684 |
if (_node_num <= 1) return INFEASIBLE; |
|
685 | 685 |
|
686 | 686 |
// Check the sum of supply values |
687 | 687 |
_sum_supply = 0; |
688 | 688 |
for (int i = 0; i != _root; ++i) { |
689 | 689 |
_sum_supply += _supply[i]; |
690 | 690 |
} |
... | ... |
@@ -709,13 +709,13 @@ |
709 | 709 |
/// @} |
710 | 710 |
|
711 | 711 |
private: |
712 | 712 |
|
713 | 713 |
// Initialize the algorithm |
714 | 714 |
ProblemType init() { |
715 |
if (_res_node_num |
|
715 |
if (_res_node_num <= 1) return INFEASIBLE; |
|
716 | 716 |
|
717 | 717 |
// Check the sum of supply values |
718 | 718 |
_sum_supply = 0; |
719 | 719 |
for (int i = 0; i != _root; ++i) { |
720 | 720 |
_sum_supply += _supply[i]; |
721 | 721 |
} |
0 comments (0 inline)