+ 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);
+ void add_actor_to_run_list(actor::ActorImpl* a);
+ void add_actor_to_run_list_no_check(actor::ActorImpl* a);
+ bool has_actors_to_run() { return not actors_to_run_.empty(); }
+ const actor::ActorImpl* get_first_actor_to_run() const { return actors_to_run_.front(); }
+ const actor::ActorImpl* get_actor_to_run_at(unsigned long int i) const { return actors_to_run_[i]; }
+ unsigned long int get_actor_to_run_count() { return actors_to_run_.size(); }
+
+ const std::vector<actor::ActorImpl*>& get_actors_to_run() const { return actors_to_run_; }
+ const std::vector<actor::ActorImpl*>& get_actors_that_ran() const { return actors_that_ran_; }
+
+ 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;
+ void run_all_actors();
+
+ /** @brief Run the main simulation loop. */
+ void run();