-/* ************************************************************************** */
-/* *********************** GENERIC BUSINESS METHODS ************************* */
+/* ***************************************************************** */
+/* *********************** GENERIC METHODS ************************* */
/* ************************************************************************** */
/* ************************* GENERIC AUX FUNCTIONS ************************** */
/* change a route containing link names into a route containing link entities */
/* ************************************************************************** */
/* ************************* GENERIC AUX FUNCTIONS ************************** */
/* change a route containing link names into a route containing link entities */
-sg_platf_route_cbarg_t AsRoutedGraph::newExtendedRoute(RoutingMode hierarchy, sg_platf_route_cbarg_t routearg,
- int change_order)
+sg_platf_route_cbarg_t RoutedZone::newExtendedRoute(RoutingMode hierarchy, sg_platf_route_cbarg_t routearg,
+ bool change_order)
result->link_list = new std::vector<Link*>();
xbt_assert(hierarchy == RoutingMode::base || hierarchy == RoutingMode::recursive,
result->link_list = new std::vector<Link*>();
xbt_assert(hierarchy == RoutingMode::base || hierarchy == RoutingMode::recursive,
if (hierarchy == RoutingMode::recursive) {
xbt_assert(routearg->gw_src && routearg->gw_dst, "nullptr is obviously a deficient gateway");
if (hierarchy == RoutingMode::recursive) {
xbt_assert(routearg->gw_src && routearg->gw_dst, "nullptr is obviously a deficient gateway");
{
xbt_assert(src, "Cannot find a route from nullptr to %s", dst->cname());
xbt_assert(dst, "Cannot find a route from %s to nullptr", src->cname());
{
xbt_assert(src, "Cannot find a route from nullptr to %s", dst->cname());
xbt_assert(dst, "Cannot find a route from %s to nullptr", src->cname());
src->cname(), src_as->name(), dst->cname(), dst_as->name());
src->cname(), src_as->name(), dst->cname(), dst_as->name());
"%s@%s). Please report that bug.",
src->cname(), dst->cname(), src_as->name(), dst_as->name(), name());
}
"%s@%s). Please report that bug.",
src->cname(), dst->cname(), src_as->name(), dst_as->name(), name());
}
xbt_assert(src, "Cannot add a route from %s to %s: %s does not exist.", srcName, dstName, srcName);
xbt_assert(dst, "Cannot add a route from %s to %s: %s does not exist.", srcName, dstName, dstName);
xbt_assert(!route->link_list->empty(), "Empty route (between %s and %s) forbidden.", srcName, dstName);
xbt_assert(src, "Cannot add a route from %s to %s: %s does not exist.", srcName, dstName, srcName);
xbt_assert(dst, "Cannot add a route from %s to %s: %s does not exist.", srcName, dstName, dstName);
xbt_assert(!route->link_list->empty(), "Empty route (between %s and %s) forbidden.", srcName, dstName);
- xbt_assert(!src->isAS(),
- "When defining a route, src cannot be an AS such as '%s'. Did you meant to have an ASroute?", srcName);
- xbt_assert(!dst->isAS(),
- "When defining a route, dst cannot be an AS such as '%s'. Did you meant to have an ASroute?", dstName);
+ xbt_assert(!src->isNetZone(),
+ "When defining a route, src cannot be a netzone such as '%s'. Did you meant to have an NetzoneRoute?", srcName);
+ xbt_assert(!dst->isNetZone(),
+ "When defining a route, dst cannot be a netzone such as '%s'. Did you meant to have an NetzoneRoute?", dstName);
- XBT_DEBUG("Load ASroute from %s@%s to %s@%s", srcName, route->gw_src->cname(), dstName, route->gw_dst->cname());
- xbt_assert(src->isAS(), "When defining an ASroute, src must be an AS but '%s' is not", srcName);
- xbt_assert(dst->isAS(), "When defining an ASroute, dst must be an AS but '%s' is not", dstName);
+ XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", srcName, route->gw_src->cname(), dstName, route->gw_dst->cname());
+ xbt_assert(src->isNetZone(), "When defining a NetzoneRoute, src must be a netzone but '%s' is not", srcName);
+ xbt_assert(dst->isNetZone(), "When defining a NetzoneRoute, dst must be a netzone but '%s' is not", dstName);
- xbt_assert(route->gw_src != route->gw_dst, "Cannot define an ASroute from '%s' to itself", route->gw_src->cname());
+ xbt_assert(route->gw_src != route->gw_dst, "Cannot define an NetzoneRoute from '%s' to itself", route->gw_src->cname());
xbt_assert(src, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, route->gw_src->cname(),
dstName, route->gw_dst->cname(), srcName);
xbt_assert(src, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, route->gw_src->cname(),
dstName, route->gw_dst->cname(), srcName);