/********* * Model * *********/ void surf_network_model_init_Constant() { xbt_assert(surf_network_model == nullptr); surf_network_model = new simgrid::surf::NetworkConstantModel(); all_existing_models->push_back(surf_network_model); routing_model_create(nullptr); }
WorkstationL07Model::WorkstationL07Model() : WorkstationModel("Workstation ptask_L07") { if (!ptask_maxmin_system) ptask_maxmin_system = lmm_system_new(1); surf_workstation_model = NULL; surf_network_model = new NetworkL07Model(); surf_cpu_model_pm = new CpuL07Model(); routing_model_create(surf_network_model->createNetworkLink("__loopback__", 498000000, NULL, 0.000015, NULL, SURF_RESOURCE_ON, NULL, SURF_LINK_FATPIPE, NULL)); p_cpuModel = surf_cpu_model_pm; }
void NetworkCm02Model::initialize() { char *optim = xbt_cfg_get_string(_sg_cfg_set, "network/optim"); int select = xbt_cfg_get_boolean(_sg_cfg_set, "network/maxmin_selective_update"); if (!strcmp(optim, "Full")) { p_updateMechanism = UM_FULL; m_selectiveUpdate = select; } else if (!strcmp(optim, "Lazy")) { p_updateMechanism = UM_LAZY; m_selectiveUpdate = 1; xbt_assert((select == 1) || (xbt_cfg_is_default_value (_sg_cfg_set, "network/maxmin_selective_update")), "Disabling selective update while using the lazy update mechanism is dumb!"); } else { xbt_die("Unsupported optimization (%s) for this model", optim); } if (!p_maxminSystem) p_maxminSystem = lmm_system_new(m_selectiveUpdate); const char* lb_name = "__loopback__"; routing_model_create(createNetworkLink(lb_name, 498000000, NULL, 0.000015, NULL, SURF_RESOURCE_ON, NULL, SURF_LINK_FATPIPE, NULL)); if (p_updateMechanism == UM_LAZY) { p_actionHeap = xbt_heap_new(8, NULL); xbt_heap_set_update_callback(p_actionHeap, surf_action_lmm_update_index_heap); p_modifiedSet = new ActionLmmList(); p_maxminSystem->keep_track = p_modifiedSet; } m_haveGap = false; }