Skip to content

Commit 7c09940

Browse files
committed
Shows the number of simulated annealead CloudletToVmMappingSolution created
- Introduces CloudletToVmMappingSimulatedAnnealing.solutions static attribute to be incremented at every solution created. - Changes CloudletToVmMappingSolution constructors to accept an id param to identify the number of solution being created - Update DatacenterBrokerHeuristicExample to show the number of created solutions Signed-off-by: Manoel Campos <[email protected]>
1 parent d7d64f7 commit 7c09940

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/cloudsimplus/examples/brokers/DatacenterBrokerHeuristicExample.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ private void print(final DatacenterBrokerHeuristic broker0) {
168168
"Heuristic solution for mapping cloudlets to Vm's ",
169169
heuristic.getBestSolutionSoFar(), false);
170170

171+
System.out.printf("\tTotal number of solutions created: %d%n", CloudletToVmMappingSimulatedAnnealing.getSolutions());
171172
System.out.printf(
172173
"\tThe heuristic solution cost represents %.2f%% of the round robin mapping cost used by the DatacenterBrokerSimple%n",
173174
heuristic.getBestSolutionSoFar().getCost()*100.0/roundRobinMappingCost);

0 commit comments

Comments
 (0)