/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/host.h"
#include "simgrid/kernel/routing/NetZoneImpl.hpp" // full type for NetZoneImpl object
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/host.h"
#include "simgrid/kernel/routing/NetZoneImpl.hpp" // full type for NetZoneImpl object
#include "xbt/config.hpp"
XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
#include "xbt/config.hpp"
XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
- simgrid::config::set_parse("network/model:CM02");
- simgrid::config::set_parse("cpu/model:Cas01");
+ simgrid::s4u::Engine::set_config("network/model:CM02");
+ simgrid::s4u::Engine::set_config("cpu/model:Cas01");
- simgrid::s4u::Host* hostA = sg_host_by_name("Cpu A");
- simgrid::s4u::Host* hostB = sg_host_by_name("Cpu B");
+ simgrid::s4u::Host* hostA = e.host_by_name("Cpu A");
+ simgrid::s4u::Host* hostB = e.host_by_name("Cpu B");
- hostA->pimpl_cpu->execution_start(1000.0);
- hostB->pimpl_cpu->execution_start(1000.0);
- hostB->pimpl_cpu->sleep(7.32);
+ hostA->get_cpu()->execution_start(1000.0, -1);
+ hostB->get_cpu()->execution_start(1000.0, -1);
+ hostB->get_cpu()->sleep(7.32);
auto net_model = as_zone->get_impl()->get_network_model();
net_model->communicate(hostA, hostB, 150.0, -1.0);
auto net_model = as_zone->get_impl()->get_network_model();
net_model->communicate(hostA, hostB, 150.0, -1.0);
- for (auto const& model : simgrid::kernel::EngineImpl::get_instance()->get_all_models()) {
- if (model->get_started_action_set()->size() != 0) {
+ for (auto const& model : e.get_all_models()) {
+ if (not model->get_started_action_set()->empty()) {