state_initial, state_trace,
bw_initial, bw_trace);
- xbt_assert1(!xbt_dict_get_or_null
- (surf_network_model->resource_set, name),
+ xbt_assert(!xbt_lib_get_or_null(link_lib, name, SURF_LINK_LEVEL),
"Link '%s' declared several times in the platform file.",
name);
if (policy == SURF_LINK_FATPIPE)
lmm_constraint_shared(nw_link->lmm_resource.constraint);
- xbt_dict_set(surf_network_model->resource_set, name, nw_link,
- surf_resource_free);
+ xbt_lib_set(link_lib, name, SURF_LINK_LEVEL, nw_link);
return nw_link;
surf_parse_get_double(&lat_initial, A_surfxml_link_latency);
lat_trace = tmgr_trace_new(A_surfxml_link_latency_file);
- xbt_assert0((A_surfxml_link_state == A_surfxml_link_state_ON)
+ xbt_assert((A_surfxml_link_state == A_surfxml_link_state_ON)
|| (A_surfxml_link_state ==
A_surfxml_link_state_OFF), "Invalid state");
if (A_surfxml_link_state == A_surfxml_link_state_ON)
xbt_dict_foreach(trace_connect_list_link_avail, cursor, trace_name, elm) {
tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
link_CM02_im_t link =
- xbt_dict_get_or_null(surf_network_model->resource_set, elm);
+ xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
- xbt_assert2(link, "Cannot connect trace %s to link %s: link undefined",
+ xbt_assert(link, "Cannot connect trace %s to link %s: link undefined",
trace_name, elm);
- xbt_assert2(trace,
+ xbt_assert(trace,
"Cannot connect trace %s to link %s: trace undefined",
trace_name, elm);
xbt_dict_foreach(trace_connect_list_bandwidth, cursor, trace_name, elm) {
tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
link_CM02_im_t link =
- xbt_dict_get_or_null(surf_network_model->resource_set, elm);
+ xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
- xbt_assert2(link, "Cannot connect trace %s to link %s: link undefined",
+ xbt_assert(link, "Cannot connect trace %s to link %s: link undefined",
trace_name, elm);
- xbt_assert2(trace,
+ xbt_assert(trace,
"Cannot connect trace %s to link %s: trace undefined",
trace_name, elm);
xbt_dict_foreach(trace_connect_list_latency, cursor, trace_name, elm) {
tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
link_CM02_im_t link =
- xbt_dict_get_or_null(surf_network_model->resource_set, elm);
+ xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
- xbt_assert2(link, "Cannot connect trace %s to link %s: link undefined",
+ xbt_assert(link, "Cannot connect trace %s to link %s: link undefined",
trace_name, elm);
- xbt_assert2(trace,
+ xbt_assert(trace,
"Cannot connect trace %s to link %s: trace undefined",
trace_name, elm);
XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate);
/* LARGE PLATFORMS HACK:
assert on total_route_size */
- xbt_assert2(xbt_dynar_length(route),
+ xbt_assert(xbt_dynar_length(route),
"You're trying to send data from %s to %s but there is no connection between these two hosts.",
src_name, dst_name);