+ user_bound_ = bound;
+ update_action_weight();
+}
+
+void VirtualMachineImpl::update_action_weight(){
+ /* The impact of the VM over its PM is the min between its vCPU amount and the amount of tasks it contains */
+ int impact = std::min(active_tasks_, get_core_amount());
+
+ XBT_DEBUG("set the weight of the dummy CPU action of VM%p on PM to %d (#tasks: %d)", this, impact, active_tasks_);
+
+ if (impact > 0)
+ action_->set_priority(1. / impact);
+ else
+ action_->set_priority(0.);
+
+ action_->set_bound(std::min(impact * physical_host_->get_speed(), user_bound_));