Skip to content

Implementing a synchronous simulation #205

@pkoperek

Description

@pkoperek

Hi!

First of all - I find Cloud Sim Plus very useful - thanks for the great work you're doing!
I plan to use it in a new project and was wondering if the scenario I'm considering could be implemented with use of APIs which the library already exposes, or there would have to be some extensions done.

Detailed information about how the feature should work

I would like to use Cloud Sim Plus environment in a "synchronous" way:

  • be able to run it for a quant of time (e.g. a second or a minute - in terms of simulated time, not the wall-clock time)
  • check some metrics afterwards
  • potentially execute some action (e.g. schedule more cloudlets or schedule removing of a VM)

Is that currently possible? If not, where is the best place to start implementing this?

An example scenario where this feature should be used

Using the simulation as an environment for Reinforcement Learning agents where they can observe and interact with simulated cloud resources.

A brief explanation of why you think this feature is useful

I'm doing some research in this area - such mode of execution would be super useful to me.

How to use this feature

This feature basically enables you to run your simulation inside a loop and collect any data you want after each step, as shown in the code snippet below:

//realize it uses startSync() instead of start()
simulation.startSync(); 
while(simulation.isRunning()){
    simulation.runFor(INTERVAL);
    collectAndPrintSomeDataSuchAsResourceUtilization();
}

The SynchronousSimulationExample1 provides a complete example.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions