+ void load_deployment(const std::string& file) const;
+ void register_function(const std::string& name, const actor::ActorCodeFactory& code);
+ void register_default(const actor::ActorCodeFactory& code);
+
+ /**
+ * @brief Add a model to engine list
+ *
+ * @param model Pointer to model
+ * @param list List of dependencies for this model
+ */
+ void add_model(std::shared_ptr<simgrid::kernel::resource::Model> model,
+ const std::vector<resource::Model*>& dep_models = {});
+
+ /** @brief Get list of all models managed by this engine */
+ const std::vector<resource::Model*>& get_all_models() const { return models_; }
+
+ static EngineImpl* get_instance() { return simgrid::s4u::Engine::get_instance()->pimpl; }
+ actor::ActorCodeFactory get_function(const std::string& name)
+ {
+ auto res = registered_functions.find(name);
+ if (res == registered_functions.end())
+ return default_function;
+ else
+ return res->second;
+ }
+ void add_daemon(actor::ActorImpl* d) { daemons_.insert(d); }
+ void rm_daemon(actor::ActorImpl* d);
+
+ bool execute_tasks();
+ void add_task(xbt::Task<void()>&& t) { tasks.push_back(std::move(t)); }
+ void wake_all_waiting_actors() const;
+ void display_all_actor_status() const;
+
+ /** @brief Run the main simulation loop. */
+ void run();