Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Expose signals Activity::on_suspend and Activity::on_resume in s4u
[simgrid.git] / docs / source / app_s4u.rst
index cd7d1ab..ededc62 100644 (file)
@@ -21,14 +21,14 @@ abstract algorithms in the domains of Cloud, P2P, HPC, IoT, and similar
 settings.
 
 Since v3.20 (June 2018), S4U is the way to go for long-term
-projects. It is feature complete, but may still evolve slightly in 
+projects. It is feature complete, but may still evolve slightly in
 future releases. It can already be used to do everything that can be
 done in SimGrid, but you may have to adapt your code in future
 releases. When this happens, compiling your code will produce
 deprecation warnings for 4 releases (one year) before the removal of
-the old symbols. 
+the old symbols.
 If you want an API that will never ever evolve in the future, you
-should use the :ref:`deprecated MSG API <MSG_doc>` instead. 
+should use the :ref:`deprecated MSG API <MSG_doc>` instead.
 
 Main Concepts
 *************
@@ -64,45 +64,34 @@ Virtual machines can also be migrated between hosts.
 The :ref:`simgrid::s4u::this_actor <API_s4u_this_actor>` namespace
 provides many helper functions to simplify the code of actors.
 
-- **Simulation Elements**
+.. rst-class:: compact-list
 
-  - :ref:`class Actor <API_s4u_Actor>`:
-    Active entities executing your application.
-  - :ref:`class Engine <API_s4u_Engine>`
-    Simulation engine (singleton).
-  - :ref:`class Mailbox <API_s4u_Mailbox>`
-    Communication rendezvous, with which actors meet each other.
+   - **Simulation Elements**
 
-- **Resources**
+      - :ref:`class Actor <API_s4u_Actor>`: Active entities executing your application.
+      - :ref:`class Engine <API_s4u_Engine>`: Simulation engine (singleton).
+      - :ref:`class Mailbox <API_s4u_Mailbox>`: Communication rendezvous, with which actors meet each other.
 
-  - :ref:`class Disk <API_s4u_Disk>`
-    Resource on which actors can write and read data.
-  - :ref:`class Host <API_s4u_Host>`:
-    Actor location, providing computational power.
-  - :ref:`class Link <API_s4u_Link>`
-    Interconnecting hosts.
-  - :ref:`class NetZone <API_s4u_NetZone>`:
-    Sub-region of the platform, containing resources (Hosts, Links, etc).
-  - :ref:`class VirtualMachine <API_s4u_VirtualMachine>`:
-    Execution containers that can be moved between Hosts.
+   - **Resources**
 
-- **Activities** (:ref:`class Activity <API_s4u_Activity>`):
-  The things that actors can do on resources
+      - :ref:`class Disk <API_s4u_Disk>`: Resource on which actors can write and read data.
+      - :ref:`class Host <API_s4u_Host>`: Actor location, providing computational power.
+      - :ref:`class Link <API_s4u_Link>`: Interconnecting hosts.
+      - :ref:`class NetZone <API_s4u_NetZone>`: Sub-region of the platform, containing resources (Hosts, Links, etc).
+      - :ref:`class VirtualMachine <API_s4u_VirtualMachine>`: Execution containers that can be moved between Hosts.
 
-  - :ref:`class Comm <API_s4u_Comm>`
-    Communication activity, started on Mailboxes and consuming links.
-  - :ref:`class Exec <API_s4u_Exec>`
-    Computation activity, started on Host and consuming CPU resources.
-  - :ref:`class Io <API_s4u_Io>`
-    I/O activity, started on and consuming disks.
+   - **Activities** (:ref:`class Activity <API_s4u_Activity>`): The things that actors can do on resources.
 
-- **Synchronization Objects**: Classical IPC that actors can use
+      - :ref:`class Comm <API_s4u_Comm>`: Communication activity, started on Mailboxes and consuming links.
+      - :ref:`class Exec <API_s4u_Exec>`: Computation activity, started on Host and consuming CPU resources.
+      - :ref:`class Io <API_s4u_Io>`: I/O activity, started on and consuming disks.
 
-  - :ref:`class Barrier <API_s4u_Barrier>`
-  - :ref:`class ConditionVariable <API_s4u_ConditionVariable>`
-  - :ref:`class Mutex <API_s4u_Mutex>`
-  - :ref:`class Semaphore <API_s4u_Semaphore>`
+   - **Synchronization Objects**: Classical IPC that actors can use
 
+      - :ref:`class Barrier <API_s4u_Barrier>`
+      - :ref:`class ConditionVariable <API_s4u_ConditionVariable>`
+      - :ref:`class Mutex <API_s4u_Mutex>`
+      - :ref:`class Semaphore <API_s4u_Semaphore>`
 
 .. |API_s4u_Actors| replace:: **Actors**
 .. _API_s4u_Actors: #api-s4u-actor
@@ -144,7 +133,7 @@ Activities
 **********
 
 Activities represent the actions that consume a resource, such as a
-:ref:`Comm <API_s4u_Comm>` that consumes the *transmitting power* of 
+:ref:`Comm <API_s4u_Comm>` that consumes the *transmitting power* of
 :ref:`Link <API_s4u_Link>` resources, or an :ref:`Exec <API_s4u_Exec>`
 that consumes the *computing power* of :ref:`Host <API_s4u_Host>` resources.
 See also the :ref:`full API <API_s4u_Activity>` below.
@@ -169,18 +158,14 @@ use  :cpp:func:`s4u::Activity::wait_for() <simgrid::s4u::Activity::wait_for>`.
 Finally, to wait at most until a specified time limit, use
 :cpp:func:`s4u::Activity::wait_until() <simgrid::s4u::Activity::wait_until>`.
 
-Every kind of activity can be asynchronous:
-
-  - :ref:`s4u::CommPtr <API_s4u_Comm>` are created with 
-    :cpp:func:`s4u::Mailbox::put_async() <simgrid::s4u::Mailbox::put_async>` and
-    :cpp:func:`s4u::Mailbox::get_async() <simgrid::s4u::Mailbox::get_async>`.
-  - :ref:`s4u::IoPtr <API_s4u_Io>` are created with 
-    :cpp:func:`s4u::Disk::read_async() <simgrid::s4u::Disk::read_async>` and
-    :cpp:func:`s4u::Disk::write_async() <simgrid::s4u::Disk::write_async>`.
-  - :ref:`s4u::ExecPtr <API_s4u_Exec>` are created with
-    :cpp:func:`s4u::Host::exec_async() <simgrid::s4u::Host::exec_async>`.
-  - In the future, it will become possible to have asynchronous IPC
-    such as asynchronous mutex lock requests.
+Every kind of activity can be asynchronous.
+:ref:`s4u::CommPtr <API_s4u_Comm>` are created with :cpp:func:`s4u::Mailbox::put_async() <simgrid::s4u::Mailbox::put_async>` and
+:cpp:func:`s4u::Mailbox::get_async() <simgrid::s4u::Mailbox::get_async>`;
+:ref:`s4u::IoPtr <API_s4u_Io>` are created with :cpp:func:`s4u::Disk::read_async() <simgrid::s4u::Disk::read_async>` and
+:cpp:func:`s4u::Disk::write_async() <simgrid::s4u::Disk::write_async>`; and
+:ref:`s4u::ExecPtr <API_s4u_Exec>` are created with
+:cpp:func:`s4u::Host::exec_async() <simgrid::s4u::Host::exec_async>`.
+In the future, it will become possible to have asynchronous IPC such as asynchronous mutex lock requests.
 
 The following example shows how to have several concurrent
 communications ongoing.  First, you have to declare a vector in which
@@ -191,31 +176,29 @@ vector of mailboxes.
    :language: c++
    :start-after: init-begin
    :end-before: init-end
-   :dedent: 4
+   :dedent: 2
 
 Then, you start all the communications that should occur concurrently with
-:cpp:func:`s4u::Mailbox::put_async() <simgrid::s4u::Mailbox::put_async>`.  
+:cpp:func:`s4u::Mailbox::put_async() <simgrid::s4u::Mailbox::put_async>`.
 Finally, the actor waits for the completion of all of them at once
-with 
-:cpp:func:`s4u::Comm::wait_all() <simgrid::s4u::Comm::wait_all>`.  
-     
+with :cpp:func:`s4u::Comm::wait_all() <simgrid::s4u::Comm::wait_all>`.
+
 .. literalinclude:: ../../examples/cpp/comm-waitall/s4u-comm-waitall.cpp
    :language: c++
    :start-after: put-begin
    :end-before: put-end
-   :dedent: 4
-
+   :dedent: 2
 
 =====================
 Activities Life cycle
 =====================
 
-Sometimes, you want to change the setting of an activity before it even starts. 
+Sometimes, you want to change the setting of an activity before it even starts.
 
 .. todo:: write this section
 
 .. _s4u_mailbox:
-         
+
 Mailboxes
 *********
 
@@ -233,9 +216,9 @@ but only to find the contact with which you want to communicate.
 
 They are similar to many common things: The phone number, which allows
 the caller to find the receiver. The Twitter hashtag, which helps
-senders and receivers to find each other. In TCP, the pair 
+senders and receivers to find each other. In TCP, the pair
 ``{host name, host port}`` to which you can connect to find your peer.
-In HTTP, URLs through which the clients can connect to the servers. 
+In HTTP, URLs through which the clients can connect to the servers.
 In ZeroMQ, the queues are used to match senders and receivers.
 
 One big difference with most of these systems is that no actor is the
@@ -259,9 +242,9 @@ is consumed by the first receiver.
 A big difference with the ZeroMQ queues is that you cannot filter
 on the data you want to get from the mailbox. To model such settings
 in SimGrid, you'd have one mailbox per potential topic, and subscribe
-to each topic individually with a 
+to each topic individually with a
 :cpp:func:`get_async() <simgrid::s4u::Mailbox::get_async>` on each mailbox.
-Then, use :cpp:func:`Comm::wait_any() <simgrid::s4u::Comm::wait_any>` 
+Then, use :cpp:func:`Comm::wait_any() <simgrid::s4u::Comm::wait_any>`
 to get the first message on any of the mailboxes you are subscribed to.
 
 The mailboxes are not located on the network, and you can access
@@ -314,14 +297,14 @@ Declaring a Receiving Actor
 The last twist is that by default in the simulator, the data starts
 to be exchanged only when both the sender and the receiver are
 announced (it waits until both :cpp:func:`put() <simgrid::s4u::Mailbox::put()>`
-and :cpp:func:`get() <simgrid::s4u::Mailbox::get()>` are posted). 
+and :cpp:func:`get() <simgrid::s4u::Mailbox::get()>` are posted).
 In TCP, since you establish connections beforehand, the data starts to
 flow as soon as the sender posts it, even if the receiver did not post
-its :cpp:func:`put() <simgrid::s4u::Mailbox::put()>` yet. 
+its :cpp:func:`put() <simgrid::s4u::Mailbox::put()>` yet.
 
 To model this in SimGrid, you can declare a specific receiver to a
-given mailbox (with the function 
-:cpp:func:`set_receiver() <simgrid::s4u::Mailbox::set_receiver()>`). 
+given mailbox (with the function
+:cpp:func:`set_receiver() <simgrid::s4u::Mailbox::set_receiver()>`).
 That way, any :cpp:func:`put() <simgrid::s4u::Mailbox::put()>`
 posted to that mailbox will start as soon as possible, and the data
 will already be there on the receiver host when the receiver actor
@@ -372,14 +355,14 @@ Here is a little example:
 
 .. code-block:: cpp
 
-   void myFunc() 
+   void myFunc()
    {
      simgrid::s4u::MutexPtr mutex = simgrid::s4u::Mutex::create(); // Too bad we cannot use `new`
 
      mutex->lock();   // use the mutex as a simple reference
      //  bla bla
-     mutex->unlock(); 
-  
+     mutex->unlock();
+
    } // The mutex gets automatically freed because the only existing reference gets out of scope
 
 Note that Mailboxes, Hosts, and Links are not handled through smart
@@ -406,9 +389,18 @@ Simulation objects
 ⁣  class Actor
 ==============
 
-.. doxygenclass:: simgrid::s4u::Actor
+.. tabs::
 
-.. doxygentypedef:: aid_t
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Actor
+
+      .. doxygentypedef:: aid_t
+
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Actor
 
 Basic management
 ----------------
@@ -429,8 +421,6 @@ Basic management
 
          from simgrid import Actor
 
-      .. autoclass:: simgrid.Actor
-
    .. group-tab:: C
 
       .. code:: C
@@ -446,6 +436,8 @@ Basic management
 Creating actors
 ---------------
 
+See also :ref:`the relevant example <s4u_ex_actors_create>`.
+
 .. tabs::
 
    .. group-tab:: C++
@@ -492,6 +484,7 @@ Retrieving actors
 
       .. doxygenfunction:: sg_actor_by_pid(aid_t pid)
       .. doxygenfunction:: sg_actor_self()
+      .. doxygenfunction:: sg_actor_list()
 
 Querying info
 -------------
@@ -506,7 +499,7 @@ Querying info
       .. doxygenfunction:: simgrid::s4u::Actor::get_ppid
       .. doxygenfunction:: simgrid::s4u::Actor::get_properties() const
       .. doxygenfunction:: simgrid::s4u::Actor::get_property(const std::string &key) const
-      .. doxygenfunction:: simgrid::s4u::Actor::set_property(const std::string &key, const std::string &value) 
+      .. doxygenfunction:: simgrid::s4u::Actor::set_property(const std::string &key, const std::string &value)
 
       .. doxygenfunction:: simgrid::s4u::Actor::get_host
       .. doxygenfunction:: simgrid::s4u::Actor::set_host
@@ -515,7 +508,7 @@ Querying info
       .. doxygenfunction:: simgrid::s4u::Actor::get_impl
 
    .. group-tab:: Python
-                  
+
       .. autoattribute:: simgrid.Actor.name
       .. autoattribute:: simgrid.Actor.host
       .. autoattribute:: simgrid.Actor.pid
@@ -605,6 +598,7 @@ Reacting to the end of actors
       .. doxygenfunction:: simgrid::s4u::Actor::join() const
       .. doxygenfunction:: simgrid::s4u::Actor::join(double timeout) const
       .. doxygenfunction:: simgrid::s4u::Actor::set_auto_restart(bool autorestart)
+      .. doxygenfunction:: simgrid::s4u::Actor::get_restart_count
 
    .. group-tab:: Python
 
@@ -623,14 +617,14 @@ Signals
 
    .. group-tab:: C++
 
-      .. doxygenvariable:: simgrid::s4u::Actor::on_creation
-      .. doxygenvariable:: simgrid::s4u::Actor::on_suspend
-      .. doxygenvariable:: simgrid::s4u::Actor::on_host_change
-      .. doxygenvariable:: simgrid::s4u::Actor::on_resume
-      .. doxygenvariable:: simgrid::s4u::Actor::on_sleep
-      .. doxygenvariable:: simgrid::s4u::Actor::on_wake_up
-      .. doxygenvariable:: simgrid::s4u::Actor::on_termination
-      .. doxygenvariable:: simgrid::s4u::Actor::on_destruction
+      .. doxygenfunction:: simgrid::s4u::Actor::on_creation_cb
+      .. doxygenfunction:: simgrid::s4u::Actor::on_suspend_cb
+      .. doxygenfunction:: simgrid::s4u::Actor::on_host_change_cb
+      .. doxygenfunction:: simgrid::s4u::Actor::on_resume_cb
+      .. doxygenfunction:: simgrid::s4u::Actor::on_sleep_cb
+      .. doxygenfunction:: simgrid::s4u::Actor::on_wake_up_cb
+      .. doxygenfunction:: simgrid::s4u::Actor::on_termination_cb
+      .. doxygenfunction:: simgrid::s4u::Actor::on_destruction_cb
 
 .. _API_s4u_this_actor:
 
@@ -663,6 +657,9 @@ Querying info
       .. autofunction:: simgrid.this_actor.get_host
       .. autofunction:: simgrid.this_actor.set_host
 
+      .. autofunction:: simgrid.this_actor.get_pid
+      .. autofunction:: simgrid.this_actor.get_ppid
+
    .. group-tab:: C
 
       .. doxygenfunction:: sg_actor_self_get_data()
@@ -697,9 +694,15 @@ Logging messages
 
 .. tabs::
 
+   .. group-tab:: C++
+
+      Please refer to :ref:`the relevant documentation <logging_prog>`.
+
    .. group-tab:: Python
 
+       .. autofunction:: simgrid.this_actor.debug
        .. autofunction:: simgrid.this_actor.info
+       .. autofunction:: simgrid.this_actor.warning
        .. autofunction:: simgrid.this_actor.error
 
 Sleeping
@@ -740,7 +743,7 @@ the execution, or start an asynchronous activity.
       .. doxygenfunction:: simgrid::s4u::this_actor::execute(double flop)
       .. doxygenfunction:: simgrid::s4u::this_actor::execute(double flop, double priority)
       .. doxygenfunction:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts)
-      .. doxygenfunction:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts, double timeout)
+      .. doxygenfunction:: simgrid::s4u::this_actor::thread_execute
 
    .. group-tab:: Python
 
@@ -782,10 +785,18 @@ Exiting
 ⁣  Simulation Engine
 ====================
 
-.. doxygenclass:: simgrid::s4u::Engine
+.. tabs::
 
-Initialization
---------------
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Engine
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Engine
+
+Engin initialization
+--------------------
 
 .. tabs::
 
@@ -794,6 +805,24 @@ Initialization
       .. doxygenfunction:: simgrid::s4u::Engine::Engine(int *argc, char **argv)
       .. doxygenfunction:: simgrid::s4u::Engine::is_initialized()
       .. doxygenfunction:: simgrid::s4u::Engine::shutdown()
+      .. doxygenfunction:: simgrid::s4u::Engine::get_instance()
+
+   .. group-tab:: Python
+
+       .. automethod:: simgrid.Engine.__init__
+       .. autoattribute:: simgrid.Engine.instance
+
+   .. group-tab:: C
+
+      .. doxygenfunction:: simgrid_init
+
+Simulation setup
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
       .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &str)
       .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &name, bool value)
       .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &name, double value)
@@ -812,20 +841,19 @@ Initialization
       .. doxygenfunction:: simgrid::s4u::Engine::register_function(const std::string &name, const kernel::actor::ActorCodeFactory &factory)
 
    .. group-tab:: Python
-   
+
        .. automethod:: simgrid.Engine.load_deployment
        .. automethod:: simgrid.Engine.load_platform
        .. automethod:: simgrid.Engine.register_actor
 
    .. group-tab:: C
 
-      .. doxygenfunction:: simgrid_init
-
       .. doxygenfunction:: simgrid_load_deployment
       .. doxygenfunction:: simgrid_load_platform
       .. doxygenfunction:: simgrid_register_default
       .. doxygenfunction:: simgrid_register_function
 
+
 Run the simulation
 ------------------
 
@@ -835,16 +863,19 @@ Run the simulation
 
       .. doxygenfunction:: simgrid::s4u::Engine::get_clock()
       .. doxygenfunction:: simgrid::s4u::Engine::run
+      .. doxygenfunction:: simgrid::s4u::Engine::run_until
 
    .. group-tab:: Python
-   
-      .. automethod:: simgrid.Engine.get_clock
+
+      .. autoattribute:: simgrid.Engine.clock
       .. automethod:: simgrid.Engine.run
+      .. automethod:: simgrid.Engine.run_until
 
    .. group-tab:: C
 
       .. doxygenfunction:: simgrid_get_clock
       .. doxygenfunction:: simgrid_run
+      .. doxygenfunction:: simgrid_run_until
 
 Retrieving actors
 -----------------
@@ -859,7 +890,7 @@ Retrieving actors
 
    .. group-tab:: C
 
-      .. doxygenfunction:: simgrid_get_actor_count()
+      .. doxygenfunction:: sg_actor_count()
 
 Retrieving hosts
 ----------------
@@ -876,7 +907,7 @@ Retrieving hosts
 
    .. group-tab:: Python
 
-      .. automethod:: simgrid.Engine.get_all_hosts
+      .. autoattribute:: simgrid.Engine.all_hosts
 
    .. group-tab:: C
 
@@ -895,6 +926,10 @@ Retrieving links
       .. doxygenfunction:: simgrid::s4u::Engine::link_by_name
       .. doxygenfunction:: simgrid::s4u::Engine::link_by_name_or_null
 
+   .. group-tab:: Python
+
+      .. autoattribute:: simgrid.Engine.all_links
+
 Interacting with the routing
 ----------------------------
 
@@ -904,11 +939,16 @@ Interacting with the routing
 
       .. doxygenfunction:: simgrid::s4u::Engine::get_all_netpoints
       .. doxygenfunction:: simgrid::s4u::Engine::get_filtered_netzones
-      .. doxygenfunction:: simgrid::s4u::Engine::get_instance()
       .. doxygenfunction:: simgrid::s4u::Engine::get_netzone_root
       .. doxygenfunction:: simgrid::s4u::Engine::netpoint_by_name_or_null
       .. doxygenfunction:: simgrid::s4u::Engine::netzone_by_name_or_null
-      .. doxygenfunction:: simgrid::s4u::Engine::set_netzone_root(const NetZone *netzone)
+
+   .. group-tab:: Python
+
+      .. autoattribute:: simgrid.Engine.all_netpoints
+      .. autoattribute:: simgrid.Engine.netzone_root
+      .. automethod:: simgrid.Engine.netpoint_by_name
+      .. automethod:: simgrid.Engine.netzone_by_name
 
 Signals
 -------
@@ -917,11 +957,12 @@ Signals
 
    .. group-tab:: C++
 
-      .. doxygenvariable:: simgrid::s4u::Engine::on_deadlock
-      .. doxygenvariable:: simgrid::s4u::Engine::on_platform_created
-      .. doxygenvariable:: simgrid::s4u::Engine::on_platform_creation
-      .. doxygenvariable:: simgrid::s4u::Engine::on_simulation_end
-      .. doxygenvariable:: simgrid::s4u::Engine::on_time_advance
+      .. doxygenfunction:: simgrid::s4u::Engine::on_deadlock_cb
+      .. doxygenfunction:: simgrid::s4u::Engine::on_platform_created_cb
+      .. doxygenfunction:: simgrid::s4u::Engine::on_platform_creation_cb
+      .. doxygenfunction:: simgrid::s4u::Engine::on_simulation_start_cb
+      .. doxygenfunction:: simgrid::s4u::Engine::on_simulation_end_cb
+      .. doxygenfunction:: simgrid::s4u::Engine::on_time_advance_cb
 
 .. _API_s4u_Mailbox:
 
@@ -929,7 +970,15 @@ Signals
 ⁣  class Mailbox
 ================
 
-.. doxygenclass:: simgrid::s4u::Mailbox
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Mailbox
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Mailbox
 
 Please also refer to the :ref:`full doc on s4u::Mailbox <s4u_mailbox>`.
 
@@ -948,7 +997,7 @@ Basic management
       idiom on mailboxes because they are internal objects to the simulation
       engine. Once created, there is no way to destroy a mailbox before the end
       of the simulation.
-         
+
       .. doxygenfunction:: simgrid::s4u::Mailbox::by_name(const std::string &name)
 
    .. group-tab:: Python
@@ -957,8 +1006,6 @@ Basic management
 
          #include <simgrid/mailbox.h>
 
-      .. autoclass:: simgrid.Mailbox
-
       .. automethod:: simgrid.Mailbox.by_name
 
    .. group-tab:: C
@@ -966,7 +1013,7 @@ Basic management
       .. code-block:: C
 
          #include <simgrid/s4u/mailbox.h>
-      
+
       .. doxygentypedef:: sg_mailbox_t
       .. doxygentypedef:: const_sg_mailbox_t
 
@@ -1003,6 +1050,7 @@ Sending data
 
       .. automethod:: simgrid.Mailbox.put
       .. automethod:: simgrid.Mailbox.put_async
+      .. automethod:: simgrid.Mailbox.put_init
 
    .. group-tab:: C
 
@@ -1024,13 +1072,14 @@ Receiving data
       .. doxygenfunction:: simgrid::s4u::Mailbox::get(double timeout)
       .. doxygenfunction:: simgrid::s4u::Mailbox::get_async(T **data)
       .. doxygenfunction:: simgrid::s4u::Mailbox::get_init()
-      .. doxygenfunction:: simgrid::s4u::Mailbox::iprobe(int type, bool(*match_fun)(void *, void *, kernel::activity::CommImpl *), void *data)
+      .. doxygenfunction:: simgrid::s4u::Mailbox::iprobe(int type, const std::function<bool(void *, void *, kernel::activity::CommImpl *)>& match_fun, void *data)
       .. doxygenfunction:: simgrid::s4u::Mailbox::listen
       .. doxygenfunction:: simgrid::s4u::Mailbox::ready
 
    .. group-tab:: Python
 
        .. automethod:: simgrid.Mailbox.get
+       .. automethod:: simgrid.Mailbox.get_async
 
    .. group-tab:: C
 
@@ -1054,7 +1103,7 @@ See :ref:`s4u_receiving_actor`.
    .. group-tab:: C
 
       .. doxygenfunction:: sg_mailbox_set_receiver(const char *alias)
-                  
+
 .. _API_s4u_Resource:
 
 =========
@@ -1067,7 +1116,20 @@ Resources
 ⁣  class Disk
 =============
 
-.. doxygenclass:: simgrid::s4u::Disk
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Disk
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Disk
+
+   .. group-tab:: C
+
+      .. doxygentypedef:: sg_disk_t
+      .. doxygentypedef:: const_sg_disk_t
 
 Basic management
 ----------------
@@ -1082,8 +1144,18 @@ Basic management
 
       Note that there is no DiskPtr type and that you cannot use the RAII
       idiom on disks because SimGrid does not allow (yet) to create nor
-      destroy resources once the simulation is started. 
-         
+      destroy resources once the simulation is started.
+
+      .. doxygenfunction:: simgrid::s4u::Disk::seal()
+
+   .. group-tab:: Python
+
+      .. code:: Python
+
+         from simgrid import Disk
+
+      .. automethod:: simgrid.Disk.seal
+
 
 Querying info
 -------------
@@ -1100,6 +1172,12 @@ Querying info
       .. doxygenfunction:: simgrid::s4u::Disk::get_read_bandwidth() const
       .. doxygenfunction:: simgrid::s4u::Disk::get_write_bandwidth() const
       .. doxygenfunction:: simgrid::s4u::Disk::set_property(const std::string &, const std::string &value)
+      .. doxygenfunction:: simgrid::s4u::Disk::set_sharing_policy(Operation op, SharingPolicy policy, const s4u::NonLinearResourceCb& cb = {})
+
+   .. group-tab:: Python
+
+      .. autoattribute:: simgrid.Disk.name
+      .. automethod:: simgrid.Disk.set_sharing_policy
 
 I/O operations
 --------------
@@ -1114,6 +1192,13 @@ I/O operations
       .. doxygenfunction:: simgrid::s4u::Disk::write(sg_size_t size) const
       .. doxygenfunction:: simgrid::s4u::Disk::write_async(sg_size_t size) const
 
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Disk.read
+      .. automethod:: simgrid.Disk.read_async
+      .. automethod:: simgrid.Disk.write
+      .. automethod:: simgrid.Disk.write_async
+
 Signals
 -------
 
@@ -1121,9 +1206,9 @@ Signals
 
    .. group-tab:: C++
 
-      .. doxygenvariable:: simgrid::s4u::Disk::on_creation
-      .. doxygenvariable:: simgrid::s4u::Disk::on_destruction
-      .. doxygenvariable:: simgrid::s4u::Disk::on_state_change
+      .. doxygenfunction:: simgrid::s4u::Disk::on_creation_cb
+      .. doxygenfunction:: simgrid::s4u::Disk::on_destruction_cb
+      .. doxygenfunction:: simgrid::s4u::Disk::on_state_change_cb
 
 
 .. _API_s4u_Host:
@@ -1132,7 +1217,15 @@ Signals
 ⁣  class Host
 =============
 
-.. doxygenclass:: simgrid::s4u::Host
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Host
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Host
 
 Basic management
 ----------------
@@ -1147,9 +1240,10 @@ Basic management
 
       Note that there is no HostPtr type, and that you cannot use the RAII
       idiom on hosts because SimGrid does not allow (yet) to create nor
-      destroy resources once the simulation is started. 
+      destroy resources once the simulation is started.
 
       .. doxygenfunction:: simgrid::s4u::Host::destroy()
+      .. doxygenfunction:: simgrid::s4u::Host::seal()
 
    .. group-tab:: Python
 
@@ -1157,6 +1251,8 @@ Basic management
 
          from simgrid import Host
 
+      .. automethod:: simgrid.Host.seal
+
    .. group-tab:: C
 
       .. code:: C
@@ -1183,7 +1279,7 @@ Retrieving hosts
 
    .. group-tab:: Python
 
-      See also :py:func:`simgrid.Engine.get_all_hosts`.
+      See also :py:attr:`simgrid.Engine.all_hosts`.
 
       .. automethod:: simgrid.Host.by_name
       .. automethod:: simgrid.Host.current
@@ -1193,7 +1289,23 @@ Retrieving hosts
       .. doxygenfunction:: sg_host_by_name(const char *name)
       .. doxygenfunction:: sg_host_count()
       .. doxygenfunction:: sg_host_list()
-      .. doxygenfunction:: sg_hosts_as_dynar()
+
+Modifying characteristics
+-------------------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenfunction:: simgrid::s4u::Host::set_core_count(int core_count)
+      .. doxygenfunction:: simgrid::s4u::Host::set_coordinates(const std::string& coords)
+      .. doxygenfunction:: simgrid::s4u::Host::set_sharing_policy(SharingPolicy policy, const s4u::NonLinearResourceCb& cb = {})
+
+   .. group-tab:: Python
+
+      .. autoattribute:: simgrid.Host.core_count
+      .. automethod:: simgrid.Host.set_coordinates
+      .. automethod:: simgrid.Host.set_sharing_policy
 
 Querying info
 -------------
@@ -1212,14 +1324,15 @@ Querying info
    .. group-tab:: Python
 
       .. autoattribute:: simgrid.Host.name
+      .. autoattribute:: simgrid.Host.core_count
       .. autoattribute:: simgrid.Host.load
       .. autoattribute:: simgrid.Host.pstate
       .. autoattribute:: simgrid.Host.speed
+      .. autoattribute:: simgrid.Host.available_speed
 
    .. group-tab:: C
 
       .. doxygenfunction:: sg_host_core_count(const_sg_host_t host)
-      .. doxygenfunction:: sg_host_dump(const_sg_host_t ws)
       .. doxygenfunction:: sg_host_get_name(const_sg_host_t host)
       .. doxygenfunction:: sg_host_get_load(const_sg_host_t host)
       .. doxygenfunction:: sg_host_get_speed(const_sg_host_t host)
@@ -1257,6 +1370,10 @@ Retrieving components
       .. doxygenfunction:: simgrid::s4u::Host::get_disks() const
       .. doxygenfunction:: simgrid::s4u::Host::remove_disk(const std::string &disk_name)
 
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Host.get_disks
+
    .. group-tab:: C
 
       .. doxygenfunction:: sg_host_get_actor_list(const_sg_host_t host, xbt_dynar_t whereto)
@@ -1287,23 +1404,36 @@ DVFS
 
       .. doxygenfunction:: simgrid::s4u::Host::get_pstate() const
       .. doxygenfunction:: simgrid::s4u::Host::get_pstate_count() const
-      .. doxygenfunction:: simgrid::s4u::Host::get_pstate_speed(int pstate_index) const
-      .. doxygenfunction:: simgrid::s4u::Host::set_pstate(int pstate_index)
-      .. doxygenfunction:: simgrid::s4u::Host::set_speed_profile(kernel::profile::Profile *p)
-      .. doxygenfunction:: simgrid::s4u::Host::set_state_profile(kernel::profile::Profile *p)
+      .. doxygenfunction:: simgrid::s4u::Host::get_pstate_speed(unsigned long pstate_index) const
+      .. doxygenfunction:: simgrid::s4u::Host::set_pstate(unsigned long pstate_index)
 
    .. group-tab:: Python
 
-      .. automethod:: simgrid.Host.get_pstate_count
-      .. automethod:: simgrid.Host.get_pstate_speed
+      .. autoattribute:: simgrid.Host.pstate_count
+      .. automethod:: simgrid.Host.pstate_speed
 
    .. group-tab:: C
 
       .. doxygenfunction:: sg_host_get_available_speed(const_sg_host_t host)
       .. doxygenfunction:: sg_host_get_nb_pstates(const_sg_host_t host)
       .. doxygenfunction:: sg_host_get_pstate(const_sg_host_t host)
-      .. doxygenfunction:: sg_host_get_pstate_speed(const_sg_host_t host, int pstate_index)
-      .. doxygenfunction:: sg_host_set_pstate(sg_host_t host, int pstate)
+      .. doxygenfunction:: sg_host_get_pstate_speed(const_sg_host_t host, unsigned long pstate_index)
+      .. doxygenfunction:: sg_host_set_pstate(sg_host_t host, unsigned long pstate)
+
+Dynamic profiles
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenfunction:: simgrid::s4u::Host::set_speed_profile(kernel::profile::Profile *p)
+      .. doxygenfunction:: simgrid::s4u::Host::set_state_profile(kernel::profile::Profile *p)
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Host.set_speed_profile
+      .. automethod:: simgrid.Host.set_state_profile
 
 Execution
 ---------
@@ -1329,7 +1459,16 @@ using :cpp:func:`Comm::sendto() <simgrid::s4u::Comm::sendto()>`.
       .. doxygenfunction:: simgrid::s4u::Host::get_englobing_zone() const
       .. doxygenfunction:: simgrid::s4u::Host::get_netpoint() const
       .. doxygenfunction:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< Link * > &links, double *latency) const
-      .. doxygenfunction:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< kernel::resource::LinkImpl * > &links, double *latency) const
+      .. doxygenfunction:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< kernel::resource::StandardLinkImpl * > &links, double *latency) const
+      .. doxygenfunction:: simgrid::s4u::Host::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth)
+      .. doxygenfunction:: simgrid::s4u::Host::create_disk(const std::string& name, const std::string& read_bandwidth, const std::string& write_bandwidth)
+
+   .. group-tab:: Python
+
+      .. autoattribute:: simgrid.Host.netpoint
+      .. automethod:: simgrid.Host.create_disk
+         
+      .. automethod:: simgrid.Host.route_to
 
    .. group-tab:: C
 
@@ -1345,10 +1484,10 @@ Signals
 
    .. group-tab:: C++
 
-      .. doxygenvariable:: simgrid::s4u::Host::on_creation
-      .. doxygenvariable:: simgrid::s4u::Host::on_destruction
-      .. doxygenvariable:: simgrid::s4u::Host::on_speed_change
-      .. doxygenvariable:: simgrid::s4u::Host::on_state_change
+      .. doxygenfunction:: simgrid::s4u::Host::on_creation_cb
+      .. doxygenfunction:: simgrid::s4u::Host::on_destruction_cb
+      .. doxygenfunction:: simgrid::s4u::Host::on_speed_change_cb
+      .. doxygenfunction:: simgrid::s4u::Host::on_state_change_cb
 
 .. _API_s4u_Link:
 
@@ -1356,9 +1495,18 @@ Signals
 ⁣  class Link
 =============
 
-.. doxygenclass:: simgrid::s4u::Link
-.. doxygenclass:: simgrid::s4u::SplitDuplexLink
-.. doxygenclass:: simgrid::s4u::LinkInRoute
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Link
+      .. doxygenclass:: simgrid::s4u::SplitDuplexLink
+      .. doxygenclass:: simgrid::s4u::LinkInRoute
+
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Link
 
 Basic management
 ----------------
@@ -1373,7 +1521,9 @@ Basic management
 
       Note that there is no LinkPtr type and that you cannot use the RAII
       idiom on hosts because SimGrid does not allow (yet) to create nor
-      destroy resources once the simulation is started. 
+      destroy resources once the simulation is started.
+
+      .. doxygenfunction:: simgrid::s4u::Link::seal()
 
    .. group-tab:: Python
 
@@ -1381,6 +1531,8 @@ Basic management
 
          from simgrid import Link
 
+      .. automethod:: simgrid.Link.seal
+
    .. group-tab:: C
 
       .. code:: C
@@ -1404,6 +1556,13 @@ Retrieving links
       .. doxygenfunction:: simgrid::s4u::Link::by_name(const std::string &name)
       .. doxygenfunction:: simgrid::s4u::Link::by_name_or_null(const std::string &name)
 
+   .. group-tab:: Python
+
+      See also :py:attr:`simgrid.Engine.all_links`.
+
+      .. automethod:: simgrid.Link.by_name
+      .. autoattribute:: simgrid.Link.name
+
    .. group-tab:: C
 
       .. doxygenfunction:: sg_link_by_name(const char *name)
@@ -1425,6 +1584,11 @@ Querying info
       .. doxygenfunction:: simgrid::s4u::Link::get_usage() const
       .. doxygenfunction:: simgrid::s4u::Link::is_used() const
 
+   .. group-tab:: Python
+
+      .. autoattribute:: simgrid.Link.bandwidth
+      .. autoattribute:: simgrid.Link.latency
+
    .. group-tab:: C
 
       .. doxygenfunction:: sg_link_get_bandwidth(const_sg_link_t link)
@@ -1441,6 +1605,16 @@ Modifying characteristics
 
       .. doxygenfunction:: simgrid::s4u::Link::set_bandwidth(double value)
       .. doxygenfunction:: simgrid::s4u::Link::set_latency(double value)
+      .. doxygenfunction:: simgrid::s4u::Link::set_latency(const std::string& value)
+      .. doxygenfunction:: simgrid::s4u::Link::set_concurrency_limit(int limit)
+      .. doxygenfunction:: simgrid::s4u::Link::set_sharing_policy(SharingPolicy policy, const NonLinearResourceCb& cb = {})
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Link.set_bandwidth
+      .. automethod:: simgrid.Link.set_latency
+      .. automethod:: simgrid.Link.set_concurrency_limit
+      .. automethod:: simgrid.Link.set_sharing_policy
 
    .. group-tab:: C
 
@@ -1475,6 +1649,14 @@ On/Off
       .. doxygenfunction:: simgrid::s4u::Link::turn_off()
       .. doxygenfunction:: simgrid::s4u::Link::turn_on()
 
+   .. group-tab:: Python
+
+      See also :py:func:`simgrid.Link.set_state_profile`.
+
+      .. automethod:: simgrid.Link.is_on
+      .. automethod:: simgrid.Link.turn_off
+      .. automethod:: simgrid.Link.turn_on
+
 Dynamic profiles
 ----------------
 
@@ -1488,6 +1670,12 @@ See :ref:`howto_churn` for more details.
       .. doxygenfunction:: simgrid::s4u::Link::set_latency_profile(kernel::profile::Profile *profile)
       .. doxygenfunction:: simgrid::s4u::Link::set_state_profile(kernel::profile::Profile *profile)
 
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Link.set_bandwidth_profile
+      .. automethod:: simgrid.Link.set_latency_profile
+      .. automethod:: simgrid.Link.set_state_profile
+
 WIFI links
 ----------
 
@@ -1497,6 +1685,10 @@ WIFI links
 
       .. doxygenfunction:: simgrid::s4u::Link::set_host_wifi_rate
 
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Link.set_host_wifi_rate
+
 Signals
 -------
 
@@ -1504,12 +1696,11 @@ Signals
 
    .. group-tab:: C++
 
-      .. doxygenvariable:: simgrid::s4u::Link::on_bandwidth_change
-      .. doxygenvariable:: simgrid::s4u::Link::on_communicate
-      .. doxygenvariable:: simgrid::s4u::Link::on_communication_state_change
-      .. doxygenvariable:: simgrid::s4u::Link::on_creation
-      .. doxygenvariable:: simgrid::s4u::Link::on_destruction
-      .. doxygenvariable:: simgrid::s4u::Link::on_state_change
+      .. doxygenfunction:: simgrid::s4u::Link::on_bandwidth_change_cb
+      .. doxygenfunction:: simgrid::s4u::Link::on_communication_state_change_cb
+      .. doxygenfunction:: simgrid::s4u::Link::on_creation_cb
+      .. doxygenfunction:: simgrid::s4u::Link::on_destruction_cb
+      .. doxygenfunction:: simgrid::s4u::Link::on_state_change_cb
 
 .. _API_s4u_NetZone:
 
@@ -1517,7 +1708,15 @@ Signals
 ⁣  class NetZone
 ================
 
-.. doxygenclass:: simgrid::s4u::NetZone
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::NetZone
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.NetZone
 
 Basic management
 ----------------
@@ -1532,7 +1731,17 @@ Basic management
 
       Note that there is no NetZonePtr type and that you cannot use the RAII
       idiom on network zones because SimGrid does not allow (yet) to create nor
-      destroy resources once the simulation is started. 
+      destroy resources once the simulation is started.
+
+      .. doxygenfunction:: simgrid::s4u::NetZone::seal
+
+   .. group-tab:: Python
+
+      .. code:: Python
+
+         from simgrid import NetZone
+
+      .. automethod:: simgrid.NetZone.seal
 
    .. group-tab:: C
 
@@ -1570,6 +1779,12 @@ Querying info
 
       .. doxygenfunction:: simgrid::s4u::NetZone::get_cname() const
       .. doxygenfunction:: simgrid::s4u::NetZone::get_name() const
+      .. doxygenfunction:: simgrid::s4u::NetZone::get_netpoint()
+
+   .. group-tab:: Python
+
+      .. autoattribute:: simgrid.NetZone.name
+      .. autoattribute:: simgrid.NetZone.netpoint
 
    .. group-tab:: C
 
@@ -1586,6 +1801,10 @@ User data and properties
       .. doxygenfunction:: simgrid::s4u::NetZone::get_property(const std::string &key) const
       .. doxygenfunction:: simgrid::s4u::NetZone::set_property(const std::string &key, const std::string &value)
 
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.NetZone.set_property
+
    .. group-tab:: C
 
       .. doxygenfunction:: sg_zone_get_property_value(const_sg_netzone_t as, const char *name)
@@ -1617,6 +1836,12 @@ Routing data
       .. doxygenfunction:: simgrid::s4u::NetZone::add_bypass_route
       .. doxygenfunction:: simgrid::s4u::NetZone::get_children() const
       .. doxygenfunction:: simgrid::s4u::NetZone::get_parent() const
+      .. doxygenfunction:: simgrid::s4u::NetZone::set_parent(const NetZone* parent)
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.NetZone.add_route
+      .. automethod:: simgrid.NetZone.set_parent
 
    .. group-tab:: C
 
@@ -1629,8 +1854,89 @@ Signals
 
   .. group-tab:: C++
 
-     .. doxygenvariable:: simgrid::s4u::NetZone::on_creation
-     .. doxygenvariable:: simgrid::s4u::NetZone::on_seal
+     .. doxygenfunction:: simgrid::s4u::NetZone::on_creation_cb
+     .. doxygenfunction:: simgrid::s4u::NetZone::on_seal_cb
+
+Creating resources
+------------------
+
+Zones
+^^^^^
+.. tabs::
+
+  .. group-tab:: C++
+
+     .. doxygenfunction:: simgrid::s4u::create_full_zone(const std::string& name)
+     .. doxygenfunction:: simgrid::s4u::create_empty_zone(const std::string& name)
+     .. doxygenfunction:: simgrid::s4u::create_star_zone(const std::string& name)
+     .. doxygenfunction:: simgrid::s4u::create_dijkstra_zone(const std::string& name, bool cache)
+     .. doxygenfunction:: simgrid::s4u::create_floyd_zone(const std::string& name)
+     .. doxygenfunction:: simgrid::s4u::create_vivaldi_zone(const std::string& name)
+     .. doxygenfunction:: simgrid::s4u::create_wifi_zone(const std::string& name)
+     .. doxygenfunction:: simgrid::s4u::create_torus_zone
+     .. doxygenfunction:: simgrid::s4u::create_fatTree_zone(const std::string& name, const NetZone* parent, const FatTreeParams& parameters, const ClusterCallbacks& set_callbacks, double bandwidth, double latency, Link::SharingPolicy sharing_policy)
+     .. doxygenfunction:: simgrid::s4u::create_dragonfly_zone(const std::string& name, const NetZone* parent, const DragonflyParams& parameters, const ClusterCallbacks& set_callbacks, double bandwidth, double latency, Link::SharingPolicy sharing_policy)
+
+  .. group-tab:: Python
+
+     .. automethod:: simgrid.NetZone.create_full_zone
+     .. automethod:: simgrid.NetZone.create_empty_zone
+     .. automethod:: simgrid.NetZone.create_star_zone
+     .. automethod:: simgrid.NetZone.create_dijkstra_zone
+     .. automethod:: simgrid.NetZone.create_floyd_zone
+     .. automethod:: simgrid.NetZone.create_vivaldi_zone
+     .. automethod:: simgrid.NetZone.create_wifi_zone
+     .. automethod:: simgrid.NetZone.create_torus_zone
+     .. automethod:: simgrid.NetZone.create_fatTree_zone
+     .. automethod:: simgrid.NetZone.create_dragonfly_zone
+
+Hosts
+^^^^^
+
+.. tabs::
+
+  .. group-tab:: C++
+
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_host(const std::string& name, const std::vector<double>& speed_per_pstate)
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_host(const std::string& name, double speed)
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_host(const std::string& name, const std::vector<std::string>& speed_per_pstate)
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_host(const std::string& name, const std::string& speed)
+
+  .. group-tab:: Python
+
+     .. automethod:: simgrid.NetZone.create_host
+
+Links
+^^^^^
+
+.. tabs::
+
+  .. group-tab:: C++
+
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_link(const std::string& name, const std::vector<double>& bandwidths)
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_link(const std::string& name, double bandwidth)
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_link(const std::string& name, const std::vector<std::string>& bandwidthds)
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_link(const std::string& name, const std::string& bandwidth)
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_split_duplex_link(const std::string& name, const std::string& bandwidth)
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_split_duplex_link(const std::string& name, double bandwidth)
+
+  .. group-tab:: Python
+
+     .. automethod:: simgrid.NetZone.create_link
+     .. automethod:: simgrid.NetZone.create_split_duplex_link
+
+Router
+^^^^^^
+
+.. tabs::
+
+  .. group-tab:: C++
+
+     .. doxygenfunction:: simgrid::s4u::NetZone::create_router(const std::string& name)
+
+  .. group-tab:: Python
+
+     .. automethod:: simgrid.NetZone.create_router
 
 .. _API_s4u_VirtualMachine:
 
@@ -1672,8 +1978,8 @@ Creating VMs
 
    .. group-tab:: C++
 
-      .. doxygenfunction:: simgrid::s4u::VirtualMachine::VirtualMachine(const std::string &name, Host *physical_host, int core_amount)
-      .. doxygenfunction:: simgrid::s4u::VirtualMachine::VirtualMachine(const std::string &name, Host *physical_host, int core_amount, size_t ramsize)
+      .. doxygenfunction:: simgrid::s4u::Host::create_vm(const std::string &name, int core_amount)
+      .. doxygenfunction:: simgrid::s4u::Host::create_vm(const std::string &name, int core_amount, size_t ramsize)
       .. doxygenfunction:: simgrid::s4u::VirtualMachine::destroy
 
    .. group-tab:: C
@@ -1735,16 +2041,22 @@ Signals
 
    .. group-tab:: C++
 
-      .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_migration_end
-      .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_migration_start
-      .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_resume
-      .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_shutdown
-      .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_start
-      .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_started
-      .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_suspend
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_creation_cb
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_destruction_cb
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_migration_end_cb
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_migration_start_cb
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_resume_cb
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_shutdown_cb
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_start_cb
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_started_cb
+      .. doxygenfunction:: simgrid::s4u::VirtualMachine::on_suspend_cb
 
 .. _API_s4u_Activity:
 
+==========
+Activities
+==========
+
 ==============
 class Activity
 ==============
@@ -1754,7 +2066,7 @@ class Activity
 **Known subclasses:**
 :ref:`Communications <API_s4u_Comm>` (started on Mailboxes and consuming links),
 :ref:`Executions <API_s4u_Exec>` (started on Host and consuming CPU resources)
-:ref:`I/O <API_s4u_Io>` (started on and consumming disks).
+:ref:`I/O <API_s4u_Io>` (started on and consuming disks).
 See also the :ref:`section on activities <s4u_Activities>` above.
 
 Basic management
@@ -1811,13 +2123,32 @@ Suspending and resuming an activity
       .. doxygenfunction:: simgrid::s4u::Activity::resume
       .. doxygenfunction:: simgrid::s4u::Activity::is_suspended
 
+Signals
+-------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenfunction:: simgrid::s4u::Activity::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Activity::on_suspend_cb
+      .. doxygenfunction:: simgrid::s4u::Activity::on_resume_cb
+
 .. _API_s4u_Comm:
 
 =============
 ⁣  class Comm
 =============
 
-.. doxygenclass:: simgrid::s4u::Comm
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Comm
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Comm
 
 Basic management
 ----------------
@@ -1838,8 +2169,6 @@ Basic management
 
          from simgrid import Comm
 
-      .. autoclass:: simgrid.Comm
-
    .. group-tab:: c
 
       .. code:: c
@@ -1847,7 +2176,6 @@ Basic management
          #include <simgrid/comm.h>
 
       .. doxygentypedef:: sg_comm_t
-      .. doxygentypedef:: const_sg_comm_t
 
 Querying info
 -------------
@@ -1862,13 +2190,17 @@ Querying info
       .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff)
       .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff, size_t size)
       .. doxygenfunction:: simgrid::s4u::Comm::detach()
-      .. doxygenfunction:: simgrid::s4u::Comm::detach(void(*clean_function)(void *))
-      .. doxygenfunction:: simgrid::s4u::Comm::set_payload_size(double bytes)
+      .. doxygenfunction:: simgrid::s4u::Comm::detach(const std::function<void(void*)>& clean_function)
+      .. doxygenfunction:: simgrid::s4u::Comm::set_payload_size(uint64_t bytes)
       .. doxygenfunction:: simgrid::s4u::Comm::set_rate(double rate)
       .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff)
       .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff, size_t size)
       .. doxygenfunction:: simgrid::s4u::Comm::set_src_data_size(size_t size)
 
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Comm.detach
+
 Life cycle
 ----------
 
@@ -1880,9 +2212,10 @@ also start direct communications as shown below.
    .. group-tab:: C++
 
       .. doxygenfunction:: simgrid::s4u::Comm::sendto
-      .. doxygenfunction:: simgrid::s4u::Comm::sendto_init
+      .. doxygenfunction:: simgrid::s4u::Comm::sendto_init()
+      .. doxygenfunction:: simgrid::s4u::Comm::sendto_init(Host *from, Host *to)
       .. doxygenfunction:: simgrid::s4u::Comm::sendto_async
-      
+
       .. doxygenfunction:: simgrid::s4u::Comm::cancel
       .. doxygenfunction:: simgrid::s4u::Comm::start
       .. doxygenfunction:: simgrid::s4u::Comm::test
@@ -1898,8 +2231,11 @@ also start direct communications as shown below.
 
       .. automethod:: simgrid.Comm.test
       .. automethod:: simgrid.Comm.wait
+      .. automethod:: simgrid.Comm.wait_for
       .. automethod:: simgrid.Comm.wait_all
+      .. automethod:: simgrid.Comm.wait_all_for
       .. automethod:: simgrid.Comm.wait_any
+      .. automethod:: simgrid.Comm.wait_any_for
 
    .. group-tab:: C
 
@@ -1915,8 +2251,10 @@ Signals
 
    .. group-tab:: C++
 
-      .. doxygenvariable:: simgrid::s4u::Comm::on_completion
-      .. doxygenvariable:: simgrid::s4u::Comm::on_start
+      .. doxygenfunction:: simgrid::s4u::Comm::on_start_cb
+      .. doxygenfunction:: simgrid::s4u::Comm::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Comm::on_recv_cb
+      .. doxygenfunction:: simgrid::s4u::Comm::on_send_cb
 
 .. _API_s4u_Exec:
 
@@ -1924,7 +2262,15 @@ Signals
 ⁣  class Exec
 =============
 
-.. doxygenclass:: simgrid::s4u::Exec
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Exec
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Exec
 
 Basic management
 ----------------
@@ -1945,8 +2291,6 @@ Basic management
 
          from simgrid import Exec
 
-      .. autoclass:: simgrid.Exec
-
    .. group-tab:: C
 
       .. code-block:: C
@@ -1981,7 +2325,7 @@ Querying info
       .. autoattribute:: simgrid.Exec.remaining_ratio
 
    .. group-tab:: C
-   
+
       .. doxygenfunction:: sg_exec_set_bound(sg_exec_t exec, double bound)
       .. doxygenfunction:: sg_exec_get_name(const_sg_exec_t exec)
       .. doxygenfunction:: sg_exec_set_name(sg_exec_t exec, const char* name)
@@ -2012,7 +2356,7 @@ Life cycle
        .. automethod:: simgrid.Exec.wait
 
    .. group-tab:: C
-   
+
        .. doxygenfunction:: sg_exec_start(sg_exec_t exec)
        .. doxygenfunction:: sg_exec_cancel(sg_exec_t exec);
        .. doxygenfunction:: sg_exec_test(sg_exec_t exec);
@@ -2028,8 +2372,8 @@ Signals
 
    .. group-tab:: C++
 
-      .. doxygenvariable:: simgrid::s4u::Exec::on_start
-      .. doxygenvariable:: simgrid::s4u::Exec::on_completion
+      .. doxygenfunction:: simgrid::s4u::Exec::on_start_cb
+      .. doxygenfunction:: simgrid::s4u::Exec::on_completion_cb
 
 .. _API_s4u_Io:
 
@@ -2037,7 +2381,15 @@ Signals
 ⁣  class Io
 ===========
 
-.. doxygenclass:: simgrid::s4u::Io
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Io
+
+   .. group-tab:: Python
+   
+      .. autoclass:: simgrid.Io
 
 Basic management
 ----------------
@@ -2074,6 +2426,25 @@ Life cycle
       .. doxygenfunction:: simgrid::s4u::Io::test
       .. doxygenfunction:: simgrid::s4u::Io::wait
       .. doxygenfunction:: simgrid::s4u::Io::wait_for
+      .. doxygenfunction:: simgrid::s4u::Io::wait_any(const std::vector<IoPtr> &ios)
+      .. doxygenfunction:: simgrid::s4u::Io::wait_any_for(const std::vector<IoPtr> &ios, double timeout)
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Io.test
+      .. automethod:: simgrid.Io.wait
+      .. automethod:: simgrid.Io.wait_any_for
+      .. automethod:: simgrid.Io.wait_any
+
+Signals
+-------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenfunction:: simgrid::s4u::Io::on_start_cb
+      .. doxygenfunction:: simgrid::s4u::Io::on_completion_cb
 
 .. _API_s4u_Synchronizations:
 
@@ -2087,7 +2458,15 @@ Synchronization Objects
 ⁣  Mutex
 ==============
 
-.. doxygenclass:: simgrid::s4u::Mutex
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Mutex
+
+   .. group-tab:: Python
+
+      .. autoclass:: simgrid.Mutex
 
 Basic management
 ----------------
@@ -2104,6 +2483,21 @@ Basic management
 
          .. doxygenfunction:: simgrid::s4u::Mutex::create()
 
+      .. group-tab:: Python
+
+         .. code-block:: Python
+
+            from simgrid import Mutex
+            mutex = Mutex()
+
+            # Use a context manager to acquire and automatically release the mutex
+            # when leaving the scope.
+            with mutex:
+                # Access shared resource ...
+                pass
+
+         .. automethod:: simgrid.Mutex.__init__
+
       .. group-tab:: C
 
          .. code-block:: C
@@ -2129,6 +2523,12 @@ Locking
          .. doxygenfunction:: simgrid::s4u::Mutex::try_lock()
          .. doxygenfunction:: simgrid::s4u::Mutex::unlock()
 
+      .. group-tab:: Python
+
+         .. automethod:: simgrid.Mutex.lock
+         .. automethod:: simgrid.Mutex.try_lock
+         .. automethod:: simgrid.Mutex.unlock
+
       .. group-tab:: C
 
          .. doxygenfunction:: sg_mutex_lock(sg_mutex_t mutex)
@@ -2141,7 +2541,15 @@ Locking
 ⁣  Barrier
 ================
 
-.. doxygenclass:: simgrid::s4u::Barrier
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Barrier
+
+   .. group-tab:: Python
+
+      .. autoclass:: simgrid.Barrier
 
 .. tabs::
 
@@ -2153,10 +2561,19 @@ Locking
 
       .. doxygentypedef:: BarrierPtr
 
-      .. doxygenfunction:: simgrid::s4u::Barrier::Barrier(unsigned int expected_actors)
       .. doxygenfunction:: simgrid::s4u::Barrier::create(unsigned int expected_actors)
       .. doxygenfunction:: simgrid::s4u::Barrier::wait()
 
+   .. group-tab:: Python
+
+      .. code-block:: Python
+
+         from simgrid import Barrier
+         barrier = Barrier(2)
+
+      .. automethod:: simgrid.Barrier.__init__
+      .. automethod:: simgrid.Barrier.wait
+
    .. group-tab:: C
 
       .. code-block:: C
@@ -2164,12 +2581,9 @@ Locking
          #include <simgrid/barrier.hpp>
 
       .. doxygentypedef:: sg_bar_t
-      .. cpp:type:: const s4u_Barrier* const_sg_bar_t
-
-         Pointer to a constant barrier object.
 
       .. doxygenfunction:: sg_barrier_init(unsigned int count)
-      .. doxygenfunction:: sg_barrier_destroy(const_sg_bar_t bar)
+      .. doxygenfunction:: sg_barrier_destroy(sg_bar_t bar)
       .. doxygenfunction:: sg_barrier_wait(sg_bar_t bar)
 
 
@@ -2241,8 +2655,15 @@ Waiting and notifying
 ⁣  Semaphore
 ==================
 
-.. doxygenclass:: simgrid::s4u::Semaphore
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::Semaphore
 
+   .. group-tab:: Python
+
+      .. autoclass:: simgrid.Semaphore
 
 Basic management
 ----------------
@@ -2258,6 +2679,19 @@ Basic management
          .. doxygentypedef:: SemaphorePtr
          .. doxygenfunction:: simgrid::s4u::Semaphore::create(unsigned int initial_capacity)
 
+      .. group-tab:: Python
+
+         .. code-block:: Python
+
+            from simgrid import Semaphore
+            semaphore = Semaphore(1)
+            # Automatically acquire the semaphore, and release it after leaving the scope.
+            with semaphore:
+                # Do something with the shared resource
+                pass
+
+         .. automethod:: simgrid.Semaphore.__init__
+
       .. group-tab:: C
 
          .. code-block:: C
@@ -2285,6 +2719,14 @@ Locking
          .. doxygenfunction:: simgrid::s4u::Semaphore::release()
          .. doxygenfunction:: simgrid::s4u::Semaphore::would_block() const
 
+      .. group-tab:: Python
+
+         .. automethod:: simgrid.Semaphore.acquire
+         .. automethod:: simgrid.Semaphore.acquire_timeout
+         .. autoattribute:: simgrid.Semaphore.capacity
+         .. automethod:: simgrid.Semaphore.release
+         .. autoattribute:: simgrid.Semaphore.would_block
+
       .. group-tab:: C
 
          .. doxygenfunction:: sg_sem_acquire(sg_sem_t sem)