try {
Be = std::stod(radical_elements.front());
- } catch (std::invalid_argument& ia) {
+ } catch (const std::invalid_argument& ia) {
throw std::invalid_argument(std::string("First part of smpi/IB-penalty-factors is not numerical:") + ia.what());
}
try {
Bs = std::stod(radical_elements.at(1));
- } catch (std::invalid_argument& ia) {
+ } catch (const std::invalid_argument& ia) {
throw std::invalid_argument(std::string("Second part of smpi/IB-penalty-factors is not numerical:") + ia.what());
}
try {
ys = std::stod(radical_elements.back());
- } catch (std::invalid_argument& ia) {
+ } catch (const std::invalid_argument& ia) {
throw std::invalid_argument(std::string("Third part of smpi/IB-penalty-factors is not numerical:") + ia.what());
}
}
void NetworkIBModel::computeIBfactors(IBNode* root)
{
- double num_comm_out = static_cast<double>(root->ActiveCommsUp.size());
+ double num_comm_out = root->ActiveCommsUp.size();
double max_penalty_out = 0.0;
// first, compute all outbound penalties to get their max
for (std::vector<ActiveComm*>::iterator it = root->ActiveCommsUp.begin(); it != root->ActiveCommsUp.end(); ++it) {