- NetworkIBLink(NetworkModelPtr model, const char *name, xbt_dict_t props);
- NetworkIBLink(NetworkModelPtr model, const char *name, xbt_dict_t props,
- lmm_constraint_t constraint,
- tmgr_history_t history,
- tmgr_trace_t state_trace);
- ~NetworkIBLink();
- virtual void updateLatency(double value, double date=surf_get_clock());
- virtual void updateBandwidth(double value, double date=surf_get_clock());
+ int id;
+ // store related links, to ease computation of the penalties
+ std::vector<ActiveComm*> ActiveCommsUp;
+ // store the number of comms received from each node
+ std::map<IBNode*, int> ActiveCommsDown;
+ // number of comms the node is receiving
+ int nbActiveCommsDown;
+ explicit IBNode(int id) : id(id), nbActiveCommsDown(0){};
+ virtual ~IBNode() = default;
+};
+
+class XBT_PRIVATE NetworkIBModel : public NetworkSmpiModel {
+ double Bs;
+ double Be;
+ double ys;
+ void updateIBfactors_rec(IBNode* root, std::vector<bool>& updatedlist);
+ void computeIBfactors(IBNode* root);
+
+public:
+ NetworkIBModel();
+ explicit NetworkIBModel(const char* name);
+ NetworkIBModel(const NetworkIBModel&) = delete;
+ NetworkIBModel& operator=(const NetworkIBModel&) = delete;
+ void updateIBfactors(NetworkAction* action, IBNode* from, IBNode* to, int remove);