return result;
}
-int Constraint::get_variable_amount() const
-{
- return static_cast<int>(std::count_if(std::begin(enabled_element_set_), std::end(enabled_element_set_),
- [](const Element& elem) { return elem.consumption_weight > 0; }));
-}
-
void Constraint::set_sharing_policy(SharingPolicy policy, const s4u::NonLinearResourceCb& cb)
{
xbt_assert(policy == SharingPolicy::NONLINEAR || not cb,
} // namespace lmm
} // namespace kernel
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid
/** @brief Get the usage of the constraint after the last lmm solve */
double get_usage() const;
- int get_variable_amount() const;
/** @brief Sets the concurrency limit for this constraint */
void set_concurrency_limit(int limit)
switch (transition->type_) {
case Transition::Type::COMM_SEND:
- get_comm_pattern(transition);
- break;
case Transition::Type::COMM_RECV:
get_comm_pattern(transition);
break;
auto& action = static_cast<NetworkCm02Action&>(*it);
++it; // increment iterator here since the following calls to action.finish() may invalidate it
XBT_DEBUG("Something happened to action %p", &action);
- double deltap = delta;
if (action.latency_ > 0) {
- if (action.latency_ > deltap) {
- double_update(&action.latency_, deltap, sg_surf_precision);
- deltap = 0.0;
+ if (action.latency_ > delta) {
+ double_update(&action.latency_, delta, sg_surf_precision);
} else {
- double_update(&deltap, action.latency_, sg_surf_precision);
action.latency_ = 0.0;
}
if (action.latency_ <= 0.0 && not action.is_suspended())