cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/datacenters/DatacenterSimple.java
protected void processVmDestroy(final SimEvent ev, final boolean ack) {
        Vm vm = (Vm) ev.getData();
        final int cloudlets = vm.getCloudletScheduler().getCloudletList().size();
        vmAllocationPolicy.deallocateHostForVm(vm);

        if (ack) {
            sendNow(vm.getBroker().getId(), CloudSimTags.VM_DESTROY_ACK, vm);
        }

        final String msg = cloudlets > 0 ?
            String.format("It had a total of %d cloudlets (running + waiting).", cloudlets) :
            "It had no running or waiting cloudlets.";
        Log.printFormatted("%.2f: %s: %s destroyed on %s. %s\n",
                getSimulation().clock(), getClass().getSimpleName(), vm, vm.getHost(), msg);
    }
/**
     * Process the event sent by a Broker, requesting the destruction of a given VM
     * created in this Datacenter. This Datacenter may send, upon
     * request, the status back to the Broker.
     *
     * @param ev information about the event just happened
     * @param ack indicates if the event's sender expects to receive an
     * acknowledge message when the event finishes to be processed
     *
     * @pre ev != null
     * @post $none
     */
Process the event sent by a Broker, requesting the destruction of a given VM
created in this Datacenter. This Datacenter may send, upon
request, the status back to the Broker.

@param ev information about the event just happened
@param ack indicates if the event's sender expects to receive an
acknowledge message when the event finishes to be processed

@pre ev != null
@post $none
Process the event sent by a Broker requesting the destruction of a given VM created in this Datacenter . This Datacenter may send upon request the status back to the Broker . @param ev information about the event just happened @param ack indicates if the event ' s sender expects to receive an acknowledge message when the event finishes to be processed @pre ev ! = null @post $none
protected void processVmDestroy(final SimEvent ev, final boolean ack) {
        Vm vm = (Vm) ev.getData();
        final int cloudlets = vm.getCloudletScheduler().getCloudletList().size();
        vmAllocationPolicy.deallocateHostForVm(vm);
        if (ack) {
            sendNow(vm.getBroker().getId(), CloudSimTags.VM_DESTROY_ACK, vm);
        }
        final String msg = cloudlets > 0 ?
            String.format("It had a total of %d cloudlets (running + waiting).", cloudlets) :
            "It had no running or waiting cloudlets.";
        Log.printFormatted("%.2f: %s: %s destroyed on %s. %s\n",
                getSimulation().clock(), getClass().getSimpleName(), vm, vm.getHost(), msg);
    }
protected void processVmDestroy ( final SimEvent ev , final boolean ack ) { Vm vm = ( Vm ) ev . getData ( ) ; final int cloudlets = vm . getCloudletScheduler ( ) . getCloudletList ( ) . size ( ) ; vmAllocationPolicy . deallocateHostForVm ( vm ) ; if ( ack ) { sendNow ( vm . getBroker ( ) . getId ( ) , CloudSimTags . VM_DESTROY_ACK , vm ) ; } final String msg = cloudlets > 0 ? String . format ( "It had a total of %d cloudlets (running + waiting)." , cloudlets ) : "It had no running or waiting cloudlets." ; Log . printFormatted ( "%.2f: %s: %s destroyed on %s. %s\n" , getSimulation ( ) . clock ( ) , getClass ( ) . getSimpleName ( ) , vm , vm . getHost ( ) , msg ) ; }
Process the event sent by a Broker, requesting the destruction of a given VM
 created in this Datacenter.
Process the event sent by a Broker requesting the destruction of a given VM created in this Datacenter .