diff --git a/lemon/capacity_scaling.h b/lemon/capacity_scaling.h --- a/lemon/capacity_scaling.h +++ b/lemon/capacity_scaling.h @@ -681,7 +681,7 @@ // Initialize the algorithm ProblemType init() { - if (_node_num == 0) return INFEASIBLE; + if (_node_num <= 1) return INFEASIBLE; // Check the sum of supply values _sum_supply = 0; diff --git a/lemon/cost_scaling.h b/lemon/cost_scaling.h --- a/lemon/cost_scaling.h +++ b/lemon/cost_scaling.h @@ -712,7 +712,7 @@ // Initialize the algorithm ProblemType init() { - if (_res_node_num == 0) return INFEASIBLE; + if (_res_node_num <= 1) return INFEASIBLE; // Check the sum of supply values _sum_supply = 0;