ncsu-landscape-dynamics / pops-core

PoPS Core: C++ library for the Pest or Pathogen Spread Model
https://ncsu-landscape-dynamics.github.io/pops-core
GNU General Public License v2.0
5 stars 2 forks source link

Remove the same node id check in network #171

Open wenzeslaus opened 2 years ago

wenzeslaus commented 2 years ago

The test for "Edge cannot begin and end with the same node" should not be there. Loop is not an error and with dropping dispersers between nodes, it yields non-trivial results.

            if (node_1_id == node_2_id) {
                throw std::runtime_error(
                    std::string("Edge cannot begin and end with the same node: ")
                    + node_1_text + " " + node_2_text);
            }