Files
edgecloudsim/src/edu/boun/edgecloudsim/mobility/MobilityModel.java
Cagatay Sonmez 08341c3681 some minor backward compatible, major backward incompatible changes and code formatting (beautification)
Minor Modifications:

* Indentation issues are fixed
* Typo errors in source code and comments are fixed
* Misspelled parameters in plotTaskFailureReason.m are corrected
* sim_results folder is added to .gitignore file

Backward compatible changes

* The exit code of the application when there is an error is changed from 0 to 1
* Default constructors are added for Location.java, LoadGeneratorModel.java, MobilityModel.java, EdgeOrchestrator.java (this change request coming from a developer)
* public TaskProperty(int mobileDeviceId, double startTime, ExponentialDistribution[] expRngList) is added to TaskProperty.java  (this change request coming from a developer to create a task without task type)
* double getCreationTime() function is added to Task.java
* void reconfigureMips(double mips) function is added to EdgeVM (for future usage)
* gsm_propagation_delay variable is added to config file. SimSettings class is also modified accordingly. You can use it if you have cellular network access in your scenario.
* wlan_range, northern_bound, southern_bound, eastern_bound, western_bound variables are added to config file; and relevant functions are added to SimSettings class. (this change request coming from a developer)

Backward incompatible changes!

 * location_check_interval variable name is changed to location_check_interval in config.properties file. Please update your config files accordingly (remove 'vm_' part)

 * Major modifications are applied in SimLogger class to decrease time complexity. Now the basic results are kept in the memory and saved to the files at the end of the simulation. As a result of this change, the signature of the SimLogger.addLog () function had to be changed. You must add the mobile device id as the first argument. Please update your MobileDeviceManager class accordingly (add task.getCloudletId () as the first argument).
2020-10-30 11:06:09 +03:00

43 lines
1.2 KiB
Java

/*
* Title: EdgeCloudSim - Mobility Model
*
* Description:
* MobilityModel is an abstract class which is used for calculating the
* location of each mobile devices with respect to the time. For those who
* wants to add a custom Mobility Model to EdgeCloudSim should extend
* this class and provide a concrete instance via ScenarioFactory
*
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
*/
package edu.boun.edgecloudsim.mobility;
import edu.boun.edgecloudsim.utils.Location;
public abstract class MobilityModel {
protected int numberOfMobileDevices;
protected double simulationTime;
public MobilityModel(int _numberOfMobileDevices, double _simulationTime){
numberOfMobileDevices=_numberOfMobileDevices;
simulationTime=_simulationTime;
};
/*
* Default Constructor: Creates an empty MobilityModel
*/
public MobilityModel() {
}
/*
* calculate location of the devices according to related mobility model
*/
public abstract void initialize();
/*
* returns location of a device at a certain time
*/
public abstract Location getLocation(int deviceId, double time);
}