From: Martin Quinson Date: Thu, 1 Sep 2016 15:49:17 +0000 (+0200) Subject: document another possible way to model the energy X-Git-Tag: v3_14~454^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/49f58c8f33388c6075f0fb48cb29f754f219d516 document another possible way to model the energy --- diff --git a/src/surf/plugins/energy.cpp b/src/surf/plugins/energy.cpp index 1c60ba4233..028b8af65b 100644 --- a/src/surf/plugins/energy.cpp +++ b/src/surf/plugins/energy.cpp @@ -77,8 +77,15 @@ void HostEnergy::update() else cpu_load = lmm_constraint_get_usage(surf_host->cpu_->getConstraint()) / surf_host->cpu_->speed_.peak; - if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not mores + if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not more cpu_load = 1; + /* The problem with this model is that the load is always 0 or 1, never something less. + * Another possibility could be to model the total energy as + * + * X/(X+Y)*W_idle + Y/(X+Y)*W_burn + * + * where X is the amount of ideling cores, and Y the amount of computing cores. + */ double previous_energy = this->total_energy;