You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check that the number of unique power bond names is equal to the number of power bonds. Otherwise, it is not possible to correctly connect the bonds.
auto uniqueCount = static_cast<int>(std::unique(powerBondNames.begin(), powerBondNames.end()) - powerBondNames.begin());
863
-
auto numPowerBonds = static_cast<int>(systemStructure.get_power_bonds().size());
854
+
auto uniquePowerBonds = static_cast<int>(uniquePowerBondNames.size());
855
+
auto numPowerBonds = static_cast<int>(systemStructure.get_power_bonds().size());
864
856
865
-
if (uniqueCount != numPowerBonds) {
866
-
std::ostringstream oss;
867
-
oss << "The number of powerbonds (" << numPowerBonds << ") is not equal to the number of unique power bond names (" << uniqueCount << ") found in the configured system. Power bond names must be unique pr. bond, that is found on only and exactly the two VariableConnections that form the bond.";
868
-
throwstd::runtime_error(oss.str());
869
-
}
857
+
if (uniquePowerBonds != numPowerBonds) {
858
+
std::ostringstream oss;
859
+
oss << "The number of powerbonds (" << numPowerBonds << ") is not equal to the number of unique power bond names (" << uniquePowerBonds << ") found in the configured system. Power bond names must be unique pr. bond, that is found on only and exactly the two VariableConnections that form the bond.";
0 commit comments