-protected:
- struct Metric {
- double peak; /**< The peak of the metric, ie its max value */
- double scale; /**< Current availability of the metric according to the traces, in [0,1] */
- tmgr_trace_event_t event; /**< The associated trace event associated to the metric */
- };
+ Model* get_model() const { return model_; }
+
+ AnyResource* set_constraint(lmm::Constraint* constraint)
+ {
+ constraint_ = constraint;
+ return static_cast<AnyResource*>(this);
+ }
+
+ lmm::Constraint* get_constraint() const { return constraint_; }
+
+ /** @brief returns the current load due to activities (in flops per second, byte per second or similar)
+ *
+ * The load due to external usages modeled by profile files is ignored.*/
+ virtual double get_load() const { return constraint_->get_usage(); }
+
+ bool is_used() const override { return model_->get_maxmin_system()->constraint_used(constraint_); }