Skip to content

Commit

Permalink
Updates Example1 and README
Browse files Browse the repository at this point in the history
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
  • Loading branch information
manoelcampos committed Mar 16, 2023
1 parent 71ca8a6 commit cb89e07
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 1. Introduction

**CloudSim Plus Automation** is a Java 17+ command line tool based on [CloudSim Plus](http://cloudsimplus.org)
**CloudSim Plus Automation** is a Java 17+ command line tool based on [CloudSim Plus](https://cloudsimplus.org)
(and some [CloudReports](https://github.com/thiagotts/CloudReports) classes)
which is able to read specifications of CloudSim Plus simulation scenarios from a YAML file,
a very human-readable data format.
Expand Down Expand Up @@ -73,7 +73,7 @@ This work contributes to:
- avoid programming on the creation of CloudSim Plus simulation environments;
- reduce learning curve on creation of CloudSim Plus simulation scenarios;
- facilitate and automate CloudSim Plus simulation environments creation;
- use a human readable file format to specify cloud simulation scenarios and speed up such a simulation process phase;
- use a human-readable file format to specify cloud simulation scenarios and speed up such a simulation process phase;
- allow reuse, extension and sharing of simulations scenarios.
## 2. Requirements
Expand All @@ -87,11 +87,11 @@ mvn clean install

## 3. Using the command line tool

You can simply download the [jar file from the latest release](https://github.com/manoelcampos/cloudsim-plus-automation/releases/latest) and run it in a terminal
You can simply download the [jar file from the latest release](https://github.com/cloudsimplus/cloudsimplus-automation/releases/latest) and run it in a terminal
by issuing the following command (check the correct version number of the jar file):

```bash
java -jar cloudsim-plus-automation-7.1.0-with-dependencies.jar PathToSimulationScenario.yml
java -jar cloudsimplus-automation-8.0.0-with-dependencies.jar PathToSimulationScenario.yml
```

Execute the tool without any parameter to see the usage help.
Expand All @@ -105,7 +105,7 @@ Just add CloudSim Plus Automation as a Maven dependency into your own project an
```xml
<dependency>
<groupId>org.cloudsimplus</groupId>
<artifactId>cloudsim-plus-automation</artifactId>
<artifactId>cloudsimplus-automation</artifactId>
<!-- Set a specific version or use the latest one -->
<version>LATEST</version>
</dependency>
Expand All @@ -117,28 +117,28 @@ The complete example project is available [here](example).
```java
try {
//Loads a YAML file containing 1 or more simulation scenarios.
final YamlCloudScenarioReader reader = new YamlCloudScenarioReader("PATH TO YOUR YAML FILE");
final var reader = new YamlCloudScenarioReader("PATH TO YOUR YAML FILE");
//Gets the list or parsed scenarios.
final List<YamlCloudScenario> simulationScenarios = reader.getScenarios();
final var yamlCloudScenariosList = reader.getScenarios();
//For each existing scenario, creates and runs it in CloudSim Plus, printing results.
for (YamlCloudScenario scenario : simulationScenarios) {
for (YamlCloudScenario scenario : yamlCloudScenariosList) {
new CloudSimulation(scenario).run();
}
} catch (FileNotFoundException | YamlException e) {
System.err.println("Error when trying to load the simulation scenario from the YAML file: "+e.getMessage());
System.err.println("Error loading the simulation scenario from the YAML file: "+e.getMessage());
}
```

## 5. Published Paper

For more information, read the paper published on the [Springer Lecture Notes in Computer Science Volume 8662](http://doi.org/10.1007/978-3-319-11167-4_34). Realize the paper is related to an older version of the tool, which is compatible with CloudSim 3.
For more information, read the paper published on the [Springer Lecture Notes in Computer Science Volume 8662](https://doi.org/10.1007/978-3-319-11167-4_34). Realize the paper is related to an older version of the tool, which is compatible with CloudSim 3.
The YAML structure has changed since there too, making it simpler and matching the name of entries with CloudSim and CloudSim Plus classes (such as VmAllocationPolicy, VmScheduler, CloudletScheduler). See the last section for more information.

**If you are using this work for publishing a paper, please cite our paper above.**

## 6. Notice

If you are looking for the **CloudSim Automation**,
which is the version compatible with [CloudSim 4](http://github.com/Cloudslab/cloudsim),
it is available at [cloudsim-version](https://github.com/manoelcampos/cloudsim-plus-automation/tree/cloudsim-version) branch.
which is the version compatible with [CloudSim 4](https://github.com/Cloudslab/cloudsim),
it is available at [cloudsim-version](https://github.com/cloudsimplus/cloudsimplus-automation/tree/cloudsim-version) branch.
However, that version is not supported anymore.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.cloudsimplus.util.ResourceLoader;

import java.io.FileNotFoundException;
import java.util.List;

/**
* Starts the example, parsing a YAML file containing
Expand All @@ -27,13 +26,13 @@ private Example1(){
//Loads the YAML file containing 1 or more simulation scenarios.
final var reader = new YamlCloudScenarioReader(yamlFilePath);
//Gets the list or parsed scenarios.
final List<YamlCloudScenario> simulationScenarios = reader.getScenarios();
final var yamlCloudScenariosList = reader.getScenarios();
//For each existing scenario, creates and runs it in CloudSim Plus, printing results.
for (YamlCloudScenario scenario : simulationScenarios) {
for (YamlCloudScenario scenario : yamlCloudScenariosList) {
new CloudSimulation(scenario).run();
}
} catch (FileNotFoundException | YamlException e) {
System.err.println("Error when trying to load the simulation scenario from the YAML file: "+e.getMessage());
System.err.println("Error loading the simulation scenario from the YAML file: "+e.getMessage());
}
}

Expand Down

0 comments on commit cb89e07

Please sign in to comment.