-/* Copyright (c) 2004-2014. The SimGrid Team.
+/* Copyright (c) 2004-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
extern double sg_bandwidth_factor;
extern double sg_weight_S_parameter;
extern int sg_network_crosstraffic;
-#ifdef HAVE_GTNETS
-extern double sg_gtnets_jitter;
-extern int sg_gtnets_jitter_seed;
-#endif
extern xbt_dynar_t surf_path;
extern "C" {
*/
XBT_PUBLIC_CLASS Model {
public:
- /**
- * @brief Model constructor
- *
- * @param name the name of the model
- */
- Model(const char *name);
-
- /**
- * @brief Model destructor
- */
+ /** @brief Constructor */
+ Model();
+ /** @brief Destructor */
virtual ~Model();
virtual void addTraces() =0;
- /**
- * @brief Get the name of the current Model
- *
- * @return The name of the current Model
- */
- const char *getName() {return p_name;}
-
/**
* @brief Get the set of [actions](@ref Action) in *ready* state
*
virtual void updateActionsStateLazy(double now, double delta);
virtual void updateActionsStateFull(double now, double delta);
+ /** @brief Returns whether this model have an idempotent shareResource()
+ *
+ * The only model that is not is NS3: computing the next timestamp moves the model up to that point,
+ * so we need to call it only when the next timestamp of other sources is computed.
+ */
+ virtual bool shareResourcesIsIdempotent()=0;
+
protected:
ActionLmmListPtr p_modifiedSet;
lmm_system_t p_maxminSystem;
xbt_heap_t p_actionHeap;
private:
- const char *p_name;
-
ActionListPtr p_readyActionSet; /**< Actions in state SURF_ACTION_READY */
ActionListPtr p_runningActionSet; /**< Actions in state SURF_ACTION_RUNNING */
ActionListPtr p_failedActionSet; /**< Actions in state SURF_ACTION_FAILED */
/** @brief Set the priority of the current Action */
virtual void setPriority(double priority);
- /**
- * @brief Get the state set in which the action is
- *
- * @return The state set in which the action is
- */
+ /** @brief Get the state set in which the action is */
ActionListPtr getStateSet() {return p_stateSet;};
s_xbt_swag_hookup_t p_stateHookup;
double m_finish; /**< finish time : this is modified during the run and fluctuates until the task is completed */
private:
- bool m_failed;
double m_start; /**< start time */
char *p_category; /**< tracing category for categorized resource utilization monitoring */