cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/allocationpolicies/power/PowerVmAllocationPolicyMigrationAbstract.java
protected void addHistoryEntryIfAbsent(PowerHost host, double metric) {
        timeHistory.putIfAbsent(host, new LinkedList<>());
        utilizationHistory.putIfAbsent(host, new LinkedList<>());
        metricHistory.putIfAbsent(host, new LinkedList<>());

        final Simulation simulation = host.getSimulation();
        if (!timeHistory.get(host).contains(simulation.clock())) {
            timeHistory.get(host).add(simulation.clock());
            utilizationHistory.get(host).add(host.getUtilizationOfCpu());
            metricHistory.get(host).add(metric);
        }
    }
/**
     * Adds an entry for each history map of a host if it doesn't contain
     * an entry for the current simulation time.
     *
     * @param host the host to add metric history entries
     * @param metric the metric to be added to the metric history map
     */
Adds an entry for each history map of a host if it doesn't contain
an entry for the current simulation time.

@param host the host to add metric history entries
@param metric the metric to be added to the metric history map
Adds an entry for each history map of a host if it doesn ' t contain an entry for the current simulation time . @param host the host to add metric history entries @param metric the metric to be added to the metric history map
protected void addHistoryEntryIfAbsent(PowerHost host, double metric) {
        timeHistory.putIfAbsent(host, new LinkedList<>());
        utilizationHistory.putIfAbsent(host, new LinkedList<>());
        metricHistory.putIfAbsent(host, new LinkedList<>());
        final Simulation simulation = host.getSimulation();
        if (!timeHistory.get(host).contains(simulation.clock())) {
            timeHistory.get(host).add(simulation.clock());
            utilizationHistory.get(host).add(host.getUtilizationOfCpu());
            metricHistory.get(host).add(metric);
        }
    }
protected void addHistoryEntryIfAbsent ( PowerHost host , double metric ) { timeHistory . putIfAbsent ( host , new LinkedList < > ( ) ) ; utilizationHistory . putIfAbsent ( host , new LinkedList < > ( ) ) ; metricHistory . putIfAbsent ( host , new LinkedList < > ( ) ) ; final Simulation simulation = host . getSimulation ( ) ; if ( ! timeHistory . get ( host ) . contains ( simulation . clock ( ) ) ) { timeHistory . get ( host ) . add ( simulation . clock ( ) ) ; utilizationHistory . get ( host ) . add ( host . getUtilizationOfCpu ( ) ) ; metricHistory . get ( host ) . add ( metric ) ; } }
Adds an entry for each history map of a host if it doesn't contain
 an entry for the current simulation time.
Adds an entry for each history map of a host if it doesn ' t contain an entry for the current simulation time .