- if(bytes_amount != nullptr) {
- for (int i = 0; i < host_nb; i++) {
- for (int j = 0; j < host_nb; j++) {
-
- if (bytes_amount[i * host_nb + j] == 0.0)
- continue;
- std::vector<Link*> *route = new std::vector<Link*>();
-
- routing_platf->getRouteAndLatency((*p_netcardList)[i], (*p_netcardList)[j], route, nullptr);
-
- for (auto link : *route)
- lmm_expand_add(model->getMaxminSystem(), link->getConstraint(), this->getVariable(), bytes_amount[i * host_nb + j]);
-
- delete route;
+ for (auto const& link : route)
+ model->get_maxmin_system()->expand_add(link->get_constraint(), this->get_variable(),
+ bytes_amount[i * host_nb + j]);
+ }