#include "src/surf/surf_interface.hpp"
namespace simgrid {
-namespace surf {
+namespace kernel {
+namespace resource {
-typedef std::pair<double, simgrid::surf::Action*> heap_element_type;
+typedef std::pair<double, simgrid::kernel::resource::Action*> heap_element_type;
typedef boost::heap::pairing_heap<heap_element_type, boost::heap::constant_time_size<false>, boost::heap::stable<true>,
boost::heap::compare<simgrid::xbt::HeapComparator<heap_element_type>>>
heap_type;
* @brief SURF action interface class
* @details An action is an event generated by a resource (e.g.: a communication for the network)
*/
-XBT_PUBLIC_CLASS Action
-{
+class XBT_PUBLIC Action {
public:
boost::intrusive::list_member_hook<> modifiedSetHook_; /* Used by the lazy update to list the actions to track */
bool isLinkedModifiedSet() const { return modifiedSetHook_.is_linked(); }
* @param cost The cost of the Action
* @param failed If the action is impossible (e.g.: execute something on a switched off host)
*/
- Action(simgrid::surf::Model * model, double cost, bool failed);
+ Action(simgrid::kernel::resource::Model * model, double cost, bool failed);
/**
* @brief Action constructor
* @param failed If the action is impossible (e.g.: execute something on a switched off host)
* @param var The lmm variable associated to this Action if it is part of a LMM component
*/
- Action(simgrid::surf::Model * model, double cost, bool failed, kernel::lmm::Variable* var);
+ Action(simgrid::kernel::resource::Model * model, double cost, bool failed, kernel::lmm::Variable* var);
virtual ~Action();
/**
* @brief Mark that the action is now finished
*
- * @param state the new [state](\ref simgrid::surf::Action::State) of the current Action
+ * @param state the new [state](\ref simgrid::kernel::resource::Action::State) of the current Action
*/
void finish(Action::State state);
- /** @brief Get the [state](\ref simgrid::surf::Action::State) of the current Action */
+ /** @brief Get the [state](\ref simgrid::kernel::resource::Action::State) of the current Action */
Action::State getState() const; /**< get the state*/
- /** @brief Set the [state](\ref simgrid::surf::Action::State) of the current Action */
+ /** @brief Set the [state](\ref simgrid::kernel::resource::Action::State) of the current Action */
virtual void setState(Action::State state);
/** @brief Get the bound of the current Action */
/** @brief Get the state set in which the action is */
ActionList* getStateSet() const { return stateSet_; };
- simgrid::surf::Model* getModel() const { return model_; }
+ simgrid::kernel::resource::Model* getModel() const { return model_; }
protected:
ActionList* stateSet_;
-1; /**< finish time : this is modified during the run and fluctuates until the task is completed */
double cost_;
- simgrid::surf::Model* model_;
+ simgrid::kernel::resource::Model* model_;
void* data_ = nullptr; /**< for your convenience */
/* LMM */
typedef Action::ActionLmmList* ActionLmmListPtr;
} // namespace surf
} // namespace simgrid
+} // namespace simgrid
#endif