Git Product home page Git Product logo

pureedgesim's Introduction

PureEdgeSim

PureEdgeSim: A simulation framework for performance evaluation of cloud, edge and mist computing environments

License: GPL v3 Build Status Codacy Badge Maven Central Codacy Badge

image

Please Cite It As (Kindly do not use the github link):

Mechalikh, C., Taktak, H., & Moussa, F. (2021). PureEdgeSim: A simulation framework for performance evaluation of cloud, edge and mist computing environments. Computer Science and Information Systems, 18(1), 43-66.

Bibtex:

@article{mechalikh2021pureedgesim,
  title={PureEdgeSim: A simulation framework for performance evaluation of cloud, edge and mist computing environments},
  author={Mechalikh, Charafeddine and Taktak, Hajer and Moussa, Faouzi},
  journal={Computer Science and Information Systems},
  volume={18}
  number={1},
  pages={43--66},
  year={2021}
}

Version 5.1 Changelog (October 18th 2022)

"Click to expand"
  • Updated the energy model with the ability to set an initial battery level for generated devices, either programmatically or via the xml file.

  • Now users can extend the simulation manager to change its behavior, and easily integrate it in the simulation.

  • Users can now easily integrate a custom task class.

  • All entities are now notified at the end of the simulation through onSimulationEnd() method.

  • Failure Model: now tasks can fail due to insufficient resources: RAM, STORAGE, CPU Cores.

  • Disabled some unnecessary network links events/loops for better performance.

  • Now tasks can be scheduled in batches instead of being scheduled all at once at the beginning of the simulation (hence, decreasing the number of events and therefore, faster simulations and less memory usage).

  • Removed unnecessary loops when orchestrating tasks (e.g., no need to browse through edge devices when the cloud only architecture is used, etc.)

  • Overall version 5.1 can be 30 times faster and supports up to 8 times the number of tasks compared to previous version 5.0 (see figure below).

  • Improved extensibility: Users can now easily incorporate a custom task class, custom simulation manager, as well as a custom topology creator.

  • Now applications placement decisions are done after each failure (default behavior, can be changed by extending the DefaultSimulationManager and DefaultOrchestrator classes).

  • Reduced duplication and improved code quality.

  • Other fixes..

A comparison of simulation duration between the previous version 5.0 and the latest version 5.1



image

PureEdgeSim is a simulation framework that enables to study Internet of Things on a large scale, as a distributed, dynamic, and highly heterogeneous infrastructure, as well as the applications that run on these things. It features realistic infrastructure models, allowing research on the edge-to-cloud continuum to be conducted. It encompasses all layers of edge computing modeling and simulation. It features a modular design in which each module addresses a particular aspect of the simulation. The Datacenters Manager module, for example, is concerned with the creation of data centers, servers, as well as end devices and their heterogeneity. Their geo-distribution and mobility, however, are handled by the Location Manager module. Similarly, the Network Module is in charge of bandwidth allocation and data transfer.


PureEdgeSim brings together analytical and numerical modeling techniques. The network, for example, is modeled by means of adjustable mathematical equations rather than at a low level. Such abstraction facilitates simulating thousands of edge devices and guarantees the evaluation of the simulation state at any moment. Finally, since PureEdgeSim is a discrete event simulator, the characteristics of the simulated environment, like network traffic and resources’ utilization, will evolve over time, thereby enabling support for online decision-making algorithms, a process that can be accomplished through the Workload Orchestrator module.


Each module provides a default implementation along with a set of adjustable settings to facilitate prototyping and experimentation. Thus, researchers can effortlessly implement their approaches without having to waste time specifying low-level details. Another key feature of PureEdgeSim is its extensibility, as it allows users to create and incorporate their own models without altering its codebase when the default models fail to satisfy their needs. In discrete event simulators, the temporal complexity of the simulation is dependent on the number of events produced at runtime. To reduce simulation duration, PureEdgeSim allows for balancing the precision of the simulation and its duration thanks to a set of dedicated parameters. How precise the simulation will rely on the user’s settings, particularly the update intervals. Thus, the simulation will be more precise and realistic the shorter these intervals are, but it will also last longer. You can read more in the WiKi

.

A simple representation of the simulation scenarios



image

  • The development and maintenance of this project requires a considerable effort. Thus, any form of contribution is encouraged.

  • If you are willing to use the framework to implement your own project on top of it, creating a fork is a bad solution. You are not supposed to modify the code base to implement your project, but extend it by creating some subclasses. Unless you plan to redistribute your changes, you will end up with an incompatible and obsolete version of the framework. The project is constantly evolving and bug fixes are a priority. Your fork with personal changes will miss these updates and high performance improvements.

  • If you just came across this project and want to check it out later, don't forget to add a star ⭐ 😉.



image

PureEdgeSim offers many exclusive features:

  • Realistic modeling of edge computing scenarios (and its related computing paradigms).
    • It supports devices heterogeneity (sensors, mobile devices, battery-powered..).
    • It supports the heterogeneity of their means of communication (WiFi, 5G, 4G, Ethernet..).
    • Realistic modeling of computing infrastructure (modeling computational tasks, infrastructure topology...).
    • Realistic network model (Latency, bandwidth allocation, support for peer to peer communications, routing..).
    • Realistic mobility model.
    • Realistic energy model.
  • The support for online decision making (tasks orchestration, scheduling, etc.).
  • The study of QoS-aware architectures and topologies.
  • Efficiency and Scalability.
    • PureEdgeSim supports the simulation of thousands of devices (even +30000 devices).
    • PureEdgeSim supports scenarios with longer simualtion time (even +24 hours).
  • A wide collection of metrics
    • Delays: execution time, waiting time, network time.
    • CPU utilization.
    • Network utilization: Average bandwidth, total traffic...
    • Energy consumption: The energy consumption of computing nodes (Cloud, edge/fog servers,edge devices), the remaining energy of battery-powered devices, the energy consumption of WAN, MAN, and LAN networks, and the enrgy consumption of WiFi, Cellular (5G, 4G,..) and Ethernet.
    • Task success rate and reason of failure (the rate of tasks failed due to the lack of resources, due to mobility, due to latency, or due to the death of edge devices when they run out of battery).
    • and many others.
  • The visualization of the simulation environement (which helps to debug and understand the course of the simualtion, refer to the figure below).
  • Extensibility: Users can implement their scenarios and integrate their models without modifying PureEdgeSim codebase.
  • Versatiliy and Wide Applicability
  • Ease of use.
  • Reliability.
  • Correctness.

The live visualization of the simulated environement

Efficiency and Scalability

A system is said to be efficient when it can maintain a specified level of proficiency without utilizing an excessive amount of resources, i.e., execution time and memory. Determining the theoretical time complexity of the given simulation is not trivial because the execution time depends entirely on the user scenario (i.e., the devices and tasks count, the mobility model, the types of resources, etc.) and the number of events that occur during the simulation. Furthermore, some parameters strongly influence the number of simulations and, obviously, the number of runs also directly influences the execution time. To demonstrate the scalability of PureEdgeSim, a few experiments were conducted on a single Intel Core i7-8550U.


A 10-minute simulation scenario with 10000 devices (which generated 1131000 tasks) took 58 seconds.

A 24-hour simulation scenario with 200 devices (total of 3221280 generated tasks generated) took 51 seconds.

A 60-minute scenario with 100 devices took only 1 seconds.

Of course, this time is highly dependent on the complexity of the decision making algorithm itself and the number of generated events (as more devices = more tasks = more events), which is why it took longer with 10,000 devices. That said, it is still faster than real-time and outperforms all CloudSim/ CloudSim plus based simulators that either struggle to start due to the large number of devices or run out of memory due to the large number of events generated.

It is therefore easy to conclude that PureEdgeSim meets the “efficiency and scalability” criteria as it allows for simulated experiments involving hundreds if not thousands of devices and tasks and runs considerably faster than in wall-clock time. An important step to reduce the simulation duration and solve its dependency on the number of runs is to implement multi-threading to execute simulation runs in parallel, which is already supported by PureEdgeSim.

image

image

PureEdgeSim support for large-scale scenarios

Simulation Accuracy

As mentioned previously, PureEdgeSim offers the most realistic network, energy, and mobility models as compared to existing solutions. However, since it is a DES, the time complexity of the simulation is dependent on the number of events generated at runtime. To decrease simulation time, PureEdgeSim provides fast and complete control over the simulation environment by its collection of parameters, allowing users to compromise between simulation precision and length. Hence, how accurate the simulation is will be influenced by the user’s settings, particularly the update intervals. The shorter these intervals, the more precise and realistic the simulation, but also the longer it takes.

Versatiliy and Wide Applicability

If we classify edge computing and its related paradigms based on their placement in the IoT architecture, we will have three categories, each with specific properties. For example, paradigms of the perception layer like mist computing rely on resource-constrained devices, that can join or leave the network at any moment.

image image

The computing paradigms supported by PureEdgeSim

Accordingly, the model must be versatile enough to support all kinds of resources and topologies. For this, PureEdgeSim dedicates a configuration file for each layer. The computing nodes, be they mobile devices, servers, or data centers, are all defined in these files. For instance, this figure shows how a smartphone is modeled. As you can see, a set of attributes is also provided to specify the remaining characteristics, such as power consumption rates and mobility.

<?xml version="1.0"?>
<edge_devices>
	<device> <!-- this is a smartphone, for example -->
		<mobility>true</mobility><!-- the device is mobile or fixed --> 
		<connectivity>4g</connectivity><!--the connectivity type 4g, ethernet, Wi-Fi-->
		<speed>1.4</speed><!-- the speed of the device in meters per second : 1.4m/s = 5km/h, 0 = non mobile-->
		<minPauseDuration>100</minPauseDuration><!-- the minimum delay before moving to a new location-->
		<maxPauseDuration>400</maxPauseDuration><!-- the maximum delay before moving to a new location-->
		<minMobilityDuration>60</minMobilityDuration><!-- the minimum delay before stopping-->
		<maxMobilityDuration>100</maxMobilityDuration><!-- the maximum delay before stopping-->
		<battery>true</battery> <!-- relies on battery? -->
		<percentage>30</percentage> <!-- percentage of this device type -->
		<batteryCapacity>18.75</batteryCapacity> <!-- battery capacity in Watt-Hour -->
		<idleConsumption>0.078</idleConsumption><!-- idle energy consumption/ 
			second-->
		<maxConsumption>3.3</maxConsumption><!-- max energy consumption/second, 
			when device cpu is use at 100%-->
		<isOrchestrator>false</isOrchestrator> <!-- whether it orchestrates tasks or not -->
		<canGenerateTasks>true</canGenerateTasks> <!-- whether it generates data/tasks or not -->
		<canProcessTasks>true</canProcessTasks> <!-- whether it can process data/tasks or not -->
		<hosts>
			<host>
				<core>8</core> <!-- Number of CPU cores -->
				<mips>25000</mips> <!-- Processing power in MIPS -->
				<ram>4096</ram> <!-- Ram capacity in MBytes -->
				<storage>128000</storage> <!-- Storage in MBytes -->
				<VMs
					<VM>
						<core>8</core>
						<mips>25000</mips>
						<ram>4096</ram>
						<storage>128000</storage> 
					</VM>
				</VMs>
			</host>
		</hosts>
	</device>
...
</edge_devices>

How a smartphone can be modeled in PureEdgeSim

Ease of Use

Simulators can be used to determine which factors have the greatest impact on performance, by evaluating different configurations, for example, the number of generated entities, the types of resources, the network settings, etc. Dealing with all these parameters programmatically can be challenging. Software is said to be usable if it can be easily comprehended and run by any user. While the usability of PureEdgeSim may be limited by the fact that a lot of specific foundational knowledge is required, from a technical standpoint, it is implemented as a simple application, with only a few steps to follow to run the simulation.The provided Javadoc documentation and simulation examples offer proper guidance to the user, and the console directly informs the user of any type of incorrect input. To save time and effort, each module comes with a default implementation (e.g., the Default Mobility Model, the Default Computing Node class, etc.). These off-the-shelf models also provide a highly customizable environment with a multitude of settings, so users can adjust their behavior without changing their original code. These parameters are preset, which also decreases the complexity of the tool.


Extensibility

Another key feature of PureEdgeSim is its high extensibility. It provides code reusability and ensures adherence to software engineering guidelines and principles for improvements, accuracy, and extensibility. Although it uses its pre-built models by default, users can still create and incorporate their customized ones into their simulation scenarios if any of these default implementations do not meet their needs, all while not changing the PureEdgeSim code base. An example is provided below to show how custom models can be effortlessly integrated to the simulation.


//Create a PureEdgeSim simulation
Simulation sim = new Simulation();

// To use your custom mobility model instead of the default one:
sim.setCustomMobilityModel(YourCustomMobilityModel.class);

// To change the tasks orchestrator:
sim.setCustomEdgeOrchestrator(YourCustomOrchestrator.class);
		
// To change the computing node class:
sim.setCustomComputingNode(YourCustomComputingNode.class);
		
// To change the tasks generator:
sim.setCustomTaskGenerator(YourCustomTaskGenerator.class); 
		
// To change the network model
sim.setCustomNetworkModel(YourCustomNetworkModel.class); 
		
// To change the simulation manager
sim.setCustomSimulationManager(YourCustomSimulationManager.class); 

// To change the topology
sim.setCustomTopologyCreator(YourCustomTopologyCreator.class); 
		
/* to use the default models you can simply delete or comment those lines */

// Finally, you can launch the simulation
sim.launchSimulation();

Correctness

The tool is said to be correct if it fully complies with the stated requirements, which can be verified by checking test cases. To verify PureEdgeSim’s correctness through unit and integration testing, several test cases have been implemented. Nevertheless, this alone does not provide an assessment of which portions of the code were tested and which were not, neither gives a percentage of the overall coverage of tests alongside the project source code. To evaluate the amount of code that the available unit tests cover, code coverage reports were added to the project with the help of the Java Code Coverage Library (JaCoCo). It is important to clarify that the concern of such test cases is the technical feasibility of the scenarios and not the evaluation of the simulation outcome. It is simply a matter of testing whether the given results are logically reasonable and not of actually validating them. To validate the software, a case study was conducted using the simulator. At least 90% of PureEdgeSim code is covered by those tests. This achievement was made possible by testing all the new features and also by the considerable decrease in code duplication since duplicating code brings neglect of testing.

In conclusion, we can say that the proposed simulator performs as intended. Every function has finished without abortions and gave the expected output; All the input files were parsed successfully, and all the personalized models were integrated and verified with the predicted results. The plotting of the simulation results gave a reasonable graphical output. In terms of intended errors, such as incorrect inputs, proper error messages were displayed, and correct information was written into the log file. Moreover, the parameters can be modified, stored, and loaded without any error.

Reliability

Reliability is the ability of a system to operate consistently under specified conditions while meeting all requirements. When it comes to the components of PureEdgeSim, reliability is ensured by extensive exception handling that catches any error occurring at runtime. Consequently, the errors will not cause the execution to stop (unless they are related to critical parameters without which the simulation cannot continue). While testing it, the proposed simulator never froze and satisfied all functional requirements. Furthermore, data reliability is high since the models are read-only and unmodifiable, meaning no data loss is to be feared. The only files that can be modified are the output files and the configuration files, which can be restored easily to the default values. In addition, PureEdgeSim uses two continuous integration services: Travis and AppVeyor, that automate tests and builds execution on Linux and Windows virtual machines, respectively. PureEdgeSim’s users will benefit from such services as any test or build failure will be communicated promptly, thus, ensuring greater reliability.




image

There are several ways to use PureEdgeSim; however, it is strongly advisable to run PureEdgeSim via a Java development environment, like Eclipse IDE. A set of predefined examples is provided under the “/examples“ directory, which should allow anyone to become familiar with PureEdgeSim.

Using an IDE

The simplest and recommended method to run this project is to use an IDE like Eclipse, IntelliJ IDEA, or NetBeans. The required steps to get started with the project are listed below:


  1. Downloading and extracting the project source code archive from the project repository : This can be done using the web browser or the command line git clone https://github.com/CharafeddineMechalikh/PureEdgeSim.git.
  2. Importing the project to the IDE:

  • In NetBeans, simply select the "Open project" option and chose the project directory.

  • In Eclipse or IntelliJ IDEA, the project must be imported by selecting the location where it was extracted or cloned.

  1. The imported project consists of ten packages: the main application package, the above-mentioned modules, and the examples package. The main application and the modules are the simulator source code that normally should not be modified. The examples, however, are where the users can start.

  2. It is necessary to convert the project into a Maven project in order to download all the required libraries.

  3. Once all the necessary libraries are downloaded, users can start with the most basic examples by running any of the classes located in the “examples“ package.

  4. To build a new simulation scenario, the simplest way is to create another class in this package.

Importing PureEdgeSim project (click to zoom)

Adding PureEdgeSim as a Dependency

It is possible to use PureEdgeSim as a dependency in a Maven project, by inserting the dependency below into the pom.xml file:

<dependency>
	<groupId>com.mechalikh</groupId>
	<artifactId>pureedgesim</artifactId>
	<version>5.1.0</version>
</dependency>

Or on Gradle :

dependencies {
 implementation 'com.mechalikh:pureedgesim:5.1.0'
}

Via Command Line

Assuming that git and maven are already installed, PureEdgeSim can be run from the command line as follows:

  1. First, the project source code must be downloaded by cloning the repository via the command git clone https://github.com/CharafeddineMechalikh/PureEdgeSim.git.
  2. Now that the project is cloned, it can be built using Maven by executing the mvn clean install command in the directory where it was cloned.
  3. Now, the examples can be executed on Windows, Linux, or Mac operating systems, using the command mvn exec:java -Dexec.mainClass="package.Class_Name" . For instance, to execute “Example1”, the command is mvn exec:java -Dexec.mainClass="examples.Example1"



image

Here are some works that are based on PureEdgeSim to give an idea about its wider applicability and the possibilities it offers. Feel free to edit the readme file and add yours!

Rienforcement and Deep Learning Scenarios

  1. Mechalikh, C., Taktak, H., & Moussa, F. (2020, April). A fuzzy decision tree based tasks orchestration algorithm for edge computing environments. In International Conference on Advanced Information Networking and Applications (pp. 193-203). Springer, Cham. The algorithm can be found here.

  2. Safavifar, Z., Ghanadbashi, S., & Golpayegani, F. (2021, November). Adaptive Workload Orchestration in Pure Edge Computing: A Reinforcement-Learning Model. In 2021 IEEE 33rd International Conference on Tools with Artificial Intelligence (ICTAI) (pp. 856-860). IEEE.

  3. Neelakantam, G., Onthoni, D. D., & Sahoo, P. K. (2020). Reinforcement learning based passengers assistance system for crowded public transportation in fog enabled smart city. Electronics, 9(9), 1501.

  4. Iftikhar, S., Golec, M., Chowdhury, D., Gill, S. S., & Uhlig, S. (2022). FogDLearner: A Deep Learning-based Cardiac Health Diagnosis Framework using Fog Computing. In Australasian Computer Science Week 2022 (pp. 136-144).

Satellite Edge Computing

  1. Wei, J., Cao, S., Pan, S., Han, J., Yan, L., & Zhang, L. (2020, June). SatEdgeSim: A toolkit for modeling and simulation of performance evaluation in satellite edge computing environments. In 2020 12th International Conference on Communication Software and Networks (ICCSN) (pp. 307-313). IEEE.

  2. Qin, J., Guo, X., Ma, X., Li, X., & Yang, J. (2022). Application and Performance Evaluation of Resource Pool Architecture in Satellite Edge Computing. Aerospace, 9(8), 451.

Data Caching

  1. Mechalikh, C., Taktak, H., & Moussa, F. (2019, July). Towards a scalable and QoS-aware load balancing platform for edge computing environments. In 2019 International Conference on High Performance Computing & Simulation (HPCS) (pp. 684-691). IEEE.

  2. Epifâneo, L., Correia, C., & Rodrigues, L. (2021, November). Cathode: A Consistency-Aware Data Placement Algorithm for the Edge. In 2021 IEEE 20th International Symposium on Network Computing and Applications (NCA) (pp. 1-10). IEEE.

Task Scheduling and Security

  1. Tiburski, R. T. (2021). Task scheduling and security for edge devices in internet of things applications.

Self-Organized Architectures

  1. Mechalikh, C., Taktak, H., & Moussa, F. (2019, June). A scalable and adaptive tasks orchestration platform for IoT. In 2019 15th International Wireless Communications & Mobile Computing Conference (IWCMC) (pp. 1557-1563). IEEE.

  2. Mordacchini, M., Ferrucci, L., Carlini, E., Kavalionak, H., Coppola, M., & Dazzi, P. (2021, September). Self-organizing Energy-Minimization Placement of QoE-Constrained Services at the Edge. In International Conference on the Economics of Grids, Clouds, Systems, and Services (pp. 133-142). Springer, Cham.

Software-Defined Networking

  1. Okwuibe, J., Haavisto, J., Kovacevic, I., Harjula, E., Ahmad, I., Islam, J., & Ylianttila, M. (2021). SDN-Enabled Resource Orchestration for Industrial IoT in Collaborative Edge-Cloud Networks. IEEE Access, 9, 115839-115854.

Latency-Aware Application Placement

  1. Khosroabadi, F., Fotouhi-Ghazvini, F., & Fotouhi, H. (2021). SCATTER: service placement in real-time fog-assisted IoT networks. Journal of Sensor and Actuator Networks, 10(2), 26.

  2. Ferrucci, L., Mordacchini, M., Coppola, M., Carlini, E., Kavalionak, H., & Dazzi, P. (2020, June). Latency preserving self-optimizing placement at the edge. In Proceedings of the 1st Workshop on Flexible Resource and Application Management on the Edge (pp. 3-8).

Energy-Aware Application Placement

  1. Kavalionak, H., Coppola, M., & Dazzi, P. Self-organizing Energy-Minimization Placement of QoE-Constrained Services at the Edge. In Economics of Grids, Clouds, Systems, and Services: 18th International Conference, GECON 2021, Virtual Event, September 21–23, 2021, Proceedings (p. 133). Springer Nature.

  2. Mordacchini, M., Ferrucci, L., Carlini, E., Kavalionak, H., Coppola, M., & Dazzi, P. (2022). Energy and QoE aware Placement of Applications and Data at the Edge.

Other Use Cases

  1. Kaneko, Y., Yokoyama, Y., Monma, N., Terashima, Y., Teramoto, K., Kishimoto, T., & Saito, T. (2020, September). A Microservice-Based Industrial Control System Architecture Using Cloud and MEC. In International Conference on Edge Computing (pp. 18-32). Springer, Cham.

  2. Javaid, H., Saleem, S., Wajid, B., & Khan, U. G. (2021, May). Diagnose a Disease: A Fog Assisted Disease Diagnosis Framework with Bidirectional LSTM. In 2021 International Conference on Digital Futures and Transformative Technologies (ICoDT2) (pp. 1-6). IEEE.



image

This project is licensed under GNU GPLv3.

⬆️

pureedgesim's People

Contributors

birnbaum avatar charafeddinemechalikh avatar hennas avatar manoelcampos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pureedgesim's Issues

Basic questions

Hello,

What are active and idle devices (how are they defined)?

Thanks,
-Sophie

main.java File is not available

hi,

Main .java class is not available in the current version in the package. But it was available in the previous PureEdgeSim version 2.0.0. But when I download this, I couldn't see it in any of the package.

It is showing the mainapplication.java class but not the main.java class.

Also, there are some errors in each package. I have even sent an email. Kindly have a look and please guide me. Thank you

I want to export the workload

I want to export the workload, do time series prediction with MATLAB, and then write the program to the data center to save energy.
Can you export the workload, or get a stable workload data set like the PlanetLab or Google data set in CloudSimPlus?
thank you .

Energy and latency optimization

Is there a method by which I can directly optimize energy and latency for my scenario in the simulator. What are the factors I need to consider and what changes I can make in the current examples to create my own scenario to obtain optimization??

Creating nodes which can communicate with each other

Hi, I am trying to create nodes which can pass each other information whenever needed. Can you describe how to specifically create a node in the simulator and make the communication between them possible. Thanks.

deploy_orchestrator=CLOUD

had an issue with Example 7 when changing deploy_orchestrator=CLUSTER to deploy_orchestrator=CLOUD

"java.lang.ClassNotFoundException: examples.Example1" When run Example1.

Hi,
I'm running the project "Via Command Line". I use mvn clean install and all is well.

But when i enter mvn exec:java -Dexec.mainClass="examples.Example1", I get the error , the whole output follows:

[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.mechalikh:pureedgesim >----------------------
[INFO] Building PureEdgeSim 5.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ pureedgesim ---
[WARNING]
java.lang.ClassNotFoundException: examples.Example1
    at java.net.URLClassLoader.findClass (URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:418)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:351)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:246)
    at java.lang.Thread.run (Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.118 s
[INFO] Finished at: 2022-05-06T22:38:57+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project pureedgesim: An exception occured while executing the Java class. examples.Example1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

How can i solve this problem?

Some steps which may be helpful for beginners - on ECLIPSE (Windows)

First of all many thanks to the developers for this fantastic project!!

Secondly, most of these steps are covered in previous issues and documentation but I just felt that I can summarize some points which may be helpful for the beginners specially on ECLIPSE IDE. I came across some issues at the beginning but eventually it worked well for me.

how to add the Pure edge sim to eclipse

  1. download from github the zip file(for windows).

  2. Unzip the contents

  3. Open eclipse and select new project==>java project

  4. Name the project in the pop up window and uncheck the default location

  5. browse the location where you unzipped the files upto following folder "Pureedgesim-master/pureedgesim/" once inside the pureedgesim folder you will see six subfolders (settings as last sub folder) then click openfolder or selectfolder

  6. add the jar files by downloading from here : https://drive.google.com/drive/folders/1tc3_1UnIYO0AtAXDVf18AHj5g8MdFMNs
    6a. also download one more jar org.jgrapht.core module from here: https://mvnrepository.com/artifact/org.jgrapht/jgrapht-core/1.3.0 start this download by clicking "jar" in front of file type on this page
    6b. add all downloaded jars to lib sub folder under PureEdgeSim folder

  7. to add jar files to project, select configure build path by right clicking your project in package explorer window--> libraries-->click on classpath-->then click add external jars-->browse to 'lib' folder in your PureEdgeSim folder and select all, then click "open" to add.

  8. If the file not found error is encountered then make sure the project folder is also the workspace folder. In that case while executing select "Run configurations"--> go to Arguments menu in the pop up window--> unselect the default workspace option at the bottom-->select workspace folder by browsing to root folder of PureEdgeSim folder {do not include/select PureEdgeSim folder but its root}.

  9. Everything should work now. {try clean project and build project option on eclipse incase some old errors or unnecessary errors are showing}

Unkown Protocol c

Hello, I have been trying to update my PureEdgeSIm version however I keep getting the same error: unknown protocol c; I have tried via gradle, via submodules and even simply cloning the repository but to no avail. Any idea how to overcome this?

image

Unable to run example 5

Hi, I am working on distributed task offloading approach in which some tasks will execute on the
cloud and some will execute on Fog/MEC server. so is it possible in Pureedgesim tool? How can I do this?
I have tried to run example 1 and 5 but unable to do so. Other examples are working fine. But for my work I found example 5 is useful that's why I want to run it badly.

Custom Orchestrator- Unknnown orchestration algorithm 'TRADE_OFF', please check the simulation parameters file...

This is the error occured while running example 5

Thanks

Project Errors/Warnings

After I download the project and the libraries, I still have a couple errors and warnings.
Is there anything I can do to fix them?

Here's a picture showing the errors:
image

Inquery about access to environmental information

Hello, I am doing some work related to deep reinforcement learning, so I want to transfer all device state information, task information, link information to python via socket at every interval, so how do I supervise all information at every interval?

Orchestrator

This whole simulation is mainly based on orchastrator. So can u plz explain what exactly orchastrator is? A device? A software? because I have read whole document but still i didnt understatnd what it actually is. And same for cluster-head also.

Unable to configure Project

Dear Sir,
I have installed PureEdgeSim as per the instruction given . It is showing lot of errors . PLease let me know how to resolve these errors

Troubleshooting Installation of PureEdgeSim: ClassNotFoundException

I tried the following on an intel MacOS and a Windows.

  • JDK Version: 20
  • Apache Maven Version: 3.9.6

I installed git and maven, and followed the CLI steps to install PureEdgeSim.

git clone https://github.com/CharafeddineMechalikh/PureEdgeSim.git -> Done
cd PureEdgeSim (directory of the project)
mvn clean install -> BUILD SUCCESS
mvn exec:java -Dexec.mainClass="examples.Example1" -> BUILD FAILURE

This is the complete message received:


[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.mechalikh:pureedgesim:jar:5.2.0
[WARNING] 'dependencies.dependency.systemPath' for net.sourceforge.jFuzzyLogic:jFuzzyLogic:jar should not point at files within the project directory, ${project.basedir}/PureEdgeSim/libs/jFuzzyLogic_v3.0.jar will be unresolvable by dependent projects @ line 378, column 16
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] ---------------------< com.mechalikh:pureedgesim >----------------------
[INFO] Building PureEdgeSim 5.2.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- exec:3.2.0:java (default-cli) @ pureedgesim ---
[WARNING] 
java.lang.ClassNotFoundException: examples.Example1
    at org.codehaus.mojo.exec.URLClassLoaderBuilder$ExecJavaClassLoader.loadClass (URLClassLoaderBuilder.java:181)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:526)
    at org.codehaus.mojo.exec.ExecJavaMojo.doExec (ExecJavaMojo.java:371)
    at org.codehaus.mojo.exec.ExecJavaMojo.lambda$execute$0 (ExecJavaMojo.java:296)
    at java.lang.Thread.run (Thread.java:1583)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.836 s
[INFO] Finished at: 2024-03-28T16:32:18+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.2.0:java (default-cli) on project pureedgesim: An exception occurred while executing the Java class. examples.Example1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Please let me know if I am doing something wrong throughout this installation. I have also tried to install PureEdgeSim on IntelliJ and Eclipse using the steps provided in the README file, but I am still facing the same errors and I'm unable to resolve the issue.

Not able to run pureEdgesim in Netbean 11

While running MainApplication.java got this exception...

Building PureEdgeSim 2.2.3

--- exec-maven-plugin:1.5.0:exec (default-cli) @ PureEdgeSim ---
java.lang.NoClassDefFoundError: org/cloudbus/cloudsim/datacenters/DatacenterSimple
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.mechalikh.pureedgesim.MainApplication.(MainApplication.java:52)
Caused by: java.lang.ClassNotFoundException: org.cloudbus.cloudsim.datacenters.DatacenterSimple
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 25 more
Exception in thread "main" [ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:764)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:711)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:289)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

BUILD FAILURE

Total time: 3.273 s
Finished at: 2019-11-25T09:17:11+05:30
Final Memory: 8M/245M

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (default-cli) on project PureEdgeSim: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Number of Failed Tasks show Negative

When generating a "Tasks successfully executed result in the case of SimulationParameters is choosen all " it shows the algorithms a negative number of tasks failed. No code is modified in both algorithms.
image
Why is it?

code update to Maven file structure

hi Mechalikh,

thank you for your code. I used to have a running code in the past with a previous version!

I tried to use the latest version of the PureEdgeSim code and update the structure to one preferred by Maven and used the latest Java in Ubuntu 23.04.
(base) mike@mike-HP-ProBook-430-G5:~/.m2$ java --version
openjdk 18.0.2-ea 2022-07-19
OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-2ubuntu1)
OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-2ubuntu1, mixed mode, sharing)

but I get issues.

Is it possible to update the structure to one preferred by Maven compilation and test with latest Java version in Ubuntu/Linux?

my-project/
├── src/
│ ├── main/
│ │ ├── java/ <-- Your Java source code goes here
│ │ │ └── com/
│ │ │ └── mechalikh/
│ │ │ └── pureedgesim/
│ │ │ └── MainApplication.java
│ │ └── resources/ <-- Resources (like properties files) go here
│ │ └── application.properties
│ └── test/
│ ├── java/ <-- Test source code goes here
│ │ └── com/
│ │ └── mechalikh/
│ │ └── pureedgesim/
│ │ └── MainApplicationTest.java
│ └── resources/ <-- Test resources go here
│ └── test-data.json
└── pom.xml <-- Project configuration file

Kind regards,
Mihalis

Run the code in Server

Hi,
Could you provide instructions to compile and run any of the examples/code in server without Eclipse through command line?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.