virtual ~Model();
/** @brief Get the set of [actions](@ref Action) in *ready* state */
- ActionList* getReadyActionSet() const { return readyActionSet_; }
+ Action::StateSet* get_ready_action_set() const { return ready_action_set_; }
/** @brief Get the set of [actions](@ref Action) in *running* state */
- ActionList* getRunningActionSet() const { return runningActionSet_; }
+ Action::StateSet* get_running_action_set() const { return running_action_set_; }
/** @brief Get the set of [actions](@ref Action) in *failed* state */
- ActionList* getFailedActionSet() const { return failedActionSet_; }
+ Action::StateSet* get_failed_action_set() const { return failed_action_set_; }
/** @brief Get the set of [actions](@ref Action) in *done* state */
- ActionList* getDoneActionSet() const { return doneActionSet_; }
+ Action::StateSet* get_done_action_set() const { return done_action_set_; }
/** @brief Get the set of modified [actions](@ref Action) */
- ActionLmmListPtr getModifiedSet() const;
+ Action::ModifiedSet* get_modified_set() const;
/** @brief Get the maxmin system of the current Model */
- lmm_system_t getMaxminSystem() const { return maxminSystem_; }
+ lmm::System* get_maxmin_system() const { return maxmin_system_; }
/**
* @brief Get the update mechanism of the current Model
* @see e_UM_t
*/
- e_UM_t getUpdateMechanism() const { return updateMechanism_; }
- void setUpdateMechanism(e_UM_t mechanism) { updateMechanism_ = mechanism; }
+ e_UM_t getUpdateMechanism() const { return update_mechanism_; }
+ void setUpdateMechanism(e_UM_t mechanism) { update_mechanism_ = mechanism; }
/** @brief Get Action heap */
- heap_type& getActionHeap() { return actionHeap_; }
+ heap_type& getActionHeap() { return action_heap_; }
- double actionHeapTopDate() const { return actionHeap_.top().first; }
+ double actionHeapTopDate() const { return action_heap_.top().first; }
Action* actionHeapPop();
- bool actionHeapIsEmpty() const { return actionHeap_.empty(); }
+ bool actionHeapIsEmpty() const { return action_heap_.empty(); }
/**
* @brief Share the resources between the actions
* @param now The current time of the simulation
* @return The delta of time till the next action will finish
*/
- virtual double nextOccuringEvent(double now);
- virtual double nextOccuringEventLazy(double now);
- virtual double nextOccuringEventFull(double now);
+ virtual double next_occuring_event(double now);
+ virtual double next_occuring_event_lazy(double now);
+ virtual double next_occuring_event_full(double now);
/**
* @brief Update action to the current time
* @param now The current time of the simulation
* @param delta The delta of time since the last update
*/
- virtual void updateActionsState(double now, double delta);
- virtual void updateActionsStateLazy(double now, double delta);
- virtual void updateActionsStateFull(double now, double delta);
+ virtual void update_actions_state(double now, double delta);
+ virtual void update_actions_state_lazy(double now, double delta);
+ virtual void update_actions_state_full(double now, double delta);
/** @brief Returns whether this model have an idempotent shareResource()
*
virtual bool nextOccuringEventIsIdempotent() { return true; }
protected:
- lmm_system_t maxminSystem_ = nullptr;
+ lmm::System* maxmin_system_ = nullptr;
private:
- e_UM_t updateMechanism_ = UM_UNDEFINED;
- ActionList* readyActionSet_ = new ActionList(); /**< Actions in state SURF_ACTION_READY */
- ActionList* runningActionSet_ = new ActionList(); /**< Actions in state SURF_ACTION_RUNNING */
- ActionList* failedActionSet_ = new ActionList(); /**< Actions in state SURF_ACTION_FAILED */
- ActionList* doneActionSet_ = new ActionList(); /**< Actions in state SURF_ACTION_DONE */
- heap_type actionHeap_;
+ e_UM_t update_mechanism_ = UM_UNDEFINED;
+ Action::StateSet* ready_action_set_ = new Action::StateSet(); /**< Actions in state SURF_ACTION_READY */
+ Action::StateSet* running_action_set_ = new Action::StateSet(); /**< Actions in state SURF_ACTION_RUNNING */
+ Action::StateSet* failed_action_set_ = new Action::StateSet(); /**< Actions in state SURF_ACTION_FAILED */
+ Action::StateSet* done_action_set_ = new Action::StateSet(); /**< Actions in state SURF_ACTION_DONE */
+ heap_type action_heap_;
};
} // namespace resource