@Override    
      public boolean allocateHostForVm(Vm vm)
        {
            double minMetric = -1;
            PowerHost ChoosenHost = null;
            //Log.formatLine("In ChooseHostForNewVm function...");
                for (PowerHost host : this.<PowerHost> getHostList()) {
                    
                    double tmpMetric = MetricWattPerMips(host); 
             //       Log.printLine("MetricHost value for HOST #" + host.getId() + " = " + tmpMetric);
                     if(minMetric != -1 && tmpMetric < minMetric) 
                     {
                            minMetric = tmpMetric;
                            ChoosenHost = host;
//                            Log.printLine("Temp CHOSEN HOST is : Host #" + ChosenHost.getId());
                     }
                     else if(minMetric == -1)
                     {
                         minMetric = tmpMetric;
                         ChoosenHost = host;                        
                     }
                }
             
                Log.printLine("CHOSEN HOST for VM " + vm.getId()+ " is : Host #" + ChoosenHost.getId());
                boolean allocationOK = false;
                allocationOK = allocateHostForVm(vm,ChoosenHost);
                
                if(allocationOK)
                    return true;
                if(!allocationOK && ChoosenHost.isEnableDVFS() )               
                {
                    Log.printLine("Not enough free MIPS in the choosen HOST !");
                    Log.printLine("Trying to decrease VMs size in this HOST!");
                    ChoosenHost = TryDVFSEnableHost(ChoosenHost,vm);
                    if( allocateHostForVm(vm,ChoosenHost))
                    {
                        Log.printLine("VMs size decreased successfully !");
                        return true;
                    }
                    else
                        Log.printLine("Error , VMs size not enough decreased successfully !");
                }
                                      
                return false;
        }