major modifications for v2.0 release

Release notes

1- Cloud server processing was simplified in the initial version, it is handled via cloudsim components now.

2- Cloud server manager, edge server manager, mobile device manager and vm allocation policy are used as abstract class in factory pattern to allow developers to use different business logic without modifying EdgeCloudSim source code.

3- The task and place types are no longer defined as enumeration. They are used as integer value in order to manipulate more place type without modifying enum variable.

4- Two sample applications (one of them is simple and the other one extended application) are added along with the corresponding matlab files to plot statistics.

5- Cloud server properties are added to the simulation settings file

6- New log items are added to simulation result files

7- Code refactoring is applied including the modification of comments
This commit is contained in:
Cagatay Sonmez
2018-09-10 14:22:27 +03:00
parent e01833bda6
commit d4545f009f
89 changed files with 10699 additions and 4689 deletions

View File

@ -0,0 +1,50 @@
/*
* Title: EdgeCloudSim - CloudVM
*
* Description:
* CloudVM adds vm type information over CloudSim's VM class
*
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
*/
package edu.boun.edgecloudsim.cloud_server;
import java.util.ArrayList;
import java.util.List;
import org.cloudbus.cloudsim.CloudletScheduler;
import org.cloudbus.cloudsim.Vm;
import edu.boun.edgecloudsim.core.SimSettings;
public class CloudVM extends Vm {
private SimSettings.VM_TYPES type;
public CloudVM(int id, int userId, double mips, int numberOfPes, int ram,
long bw, long size, String vmm, CloudletScheduler cloudletScheduler) {
super(id, userId, mips, numberOfPes, ram, bw, size, vmm, cloudletScheduler);
type = SimSettings.VM_TYPES.CLOUD_VM;
}
public SimSettings.VM_TYPES getVmType(){
return type;
}
/**
* dynamically reconfigures the mips value of a VM in CloudSim
*
* @param mips new mips value for this VM.
*/
public void reconfigureMips(double mips){
super.setMips(mips);
super.getHost().getVmScheduler().deallocatePesForVm(this);
List<Double> mipsShareAllocated = new ArrayList<Double>();
for(int i= 0; i<getNumberOfPes(); i++)
mipsShareAllocated.add(mips);
super.getHost().getVmScheduler().allocatePesForVm(this, mipsShareAllocated);
}
}