Commit bd4c25f9 authored by rodrigo.calheiros's avatar rodrigo.calheiros

- Changed visibility of some fields in CloudSim.java

- updates in comments
- Location of topology file fixed for network examples
parent f0662234
...@@ -303,8 +303,7 @@ public class CloudSimExample8 { ...@@ -303,8 +303,7 @@ public class CloudSimExample8 {
public void processEvent(SimEvent ev) { public void processEvent(SimEvent ev) {
switch (ev.getTag()) { switch (ev.getTag()) {
case CREATE_BROKER: case CREATE_BROKER:
setBroker(createBroker(super.getName()+"_"));
setBroker(createBroker("Broker_1"));
//Create VMs and Cloudlets and send them to broker //Create VMs and Cloudlets and send them to broker
setVmList(createVM(getBroker().getId(), 5, 100)); //creating 5 vms setVmList(createVM(getBroker().getId(), 5, 100)); //creating 5 vms
...@@ -325,7 +324,7 @@ public class CloudSimExample8 { ...@@ -325,7 +324,7 @@ public class CloudSimExample8 {
@Override @Override
public void startEntity() { public void startEntity() {
Log.printLine("GlobalBroker is starting..."); Log.printLine(super.getName()+" is starting...");
schedule(getId(), 200, CREATE_BROKER); schedule(getId(), 200, CREATE_BROKER);
} }
......
Topology: ( 5 Nodes, 8 Edges )
Model (1 - RTWaxman): 5 5 5 1 2 0.15000000596046448 0.20000000298023224 1 1 10.0 1024.0
Nodes: ( 5 )
0 1 3 3 3 -1 RT_NODE
1 0 3 3 3 -1 RT_NODE
2 4 3 3 3 -1 RT_NODE
3 3 1 3 3 -1 RT_NODE
4 3 3 4 4 -1 RT_NODE
Edges: ( 8 )
0 2 0 3.0 1.1 10.0 -1 -1 E_RT U
1 2 1 4.0 2.1 10.0 -1 -1 E_RT U
2 3 0 2.8284271247461903 3.9 10.0 -1 -1 E_RT U
3 3 1 3.605551275463989 4.1 10.0 -1 -1 E_RT U
4 4 3 2.0 5.0 10.0 -1 -1 E_RT U
5 4 2 1.0 4.0 10.0 -1 -1 E_RT U
6 0 4 2.0 3.0 10.0 -1 -1 E_RT U
7 1 4 3.0 4.1 10.0 -1 -1 E_RT U
...@@ -241,15 +241,14 @@ public class CloudSim { ...@@ -241,15 +241,14 @@ public class CloudSim {
// ======== SIMULATION METHODS ===============// // ======== SIMULATION METHODS ===============//
// Private data members
/** The entities. */ /** The entities. */
private static List<SimEntity> entities; private static List<SimEntity> entities;
/** The future event queue. */ /** The future event queue. */
private static FutureQueue future; protected static FutureQueue future;
/** The deferred event queue. */ /** The deferred event queue. */
private static DeferredQueue deferred; protected static DeferredQueue deferred;
/** The simulation clock. */ /** The simulation clock. */
private static double clock; private static double clock;
...@@ -257,9 +256,6 @@ public class CloudSim { ...@@ -257,9 +256,6 @@ public class CloudSim {
/** Flag for checking if the simulation is running. */ /** Flag for checking if the simulation is running. */
private static boolean running; private static boolean running;
/*
* (non-javadoc)
*/
/** The entities by name. */ /** The entities by name. */
private static Map<String, SimEntity> entitiesByName; private static Map<String, SimEntity> entitiesByName;
......
...@@ -121,7 +121,7 @@ public class DelayMatrix_Float { ...@@ -121,7 +121,7 @@ public class DelayMatrix_Float {
public String toString(){ public String toString(){
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
buffer.append("just an simple printout of the distance-aware-topology-class\n"); buffer.append("just a simple printout of the distance-aware-topology-class\n");
buffer.append("delay-matrix is:\n"); buffer.append("delay-matrix is:\n");
for(int column = 0; column < mTotalNodeNum; ++column){ for(int column = 0; column < mTotalNodeNum; ++column){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment