cloudsimplus / cloudsimplus

State-of-the-art Framework 🏗 for Cloud Computing ⛅️ Simulation: a modern, full-featured, easier-to-use, highly extensible 🧩, faster 🚀 and more accurate ☕️ Java 17+ tool for cloud computing research 🎓. Examples: https://github.com/cloudsimplus/cloudsimplus-examples

Home Page:https://cloudsimplus.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable simulation to keep running for a specific period of time

manoelcampos opened this issue · comments

CloudSim Plus simulations are automatically finished when there is no more event to process.
However, sometimes we need to keep simulation running for a specific period of time, in order to wait for the dynamic arrival of events, such as the creation of Cloudlets and VMs in runtime.

Even though there is a terminateAt(double time) method to specify when the simulation should be finished, if the framework detects there is no more event to process, the simulation is finished anyway.

Detailed information about how the feature should work

The CloudSim class should be updated to enable setting a termination time using the mentioned method and keep the simulation running even if there is no event to process. In this case, it just keeps waiting for new events or for the termination time to be reached in order to terminate the simulation.

An example scenario where this feature should be used

We can create simulations that keep running for a defined time, enabling the dynamic creation of new objects such as Cloudlets and VMs, even after all Cloudlets in the entire simulation have finished. Using such a feature we can, for instance, create an application to simulate a cloud scenario running for 24 hours. Before this feature, the only way to accomplish that was to avoid the simulation to be idle. With this feature, the simulation may become idle anytime, and yet keep running until the termination time is reached.

A brief explanation of why you think this feature is useful

The feature will allow the creation of more realistic scenarios, mainly when the arrival of Cloudlets and VMs are defined randomly. In such a case, the developer doesn't know the arrival time of objects. Therefore, the only way to wait for such events is enabling the simulation to keep running even if it's idle.

Examples Included