Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a add_route with s4u::Link instead of LinkInRoute
[simgrid.git] / examples / cpp / platform-failures / s4u-platform-failures.cpp
index 339b474..f622d90 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -118,8 +118,8 @@ int main(int argc, char* argv[])
   // Add a new host programatically, and attach a state profile to it
   auto* root     = e.get_netzone_root();
   auto* lilibeth = root->create_host("Lilibeth", 1e15);
-  auto link      = sg4::LinkInRoute(e.link_by_name("10"));
-  root->add_route(e.host_by_name("Tremblay")->get_netpoint(), lilibeth->get_netpoint(), nullptr, nullptr, {link}, true);
+  auto link      = e.link_by_name("10");
+  root->add_route(e.host_by_name("Tremblay"), lilibeth, {link});
   lilibeth->set_state_profile(simgrid::kernel::profile::ProfileBuilder::from_string("lilibeth_profile", R"(
 4 0
 5 1